This article is a tutorial on generating a .HDF hard disk image for Amiga emulation, e.g. WinUAE or MiSTer FPGA.
WinUAE is the most common Amiga software emulator. It is the Windows version of Amiga emulator UAE, a project started in 1995. The MiSTer FPGA is an open source multi-system hardware emulation system from 2017, based on the Terasic DE-10 Nano FPGA board. Both emulation platforms support HDF files.
The rest of the tutorial can be skipped given enough knowledge about WinUAE and Amiga OS. In this case, the following pointers should be enough:
Create a HDF with a fixed size in WinUAE (e.g. 8 MB) in 'Settings/Hardware/CD & Hard Drives', select 'Add Hardfile...'. This is an unformatted drive with one partition.
Boot Workbench 1.3 in WinUAE and format the HDF. Use default 'compatible' speed options to avoid errors.
Open Shell and copy all Workbench files to HDF using
copy df0: dh0: all clone
The Workbench disk image can now be ejected, and the HDF can boot by itself with Kickstart 1.3.
Remember to back up HDF's along the way to be able to roll back.
Do not edit HDF files directly in e.g. the Total Commander 'AmigaDX' plugin. This will result in Disk-validator errors. Only modify from Amiga OS, and leave the system enough time to finish saving your changes before unmounting or closing WinUAE.
If you need more detail, the following guide goes through every step.
In the following, I will use the following terms:
Let's go through the creation of a bootable .HDF in detail. We start out with a few preparations:
We should now be ready to create the HDF file.
When generating an HDF file, we just create a blank image of a fixed size. Think about how much space you will need for your virtual harddisk, bearing in mind that an Amiga floppy disk will maximum hold 880 KB, and the harddisk also needs to hold a Workbench installation.
We now have an unformatted hard disk image file. Store a copy of 'empty.hdf' so we can roll back to this point if anything goes wrong.
In the next step, we will start the Amiga Workbench and install Amiga OS on the virtual hard disk.
Now, let's boot up Workbench 1.3 and install it onto the virtual hard drive. During this process, keep the WinUAE settings to their most compatible. Adjusting CPU speed or disk speed can result in errors.
In WinUAE 'Settings/Hardware/CD & Hard drives', we keep empty.hdf mounted as DH0.
In 'Settings/Hardware/ROM/System ROM Settings/', set 'Main ROM file' to the Kickstart 1.3 ROM in 'genhdf'.
When the Amiga Workbench is fully booted, we first format the virtual harddisk DH0.
Double-click on 'Shell' to open the command-line window.
In the shell, enter the command
copy df0: dh0: all clone
This copies all files from DF0 recursively, keeping file dates and flags. It will take a little while, go get a cup of coffee.
Rename 'empty.hdf' to 'boot.hdf' and store a copy of it, so we can roll back or reuse for another project.
Now, we can eject the Workbench 1.3 ADF from DF0 in 'Settings/Hardware/Floppy drives', and select 'Reset' to reboot the Amiga from the virtual hard drive.
At this point, the HDF should boot by itself, and have it's own Shell for doing further installations from. The Workbench ADF should no longer be needed.
Having a booting HDF, we can use it as a template to create new booting HDFs from. The original impetus for this guide was to make a bootable SimCity HDF for the MiSTer FPGA MiniMig core, where save data could be stored on the HDF itself.
Here is how this was accomplished, based on 'boot.hdf':
copy df0: dh0: all clone
.This new 'simcity.hdf' can be used in WinUAE or MiSTer FPGA, allowing saved cities to be transferred between systems.