Hello,
I continue my quest with the Apple II Disk Emumation,
I open a new thread to share with you a specific issue, I am facing with the Smartisk Floppy Emulator.
When doing DISKII Emulation, I am testing the write part and I have very strange behavior with DOS Init disk procedure.
Using an Apple IIe (with 2 different DISK II card):
- Boot DOS, and INIT HELLO => I/O Error both an real Disk II and SmartDisk emulator,
- Using LockSmith Cerify, Fast Backup, Backup => no issue
Using a IIGS no issue using DOS Init
Using the logic analyzer and the protocol decoder, I have exactly the same output and correct checksum.
What is causing a I/O Error on DOS ?
I am a bit lost here
Thanks
Vincent
When you do the init, what is the disk image you have selected? Is it a .dsk image? How is it generated? Have you selected a known good .dsk and tried it to see if it will INIT over that?
OK, I just tried that, and I get an I/O ERROR so something weird for sure.
I can see and hear it move to track zero, then it gives the error.
To venture a guess...INIT is different because it is the only place the self-sync-bytes have to be written. Maybe the self-sync-bytes are written wrong, so as soon as INIT is done formatting track 0, it fails in its verify scan, and you get the error right then.
What I didn't follow is whether in the description of the issue you meant that INIT fails with real media also, and if yes under what conditions. Failure with real media would mean either some unlikely coincidence or that booting off the emulator results in a corrupted DOS...right?
The formatting process tries to find out how many bytes it can pack on a track, and this depends on the RPMs of the spindle motor. IIRC it starts with writing the track with long gaps and then verifies if the first sector was overwritten, which is expected. It then decreases the gap size and tries again. Until the first sector is still there. And then it accepts that track to be properly formatted. Alas, I can't remember all the details ... have been a long time I looked into the book "Beneath Apple DOS" by Don Worth et al. (I can't even find it right now ...)
I think that depending on how your Floppy Emu handles the track buffer when a track is being overwritten by too much data, many things could go wrong with this formatting method.
- Uncle Bernie
Your memory is fine...
Hello,
I finally found the issue I was facing, and it was many issues, and one ultra difficult to find:
- The SDCard is internally buffering the data to be written, and needs a small delay before being able to read new block of data,
- during init process, the track 17 at the end is written and immediately the head is moving to track 18, if you do not keep track of the written track then you write the content of track 17 to track 18...
It is abivous but not easy to find.
I have rewritten a big chunk of the engine and it is working super well ;)
The next release of the Smartdisk firmware will be managing write part very accurately using the protocol decoder on sigrok.
Thanks for your answers,
Vincent