2013-01-12 · in Media Archiving · 714 words

5.25-inch disks

I had 5.25" disks in various formats: PC, BBC, RM380Z, and Commodore PET/C64, plus several that weren't clearly labelled. Probing and reading disks in FM/MFM formats should be a good deal more convenient on a PC than on the BBC, so the next job was to hook up some 5.25" disk drives to my disk imaging machine.

5.25" disk drives

One came from my IBM 5170 — the original IBM AT:

IBM 5170 Inside the IBM 5170

This machine was quite beaten up when I got it; to replace the original floppy drive, someone had fitted a TEAC "360k" (40-track double-sided double-density) drive. This drive is quite interesting to watch in action, since it uses a conventional rotary stepper motor to move the heads...

A second drive came from my BBC B, a Mitsubishi MF503A-301ME 80-track double-sided double-density drive:

Mitsubishi MF503A-301ME

A web search found the datasheet for the drive in an AtariAge post and some notes on similar drives in a Tandy article. As configured for the BBC, it had the following jumpers set:

PC drives need to be configured as drive 1 — so I removed DS0 and added DS1. After some experimentation, adding the DC (disk change signal active low) jumper made it work correctly on the PC.

5.25-inch disk drives

Software for imaging floppy disks

To test out the drives, I booted the PC into FreeDOS and fired up Dave Dunfield's freeware ImageDisk. ImageDisk can identify, read and write any disk format that a PC floppy controller can handle — so it can do most FM/MFM formats, but not Amiga disks with odd timing, or Commodore 8-bit disks with GCR encoding. It stores images in IMD binary format, which is clearly described in the ImageDisk manual.

ImageDisk's TESTFDC reported that the M1543C's controller supported all the FM and MFM modes I needed, so I tried imaging a few disks. After cleaning the heads on the drives, these read successfully, except for a pile of PC disks that had clearly got damp at some point in the past and were visibly shedding oxide.

However, I'd rather read disks under Linux than under FreeDOS — access to my NFS filestore and long filenames make life much easier. There are a couple of options for this if you know what the disk format is already (described here):

Neither of those works if you don't know the format, though — or if it's one that you can't describe easily (e.g. the mix of FM and MFM tracks that ImageDisk reported on some of the RM disks).

Handily, the fdutils documentation includes a guide to identifying unknown disk formats by driving the floppy controller directly. Based at their instructions and the datasheet for my machine's floppy controller, I wrote dumpfloppy, which does approximately the same job as ImageDisk's probe/read functions. Since ImageDisk's IMD format is well-designed and quite popular, I based dumpfloppy's internal data model on it, and wrote a separate tool (imdcat) to convert IMD to emulator formats such as BBC SSD.

One challenge was how to find the index hole on the disk when probing the list of sectors. I solved this by asking the disk controller to read a sector number that definitely wasn't present; the datasheet says it'll return an error after seeing the index hole for a second time. This is theoretically racy, but it seems to work OK. (I wonder what ImageDisk does?)

I tested dumpfloppy by reading back some disk images that I'd written out using the BBC and checking the result was bitwise identical to the original image — it was — and by comparing its output to ImageDisk's for some of the more complex RM disks.

Some interesting disks

5.25" disks have much more varied branding than 3.5" disks:

AST disk Banana flippy disk Acorn BBC Master welcome disk Digital Classified Software disk IBM PC diagnostics disk Lattice C disk LWT disk Microsoft MS-DOS 4 disk Philips disk Plus Hardcard 20 disk Research Machines disk Radio Shack TRS-80 disk

That Banana disk is unusual because it's a "flippy" disk — it's got two index holes and two write-protect notches, so you can use both sides in a single-sided drive by turning the disk over. (A cheaper alternative was to buy a regular disk and use a hole punch.)

Banana flippy disk in detail