January 12th, 2005

Computers

Old software hacking

I've got this laundry basket full of 8-inch, single sided, single density floppy disks full of stuff. Ever since I tried and failed to get my old S-100 system running enough to read them, I've looked for alternatives. I finally got one working.

Ingredients: a Compaq Deskpro 2000 Pentium 166 box, Vector Linux, an adapter to connect 8-inch floppy drives to a PC's floppy controller, a program from the dmklib package to read the disk and generate a raw data file, and an Altair 8800 emulator with CP/M.

With the 8-inch drives hooked to the Compaq, dmklib was able to read the disk and generate a raw image file. That was half the job.

Unfortunately, the CP/M supplied with the simulator is set up for 32 sectors per track instead of the standard 26, and uses a slightly different raw image file: it seems the Altair disk controller read and wrote 137 bytes per sector instead of the standard 128. If you used a standard disk, the 128 byte sectors were there, starting at the fourth byte in - and the extra bytes are completely ignored.

I had to do two things: modify CP/M on the simulator to use 26 sectors per track instead of 32, and write a dumb little utility program to convert the data format. The first was straightforward; the second had me scratching my head until I realized that I needed to put 32 sectors in each track of the output disk image, even if only 26 of them were used.

Once I got both of those done, though, it Just Worked. Now I can go through that laundry basket and see just what neat stuff I'd collected and forgotten about.
  • Current Mood
    geeky geeky