Skip to main content
Home Forums 68kMLA Floppy emu - Emulating HD20 :-) — #16
Post #16 by bigmessowires
Source Forum68kMLA
CategoryTroubleshooting
Post DateFri, 31 Jan 2014 - 00:25
Original URLhttps://68kmla.org/bb/threads/floppy-emu-emulating-hd20.29449/
Post
I wouldn't call this dead quite yet. Just after my last post, I finally located some of the HD20 routines in the Plus ROM. It appears to begin with the Sony_SendCmd routine at $196AC, and I think $19756 is the beginning of a routine to read from the HD20. I'm happy to share more notes with anyone who's interested and might want to help reverse engineer what it's doing.

While I don't understand most of it, it looks like the 532 byte sectors are 512 bytes of data and 20 bytes of tags. 12 bytes are the same tags as used on floppies, and the other 8 are two longwords called BufTgHD20 and BufTgHD20.1. No idea what those do, but there's a good chance they're not used at all, since the other tags aren't used by the Mac and are some kind of hold-over from the Lisa days. So ignoring those 20 bytes and filling them with zeroes has a good chance of working.

I also found this list of HD20 driver error codes (thank you Apple!), which helped me locate the location in ROM where the "checksum error" determination is made for HD20. It's at $19A0C. I have no idea what the associated code is doing, but now that it's been located, it should be possible to figure it out eventually.

Thanks for the info, Gorgonops. As to ending a transfer from drive to Mac, I was referring to normal transfers, not interrupted ones. I am confused by the sentence "Following reception of a sync byte (which is always $AA) actual data is received until /HSHK is de-asserted." But since /HSHK is physically sent on the ReadData line, and the actual data is also sent on that line, I don't understand what that really means. Basically I'd like to see a detailed timing diagram that shows exactly what happens for a normal transfer from the drive to the Mac.

mp.ls