VOGONS


First post, by Serge.V

User metadata
Rank Newbie
Rank
Newbie

In my hobby with vintage computers, I often need to write or read floppy disk images. This task can be frustrating: you need to find a floppy drive, boot into a suitable operating system, locate the right computer, and then find software that handles the required floppy disk format.

I have modern floppy disk adapters—Greaseweazle, SuperCard Pro, and KryoFlux—which handle the task well, but their software isn't always the easiest to use.

So I decided to create my own tool: a program that works with any floppy disk format via any USB adapter, with the goal of making everything simple. Let me show you the first version of the "floppy" utility.

GitHub repository: https://github.com/sergev/floppy

The utility can perform five main actions:

  • read an image from a floppy disk into a file
  • write an image from a file to a floppy disk
  • erase a floppy disk
  • convert a file from one format to another
  • show the status of the floppy disk controller and drive

Currently, three file formats are supported:

  • HFE (HxC Floppy Emulator format)
  • IMG (raw binary disk image)
  • ADF (Amiga Disk File)

I plan to gradually add more formats, including IMD, SCP, TD0, and others.

The utility is written in Go and works on Linux, macOS, and Windows. If you have Go installed, installation is straightforward:

go install github.com/sergev/floppy@latest

The tool automatically detects and uses the first available adapter from your connected devices (Greaseweazle, SuperCard Pro, or KryoFlux).

When you invoke it without arguments, it prints a help message:

    $ floppy
The floppy tool is a CLI program which works with floppy disks via USB adapter.

Usage:
floppy [command]

Available Commands:
convert Convert between image formats
erase Erase the floppy disk
format Format the floppy disk
help Help about any command
read Read image of the floppy disk
status Check the status of the floppy controller
write Write image to the floppy disk

Flags:
-h, --help help for floppy

Use "floppy [command] --help" for more information about a command.

After that, connect your floppy disk adapter and a powered drive. Check its status:

    $ floppy status
Greaseweazle Firmware Version: 1.6
Serial Number: GWB0B5639A5976C01007101705
Max Command: 22
Sample Frequency: 72.0 MHz
Hardware Model: 4.0
USB Speed: Full Speed
MCU: AT32F4
MCU Clock: 216 MHz
MCU SRAM: 224 KB
USB Buffer: 128 KB
Floppy Drive: Connected
Floppy Disk: Inserted
Rotation Speed: 300 RPM

Let's read a floppy disk. You can provide a target filename—the extension determines the desired file format (HFE, IMG, or ADF). By default, the filename 'image.hfe' is used:

    $ floppy read
Insert SOURCE diskette in drive
and press Enter when ready...

Bit Rate: 500 kbps
Rotation Speed: 300 RPM
Reading track 81, side 1...
Read complete.

Image from diskette saved to file 'image.hfe'.

We can write an image to a floppy disk:

    $ floppy write msdos622.img
Writing 80 tracks, 2 side(s)
Bit Rate: 500 kbps
Rotation Speed: 300 RPM

Insert TARGET diskette in drive
and press Enter when ready...

Writing track 79, side 1...
Write complete.

Image from file 'msdos622.img' written to diskette.

Occasionally, you may need to erase a floppy disk. This can be done with the command:

    $ floppy erase
Insert TARGET diskette in drive
and press Enter when ready...

Erasing track 81, side 1...
Erase complete.

The next feature I'm planning to add is the ability to format floppy drives, meaning create an empty file system of the desired format on them.

Known limitations:

  • For KryoFlux adapters, writing to floppies is not currently supported (read-only)
  • The format operation is not yet available (coming soon)

This project is licensed under the MIT License.

I'd appreciate any suggestions for development and improvement. So far, I've only tested the utility on a 3.5" PC 1.44M floppy drive. I'd be grateful if you could also test it on other devices, including Amiga and PC 2.88M floppies. If you encounter any issues or have feature requests, please report them on the GitHub repository.

Regards,
--Serge

Reply 1 of 6, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Sounds like a useful tool - these devices are nice in that they are not limited to the low-level disk formats supported by the PCs NEC-765.

But I'm curions how you plan to implement format for an "empty file system". This would require support for any high-level format from any OS..

Are you going to limit format to common operating systems support. In the world of vintage compouters there are *many* operatins systems with nerly as many high-level formats.

I provide the ability to low-level format in ImageDisk ... this is mainly for testing, verification of media etc.

