2012-12-21 · in Media Archiving · 465 words

Inside the A1200

The Amiga 1200 was designed to take a 2.5" IDE hard disk, like the 85MB one I had originally. However, 3.5" hard disks were always substantially cheaper, and you could just about fit one into the A1200 with adapter cables for IDE and power — provided you didn't mind the keyboard bulging upwards slightly.

My 1.3GB drive was a 3.5" Quantum Fireball dating from 1996. I'd copied most of the contents when I moved to Linux, but I'd never done a complete image of it.

Imaging the hard disk

£5 on eBay will buy you a USB adapter with 2.5" IDE, 3.5" IDE and SATA connectors. I've got one of these permanently plugged into my machine for backups, and it worked fine for reading this hard disk, using GNU ddrescue:

ddrescue /dev/sdb a1200-hd.ahd a1200-hd.log

I generally use ddrescue for this because it'll intelligently retry when it finds bad blocks, but in this case that wasn't necessary; no errors were found.

Reading the hard disk over USB

Interestingly, this disk actually has an activity LED on its PCB:

Hard disk showing its LED

Linux supports Amiga partition tables natively, but you can also use amiga-fdisk to show more detail:

# ./amiga-fdisk -l a1200-hd.ahd
Disk a1200-hd.ahd: 16 heads, 63 sectors, 2484 cylinders, RDB: 0
Logical Cylinders from 2 to 2483, 516096  bytes/Cylinder

Device         Boot Mount Begin  End    Size  Pri  BBlks  System
a1200-hd.ahd1  *    *        2   172   86184   -1      0  Amiga FFS
a1200-hd.ahd2       *      173  1428  633024    0      0  Amiga FFS
a1200-hd.ahd3       *     1429  1635  104328    0      0  Amiga FFS
a1200-hd.ahd4       *     1636  2483  427392    0      0  Amiga FFS Int.

Emulating the Amiga 1200

Using a copy of the A1200's Kickstart 3.0 ROM, I can boot this image in the FS-UAE Amiga emulator:

A1200 emulated in FS-UAE

Extracting the data

The Amiga partitions can be mounted on Linux using a loopback mount, with partition offsets and sizes computed from amiga-fdisk's output. For example, I could mount partition 2 this way:

offset=$(expr $begin \* $cylsize)
sizelimit=$(expr \( 1 + $end - $begin \) \* $cylsize)
mkdir mnt
mount -t affs -o ro,loop,offset=$offset,sizelimit=$sizelimit a1200-hd.ahd mnt

The PCx PC emulator was installed, with a 10MB hard disk image. From inspection, this had 512 bytes of header information followed by a regular PC bootblock; stripping this produced a conventional hard disk image containing a single FAT partition:

dd if=MSHardFile1 of=a1200-pcx-hd.img bs=512 skip=1
fdisk -l a1200-pcx-hd.img
mcopy -spm -i a1200-pcx-hd.img@@16384 :: amy-pcx-hd

This turned out to include some PC programs I'd written that I haven't found elsewhere:

SmegED running in DOSBox ISH running in DOSBox

I also had the ShapeShifter Mac emulator set up with a 40MB hard disk image. ShapeShifter's author, Christian Bauer, has since written BasiliskII, an open-source cross-platform 68k Mac emulator — which was quite happy to boot up my ShapeShifter hard disk file with no additional fiddling required:

BasiliskII boots a ShapeShifter disk

This didn't have anything much other than the OS installed, though (whereas my regular BasiliskII installation occasionally gets used for playing games like The Fool's Errand...).