First post, by Serge.V
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:
$ floppyThe floppy tool is a CLI program which works with floppy disks via USB adapter.Usage:floppy [command]Available Commands:convert Convert between image formatserase Erase the floppy diskformat Format the floppy diskhelp Help about any commandread Read image of the floppy diskstatus Check the status of the floppy controllerwrite Write image to the floppy diskFlags:-h, --help help for floppyUse "floppy [command] --help" for more information about a command.
After that, connect your floppy disk adapter and a powered drive. Check its status:
$ floppy statusGreaseweazle Firmware Version: 1.6Serial Number: GWB0B5639A5976C01007101705Max Command: 22Sample Frequency: 72.0 MHzHardware Model: 4.0USB Speed: Full SpeedMCU: AT32F4MCU Clock: 216 MHzMCU SRAM: 224 KBUSB Buffer: 128 KBFloppy Drive: ConnectedFloppy Disk: InsertedRotation 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 readInsert SOURCE diskette in driveand press Enter when ready...Bit Rate: 500 kbpsRotation Speed: 300 RPMReading 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.imgWriting 80 tracks, 2 side(s)Bit Rate: 500 kbpsRotation Speed: 300 RPMInsert TARGET diskette in driveand 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 eraseInsert TARGET diskette in driveand 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