For "full format" (incl high-level), I recomend recording a freshly formatted disk. Since IMD can low-level format as it writes, this makes creating "empty" disks for any operating system possible - as long as you have a working system running that OS to make "masters".

(And if you are trying to restore/fix a vintage system - what real need is there for "fresh" empty disks.)

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal

Reply 2 of 6, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Btw, since you already support IMG (raw binary) - you effectively support IMD as IMDU (ImageDisk Utility) can convet a .IMD to raw binary.

But.. you would lose information like Interleave, Cylinder numbering, density changes etc ... so full .IMD support might be nice eventually ... you just may not need to do it that soon.

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal

Reply 3 of 6, by Serge.V

User metadata
Rank Newbie
Rank
Newbie

Thanks for the feedback. My idea for implementing formatting is to have a pre-prepared set of images and offer the user a choice of one. For example, a list like this:

msdos 360K
msdos 720K
msdos 1.2M
msdos 1.44M
Linux 1.44M
BSD 1.44M
Amiga 880K

The goal isn't to cover every possible operating system and file system, just a reasonable set of typical cases.

Reply 4 of 6, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

Fair enough, though in my work with restoring vintage systems/media, I do rarely find much use for "freshly formatted - blank" disks until I have the system running to the point where it can create them itself.

Also seems like a bunch of blanks will consume a lot of space in your distribution... For blank disks you will find that almost all of the disk contains only blank sectors (all with the same value), and the actual system sectors are fairly small...

Take a look at my FDI (FloppyDiskImage) tool which among other thngs can create blank MSDOS disks of (160k, 180k, 200k, 320k, 360k, 400k, 720k, 1200k, 1440k and 2800k) sizes.

It simply creates a full blank image and patches in the system data and is far less than even one 160k image in size. I'm sure you could do similar for other operating systems.

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal

Reply 5 of 6, by Serge.V

User metadata
Rank Newbie
Rank
Newbie
DaveDDS wrote on 2026-01-17, 10:33:

Fair enough, though in my work with restoring vintage systems/media, I do rarely find much use for "freshly formatted - blank" disks until I have the system running to the point where it can create them itself.

You are right, blank floppies by themselves are of little use. But formatting them helps determine whether a floppy is suitable for a particular usage. There's always some uncertainty, as floppy disks are all quite old these days. It's also handy to have a file system ready for the target computer, just in case.

DaveDDS wrote on 2026-01-17, 10:33:

Also seems like a bunch of blanks will consume a lot of space in your distribution...

No need to worry: I embed empty filesystem images into the program binary (at build time) in a compressed format. Typically, each one takes up only a few kilobytes.

I've added support for IMD files. Dave, would you mind to take a look, does it seem reasonable? Here are the sources: https://github.com/sergev/floppy/blob/main/hfe/imd.go

On read, IMG file is converted into HFE for internal use. On write, HFE is converted into IMG.

Reply 6 of 6, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie

There are of course many times when ready made blank images are useful ... especially these days when "real" floppies are harder to come by and you don't want to put extra wear on them as you build "masters".

I still don't like including the blanks in the executable... Given the "any" nature of these devices you'll never have "every blank format" that users will want... And in EXE means rebuilding just to add one. How about tool to store/add/retrieve mostly blank images into a very compact archive. Most tracks will be the same format/content with only certain system sectors partially filled with fairly consistant data. IMD does a pretty good job of making small images but It still records low-level format data for eack track. You could do better for empty disks while making it much easier for users to add new ones. (I guess I'm also a bit anal about making such tools "extra big" since I've had to use IMD booted from floppy so many times over the years on "special" systems - I do realize that this is something different as it has a dedicted hardware component)

I will look at your stuff, but it will take a while before I can ... I've been accessing this forum for the past month or so via a phone with "celluar at sea" fairly crappy internet access (fortunately I have a little BT keyboard so I can enter more detailed responses) ... in a few more weeks I should get back to a "real" computer and it will be much esier to look at things like this!

Regretable I don't actually have any of the bit-stream orienter copying boards (might be why I put so much effort into ImageDisk over the years 😀 ) ... so I don't know how much help I can actually be ... I won't be able to try/test things, but I can at least point out any obvious user-interface/documentation things.

Dave ::: https://dunfield.themindfactory.com ::: "Daves Old Computers"->Personal