Modern Floppy Disk Image Conversion: A Practical Guide

My first experiences with floppy disk image formats began when figuring out how to save old Yamaha floppy disks for use with a Nalbantov using a Greaseweazle. My goal was to find a clean repeatable way to image floppy disks and add floppy disk images to Nalbantov USBs in the proper formats. However, although Nalbantov’s use HxC Floppy Emulator (HFE) files, other software that I use requires IMG files. So now I need a way to convert them!

You can use my online Floppy Disk Image Converter here!

Why You Might Need a Converter Today

Cross-emulator workflow

Gotek drives mount IMG/IMA images out of the box, but Nalbantov firmware streams fastest from HFE v3. If you have IMG images of floppy disks, you’ll need to convert those to HFE.

Flux-level insurance

A Greaseweazle or KryoFlux captures every magnetic nuance in .SCP or .KFRAW. These are extremely high-quality, archived copies of your disks at the magnetic flux level. I typically use these as masters, and then copy and convert them into IMG or HFE files as required by my particular project. Incidentally, I strongly recommend Greaseweazle for this purpose, as their product is very well-made and well-documented.

Targeted file rescue

Converting an image to a format 7zip can understand allows you to extract a single MIDI or SYS file on a modern PC, sparing you a round-trip through aging floppy mechanisms.

Core Formats in the Field

Raw Sector Images: IMG / IMA

Raw sector images—small, fast, and the default for most Gotek setups. These are also what I use for mounting floppy disks to VirtualBox and QEMU instances. This is my solution, for instance, when I want to use Player Piano Floppy Backup Utility on an image I have stored, even though his software does technically have this ability natively. This is also the image format I use when running Giebler’s Yamaha DOM Package in a Windows 98 virtual environment.

Image Container: HFE

In addition to the raw bits captured by an IMG file, HFE files encode track geometry and CRC data. They’re a bit larger, but contain information about the disk emulators can use. These are used by Nalbantov and are widely accepted by Goteks with FlashFloppy firmware. These are the files present on all Nalbantov USBs.

Flux-Level Capture: SCP

These are flux-level archives captured by Greaseweazle or KryoFlux. They are ideal for long-term preservation or copy-protected disks, and are essentially high-resolution magnetic scans of the disks. This is my default choice when imaging old disks.

Legacy platform images (ADF, DSK, ATR, D64, etc.)

There are many other images, and I’m unfamiliar with most of them. However, because Greaseweazle’s conversion tools convert them, I’ve included them in my online tool. If you can find use for them in your particular project, I’m pleased to help.

Using Greaseweazle Tools

To turn a 720 KB IBM-formatted image (say, mydisk.img) into a Nalbantov-friendly HFE, first be sure your Greaseweazle host utilities are up-to-date. You can download these from Greaseweazle’s GitHub. He even provides a convenient one-liner:

pipx install git+https://github.com/keirf/greaseweazle@latestCode language: Bash (bash)

You can now use the gw convert instruction to switch between disk image formats.

gw convert --format=ibm.720 mydisk.img mydisk.hfeCode language: Bash (bash)

The --format=ibm.720 flag locks in the correct geometry—80 tracks, double-sided, 9 × 512-byte sectors. Copy mydisk.hfe to your USB stick, using the correct filename conventions as the other files on the USB stick. For Nalbantov USB emulators (other than the eXtreme), this will be DSKA0001.hfe, for disk 001, DSKA0030.hfe for disk 030, and so forth. The eXtreme will read files regardless of their names.

If you have an HFE file, you can convert it to an IMG file in the same manner:

gw convert --format=ibm.720 mydisk.hfe score.imgCode language: Bash (bash)

Easy, right?

Extracting Files from IMG Images

If you have the file in IMG format, you can then extract the files using 7zip. From the terminal on a Mac or Linux machine, with 7zip installed, run…

7z e ClassicHitsI.imgCode language: Bash (bash)

And it will extract the IMG file just as though it were an archive! This doesn’t work on other formats, so converting to IMG is an important first step.

Alternatively, on Linux, you can use the mtools suite:

mdir -i image.img ::
mcopy -i image.img ::* ./out/Code language: Bash (bash)

On Windows, WinImage is the classic tool, as mentioned on my tools page.

A Faster Way: My Free Online Converter

All the heavy lifting above now happens in-browser on my Floppy Disk Image Converter. For now, this tool is available to the public. I’ll eventually be setting daily usage limits, but this is an open testing period. Please contact me if you have any difficulties with it at all.

Making your Own Images

My favorite tool is, obviously, the Greaseweazle, and you can purchase your very own from Emmy Bear’s Retro and 3D Printing on Tindie. You’ll need to also order an old floppy disk drive from eBay to go along with it. I have an article on selecting USB floppy disk drives that includes a section on Greaseweazles and internal drives. You need an internal drive to use a Greaseweazle!

If you copy lots of old disks and do a lot of floppy disk archiving, you'll want to investigate these.
If you copy lots of old disks and do a lot of floppy disk archiving, you’ll want to investigate these.

Leave a Comment