Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

User avatar
syltefar
Posts: 31
Joined: Mon May 25, 2020 1:49 pm
Has thanked: 21 times
Been thanked: 14 times
Contact:

Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

Unread post by syltefar »

I wanted to make a custom HDF file with a particular version of SimCity, and ended up writing a little step-by-step guide for creating a new Workbench 1.3 HDF using WinUAE:
https://namelessalgorithm.com/amiga/blog/genhdf/
Let me know if I made any mistakes, or if you think the guide was helpful.

User avatar
kathleen
Top Contributor
Posts: 414
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 226 times
Been thanked: 135 times

Re: Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

Unread post by kathleen »

Thank you @syltefar,
Really well done and very clear, for sure, this kind of tutorial is helpful.

かすりん

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

Unread post by Malor »

Images you create that way might not work on the Mister. I think you're using a WinUAE-specific mode with those creation instructions. It's much easier, and it lets you format the drive almost instantly, but I'm not sure it will work with any other emulator. IIUC, it's depending on the WinUAE-provided ROM. It works fine, but A) might not be transferable to other emulators and B) won't let you use custom filesystems. The Amiga FastFileSystem is terrible, super prone to corruption if you turn the machine off too soon, because it updates the equivalent of the FAT several seconds after the most recent disk write. People are very, very prone to rebooting or powering off during those several seconds, resulting in disk corruption, sometimes very severe disk corruption.

What I consider a proper emulated drive needs to be built in 'RDB mode', which is a button on the setup screen. Once you press that on a given image, it permanently locks it into a raw disk mode. At that point, it looks exactly like an actual hard disk to the Amiga OS, a SCSI device with a specific geometry. You then have to use HDToolBox to partition the raw drive, which is pretty intricate. After that, the drive partition(s) show up as raw devices and can be formatted.

If you want to use SFS or PFS, which are way better filesystems (the smartest Amiga people on this forum seem to think PFS is the better of the two), you have an extremely intricate dance to do with HDToolBox, in which you load the custom filesystem driver directly onto the partition. The process is ridiculously complex, with you having to enter "PFS3" (I think it's 3) in hex bytes in one area; I always have to look up the procedure. You're associating, I think, PFS3 filesystems with a specific binary driver file, which you pick from disk. Then, IIRC, it will load that binary file onto the header of any PFS3 partition you make, at least during that session. I think, if you start over, you have to do it all again. It sucks.

And then, at least with PFS, after you screw around for thirty minutes to several hours until you finally get everything right at the same time, you have to format the drive with, I think, the 'pfsformat' utility. Once you finally have it built and formatted, during boot, the Amiga automagically finds and uses the new filesystem. This is an appalling idea from a security perspective, but wow, it makes using alternate filesystems easy. It's plug and play way before actual Plug and Play. PFS, SFS, anything... if the partition is built properly, the Amiga just loads the code and runs the disk.

Once you get that all done, the resulting PFS image should be extremely stable, far better than any FFS image. If, during the partitioning process, you use the 'pfs3aio' driver binary from Aminet, which explicitly works with any CPU or ROM version, any 68000-based Amiga can use it normally, from an A1000 up to an A4000T. I think there might be a minimum of Kickstart 1.3, which I believe was the first to implement the autoboot protocol.

But, wow, it's hard to get there. The overall process is so painful that I think you might want to download a preformatted blank instead.

What you're doing there does work for WinUAE. If that's where you're hanging out, you're fine. I haven't tried using an image made that way with the Mister, but I think it won't work without the WinUAE ROM being present. I believe that was WinUAE's first method of emulating disks. The RDB format came later, and is much more authentic to the original, awful experience. Setting up a hard drive on an Amiga was even uglier than MFM and RLL drives on PCs, and that's saying something. (No custom filesystems on the PC, though, a lot of why it was so much easier.)

Once they're built, they're super easy, and when running PFS, quite robust. Everything just works, invisibly and painlessly. It's real nice from a user perspective. Not so much from a creator's perspective.
User avatar
syltefar
Posts: 31
Joined: Mon May 25, 2020 1:49 pm
Has thanked: 21 times
Been thanked: 14 times
Contact:

Re: Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

Unread post by syltefar »

Malor wrote: Wed Nov 09, 2022 2:49 pm Images you create that way might not work on the Mister.
Thank you for the explanation, Amiga HDs are indeed a somewhat complicated topic.
However, I did make this guide specifically for MiSTer, and I *can* verify that it works, at least in this simple case.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: Beginner's Guide to Creating Amiga WB1.3 Hard Disk File (HDF)

Unread post by Malor »

Oh, good, well that's easier than I expected. I still think you're probably better off snagging a premade PFS image, because they're a lot more robust, but I'm glad the basic/original WinUAE method works with the Mister.

Or, of course, you could make a PFS image, but ye gods, what a pain that is.
Post Reply