You are not logged in.

dabone

Unregistered

1

Tuesday, February 10th 2009, 1:19pm

NKC MMC2IEC and sd2iec 0.6.6 with Jiffydos.

Sorry for posting in English, but I don't understand a word of german.





I just bought a MMC2IEC thats labeled MMC2IEC for C64 V 0.8 produced by NKC Electronics.

I've got Jiffydos on my 128 and it works great with my uiec2sd from Jim Brain, but when I enable it on the MMC2IEC using the

@"XJ+ command, the device messes up badly.

I noticed this from the README..

JiffyDOS:
=========
The JiffyDOS protocol has very relaxed timing constraints compared to
Turbodisk, but still not as relaxed as the standard Commodore IEC protocol.
Jiffy seems to tolerate slightly mis-tuned RC oscillators, but you still
shouldn't expect it to work without oscillator calibration. If the
frequency error is too big you WILL get wrong data which usually manifests
as a FILE NOT FOUND error because the name the drive received was already
garbled.



How can I get a better oscillator on this board?

What change to the firmware would have to be changed?



Thanks,

dabone

aka

Mark

2

Tuesday, February 10th 2009, 1:24pm

This old MMC2IEC Board from NKC has two problems:
  • no crystall so you have bad timing
  • the controller is a old Atmega32, so newer Software doesn't run (only 32K flash)



NKC offers a new Board called SD2IEC which has solved both problems.


To make changes yourself it is maybe possible to solder a crystall by yourself. But your controller has a limited space for firmware code (only 32K). So you have to surrender of some functions (smaller firmware version).

Unseen

Hätte gerne 'n Virtex 7 ;)

  • "Unseen" is male
  • »Unseen« is a verified user

Posts: 4,571

Date of registration: Jun 16th 2007

Location: Debara Hamtar

  • Send private message

member since 72 month member since 72 month member since 72 month member since 72 month

3

Tuesday, February 10th 2009, 1:31pm

RE: NKC MMC2IEC and sd2iec 0.6.6 with Jiffydos.

I've got Jiffydos on my 128 and it works great with my uiec2sd from Jim Brain, but when I enable it on the MMC2IEC using the @"XJ+ command, the device messes up badly.

Can you describe "messes up badly" in more detail?

Oh, and please verify that the NKC board really runs v0.6.6 by sending @UI and checking the error channel. There was a problem with the JiffyDos timing in versions prior to 0.6.5 that affected only NTSC systems.

If you're really running 0.6.6 you can try to change the calibration byte. Read the original value with @"X followed by @ - it's the "Cxxx" part of the string. Try to set the device to a slightly decreased or increased value (e.g. @"XC160 ), enable JiffyDos and see if it works. As it's possible to find values that are mostly working but still occasionally flip a bit the best way to find the optimal value is to find both the lower and upper limit where operation is unreliable and select a value in the middle of those two.

Quellcode

1
2
3
10 x=rnd(-1963):fori=1to81:y=rnd(1):next
20 forj=1to5:printchr$(rnd(1)*16+70);:next
30 printint(rnd(1)*328)-217

sd2iec Homepage

This post has been edited 1 times, last edit by "Unseen" (Feb 10th 2009, 1:38pm)


dabone

Unregistered

4

Tuesday, February 10th 2009, 3:00pm

..

It is running 0.6.6 verified.

Also for the running weird.

@$ will return blank directories or hang.

/filename will return the file not found error.

@$ will report a drive not ready

I've tried using the XC command to go up and down a couple of values each way and the device get worse..

(Device not present)



The board includes a place for a resonator, is there any harm in using an external? I would like to just go ahead and put it in to keep problems to a
minimum. I'm figuring a 8mhz resonator, but what value caps should I use? And after I install it, should I set all the clk fuses to 1?



Thanks,

Mark

This post has been edited 1 times, last edit by "dabone" (Feb 10th 2009, 3:09pm)


Unseen

Hätte gerne 'n Virtex 7 ;)

  • "Unseen" is male
  • »Unseen« is a verified user

Posts: 4,571

Date of registration: Jun 16th 2007

Location: Debara Hamtar

  • Send private message

member since 72 month member since 72 month member since 72 month member since 72 month

5

Tuesday, February 10th 2009, 3:18pm

RE: ..

@$ will return blank directories or hang.

/filename will return the file not found error.

That does indeed sound like a timing issue. It's a bit strange though, Jiffy should have a reasonably high tolerance.

Quoted

I've tried using the XC command to go up and down a couple of values each way and the device get worse..

What was the starting value and what were the lowest/highest values you tried?

Quoted

The board includes a place for a resonator, is there any harm in using an external? I would like to just go ahead and put it in to keep problems to a
minimum. I'm figuring a 8mhz resonator, but what value caps should I use? And after I install it, should I set all the clk fuses to 1?

Adding an 8MHz crystal with correct caps and changing the clock fuses will most likely fix those problems. The correct value of the caps depends on the crystal (a bit less than half the load capacitance listed in its datasheet), but usually 32pF caps will work unless really high precision is required (like for Tubodisk, but that isn't NTSC-compatible anyway).

If you have access to an AVR programmer that is able to read the so-called "calibration area" of the chip you can also try something else before grabbing the soldering gear: Atmel factory-calibrates the four on-chip oscillators (1/2/4/8MHz) during production and stores the calibration byte value (the one set with XC) in that area. Unfortunately the chip will always use the 1MHz value on startup and it is not possible to read the other values from software. If you have access to a programmer that can read this area (avrdude can do it, Ponyprog mentions it in its documentation) read the values in there and see if the first value (1MHz) differs significantly from the last one (8MHz) - if so, use the last value in the XC command and try Jiffy one more time. While the chip is connected to a programmer you could also check that it's really set up to run from the internal 8MHz oscillator.

All-1s for the clock fuses with crystal should be correct according to this online-calculator.

Quellcode

1
2
3
10 x=rnd(-1963):fori=1to81:y=rnd(1):next
20 forj=1to5:printchr$(rnd(1)*16+70);:next
30 printint(rnd(1)*328)-217

sd2iec Homepage