I am looking for detailed info on the low-level floppy disk structure of an MS-DOS-compatible 720k Double Sided Double Density disk. Stuff like GAP/SYNC patterns, ID and CRC Field structure, standard interleaving, etc. All my googling has been in vain.
-
1Beside asking for a link only answer, there is no MS-DOS low level format. MS-DOS uses whatever the BIOS can handle. That's the portable part. You might want to start with Wikipedia's "Floppy disk format" page and continue from there using all the keywords already present in your question (maybe plus MFM). Not to mention the vast number of pages about formating floppies out on the net. Easy to find by typing "Floppy disk format" and reading past the first few entries.– RaffzahnFeb 10, 2019 at 14:07
-
Welcome to Retrocomputing! Nice question. I have improved the title, so it directly asks for the information you are looking for, rather than a link.– DrSheldonFeb 10, 2019 at 15:49
-
There's a lot of info about floppy internals, moria.de/~michael/floppy/floppy.pdf and info-coach.fr/atari/hardware/FD-Hard.php are good starting points. Depending on your objective, you might need even lower level details -- what are you planning to do?– sendmoreinfoFeb 10, 2019 at 21:21
-
Sounds like you are developing your own FDC. Question is scarce of information on what you really need. And you really will have to dig a lot to find this information. Edit the question or get in touch to discuss your real issue.– AnonymousFeb 11, 2019 at 7:22
-
thanks guys. all that stuff was very very helpful. I'm basically writing a program to be able to read MSDOS floppies on a Tandy Color Computer which uses a totally different format normally. the plan is to read the raw tracks and extra the stuff I need. should have more than enough info now to do it.– LordDragonFeb 26, 2019 at 15:47
3 Answers
All IBM floppy variants (5.25″ and 3.5″, DD and HD) use the same floppy controller, just the timing is different. So the bit pattern structure is the same, even though number of sectors per track etc. can differ. Interleaving is handled by software, I don't know the details.
The IBM PC floppy controller chips are descendants of the venerable NEC µPD765, which implements the IBM 34 MFM format as used in the mainframes. You can find details in the datasheet of the controller, and in IBM mainframe manuals.
Here is a transcription of the byte patterns (in hex) from the datasheet:
80x 4E Gap 4a
12x 00 Sync
3x C2 IAM
FC ”
50x 4E Gap 1
12x 00 Sync
3x A1 IDAM
FE ”
** CYL = Cylinder
** HD = Head
** SEC = Sector
** NO = ?
2x ** CRC
22x 4E Gap 2
12x 00 Sync
3x A1 DATA AM
FB ”
?x ** Data
2x ** CRC
? ? Gap 3
? ? Gap 4b
CRC is calculated by hardware. Some gap lengths can differ between variants.
The A1 and C2 marker bytes are special and don't follow the standard MFM encoding: A1 is missing a clock transition between bits 4 and 5, and C2 is missing a clock transition between bits 3 and 4.
They are written by a WRITE TRACK controller command that interprets F5 and F6 to write those special bytes.
The IBM AT bios listing. https://archive.org/details/bitsavers_ibmpcat618ferenceMar86_25829277/page/n325 Seems to have some of the data you're looking for.
CRC would have been implemented in hardware (there are a few variants) so probably an early FDC documentation would be your best bet.
Most floppy disk controller chip datasheets have typical values, but it's really the BIOS that controls these values. As a starting point, take a look at Intel 82077 datasheet. I've successfully been able to decode sectors from a logic analyzer dump of floppy drive data pin.