Amiga Floppy Drive Research – Part 3

Last night I changed the PushBit() routine.  After a Sync marker is found it now builds an array of bytes filled with MFM data, up to a maximum of 1080 bytes.  This is 4 bytes of the data above, 16 bytes sector label, 4 bytes header checksum, 4 bytes data checksum and 512 bytes sector data.  540 bytes in total times 2 since we’re storing clock data too.

Once filled I’m just writing the 540 bytes out to disk for inspection with a hex editor.

Look what we have here:

00000000  FF 00 00 0B  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000010  00 00 00 00  00 00 00 04  54 15 11 00  44 4F 53 00  ........T...DOS.
00000020  E3 3D 0E 73  00 00 03 70  43 FA 00 3E  70 25 4E AE  .=.s...pC..>p%N.
00000030  FD D8 4A 80  67 0C 22 40  08 E9 00 06  00 22 4E AE  ..J.g."@....."N.
00000040  FE 62 43 FA  00 18 4E AE  FF A0 4A 80  67 0A 20 40  .bC...N...J.g. @
00000050  20 68 00 16  70 00 4E 75  70 FF 4E 75  64 6F 73 2E   h..p.Nup.Nudos.
00000060  6C 69 62 72  61 72 79 00  65 78 70 61  6E 73 69 6F  library.expansio
00000070  6E 2E 6C 69  62 72 61 72  79 00 00 00  00 00 00 00  n.library.......
00000080  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000090  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000A0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000B0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000C0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000D0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000E0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000000F0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000100  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000110  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000120  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000130  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000140  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000150  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000160  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000170  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000180  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000190  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001A0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001B0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001C0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001D0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001E0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
000001F0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000200  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................
00000210  00 00 00 00  00 00 00 00  00 00 00 00               ............

It’s the first block of a boot block!  Excellent – working a treat.

The next thing is – tidy the code to make it more modular.  Then calculate the checksum.  Once I’ve done all this I’m going to see about changing the PIC code to read the whole disk so I can analyse more data.

I got in contact with a guy called Keith.  He’s doing some Amiga floppy stuff on his blog at techtravels.org.  Very helpful and has lots of experience doing this stuff.  It’s uncanny how close our thought patterns are.  Be sure to check out his site.

Another excellent resource is this site here http://lclevy.free.fr/adflib/adf_info.html.  The checksum logic does not appear to be explained at all in the RKRM and Laurent’s site was quite useful.  The source from ADFRead also confirmed what was going on: http://www.winuae.net/files/stuff/adfread-1.1.zip

Leave a Reply

Your email address will not be published. Required fields are marked *