This is the note about the first thing that went wrong, and it is the reason the rest of the bench exists. The desktop was already built. Years of it. It just would not boot on the new machine. On the home network there is a MiSTer, and on the machine that still runs WinUAE there is a configuration named Test.uae. Its hard drive is not a folder of floppies. DH0 is A1200e.vhd, a sparse virtual disk whose real contents are a Workbench volume called WB. DH1 is WHDLoad, mounted the way WinUAE likes to mount things: a directory on a NAS, presented to the Amiga as another drive.
The interesting object is the hardfile. It is about a gigabyte of geometry wrapped around a few megabytes of a machine someone actually used. Kickstart 3.1 for the A1200. AGA. Two megabytes of chip RAM. A 68EC020. The root block sits in the middle of 2,048,000 blocks and the volume name is two letters long.
Copying the file across the room is not the same thing as handing it to an IDE controller.
Minimig on the MiSTer will mount an HDF. If the file has no rigid disk block, the firmware invents one and labels the partition DOS\1. This image was a UAE hardfile. Its boot block said DOS\3, the checksum field was empty, and the conversion from the virtual disk had stopped 1,760 blocks early. Kickstart did what Kickstart does. It put up a requester: not a DOS disk in device DH0.
Make it a disk
The repair was ordinary disk work. Pad the image back to the size the root block was formatted for, so block 1,024,000 is still the middle. Write an RDSK and a bootable PART whose dostype is DOS\3, matching the filesystem. Repair the boot-block checksum the way the strap actually checks it: with the field filled in, the end-around sum of the block is 0xFFFFFFFF.
The filesystem blocks themselves were already honest. Their simple checksums summed to zero. They did not need to be rewritten. Only the frame around them was wrong, and the frame is what IDE reads first.
The conversion
qemu-img convert -f vpc -O raw turned the dynamic VHD into a raw file, then stopped on the header’s CHS geometry: 1,015 cylinders, 32 heads, 63 sectors. That is 2,046,240 blocks. The volume was formatted for 2,048,000, so the root block was no longer the middle, and there was still no rigid disk block for IDE. This is the script that padded the image, wrote the RDSK and PART, and filled in the boot checksum.
python3 scripts/uae_raw_to_minimig_hdf.py A1200e.raw A1200e.hdf \
--blocks 2048000 --dos DOS3 --drive DH0 --label A1200e
The script, as it is today: uae_raw_to_minimig_hdf.py. It pads the raw image back to the block count the filesystem was formatted for, writes an RDSK and a PART in cylinder 0 with the DOS type the volume actually has, and repairs the boot block checksum. The code lives there rather than here, so that when it changes the page does not lie.
The transfer
The WinUAE machine is Windows with Cygwin. The hardfile lives on a normal Windows path, so the copy addresses it as a /cygdrive file. That file is not what the MiSTer boots. It is pulled off Cygwin, turned into the IDE image by the script above, then pushed to the card. The board’s SSH client settings matter: X11 forwarding was on, and the password prompt was being stolen by ssh-askpass. ForwardX11=no and PubkeyAuthentication=no make password auth work, and sshpass -e reads the password from SSHPASS instead of the command line.
scripts/fetch_winuae_vhd.sh quo \
"/cygdrive/c/Users/Public/Documents/Amiga Files/WinUAE/A1200e.vhd" A1200e.raw
python3 scripts/uae_raw_to_minimig_hdf.py A1200e.raw A1200e.hdf \
--blocks 2048000 --dos DOS3 --drive DH0 --label A1200e
export SSHPASS
scripts/copy_to_mister.sh A1200e.hdf root@mister:/media/fat/games/Amiga/A1200e.hdf
fetch_winuae_vhd.sh pulls the VHD off the Cygwin host and runs the qemu-img conversion; copy_to_mister.sh pushes the finished file with X11 forwarding and public-key auth off, and refuses a name the card already has.
How it loads
The file now lives on the MiSTer as games/Amiga/A1200e.hdf, next to Kickstart 3.1 rev 40.68 for the A1200. The directory of WHDLoad that WinUAE used as DH1 is on the card too. Minimig cannot mount a folder as a drive, so the hardfile is the thing that boots.
- 01 Start the Amiga core and press F12.
- 02 Set the Kickstart to the A1200 3.1 ROM.
- 03 Choose A1200e.hdf as the primary master.
- 04 Chipset AGA, chip RAM 2M, floppies empty.
- 05 Reset, then save the configuration.