Skip to content

Releases

FlashFloppy 3.44m1

Choose a tag to compare

@mike-shevchenko mike-shevchenko released this 16 Oct 02:26

ffemu on Ubuntu


FlashFloppy with a multi firmware for Apple2 and Shugart hosts

This is not the stock FlashFloppy. It is based on the upstream's master of 2026-10-14, commit 08482ce (FlashFloppy 3.44 and some upstream changes), and also contains the changes of this fork, which are currently in a pull request. Please report problems with them here, not to the upstream.


What's new

  • The multi firmware, in alt/multi/. It auto-detects between the Apple2 and the regular modes - it watches the four stepper phase inputs for 200 ms at boot and switches to Apple2 mode when an Apple2 controller drives them. So one firmware serves a Shugart host, such as a ZX Spectrum with a Beta Disk interface, and an Apple2 host, such as an Agat or a Pravetz with a Disk II controller, with zero configuration. The main firmware and the separate Apple2 firmware, in alt/apple2/, are the upstream's, but for the small fixes below; all the new Apple2 features are in the multi firmware alone.
    • Images: HFE as before, and now also .nib, .nic, .dsk, .do and .po, all for read and write. A .dsk is taken in ProDOS order when a ProDOS volume directory starts in its block 2, in DOS 3.3 order otherwise; renaming it to .do or .po overrides the guess.
    • Images whose size no Apple2 disk has are left out of the list in Apple2 mode, and an HFE whose header names an encoding that does not suit the mode is refused.
    • Both wirings of the phases are taken: the standard one, and that of Oleg Odintsov's Gotek firmware 307 for Agat, with phase 1 on pin 32 of the floppy connector (the gotek-sa390 project of https://svn.code.sf.net/p/agat-hardware/code).
    • The displays show the stepper phases beside the track: a spinner on the OLED, a square whose sides are the phases, so that a seek turns it round; the phases as digits on a character LCD; the lower segments of the first digit on a 3-digit LED display.
    • See the wiki's Apple II page for what is detected and what is left out on purpose. A quickstart guide for wiring a Gotek is given below.
  • The Apple2 bootloader as an update file, for the AT32F415 in QFN32, such as the SFRKC30.AT2: alt/apple2/at2-bootloader/flashfloppy-apple2-at2-bootloader-3.44m1.upd, see below.
  • The version on a 7-segment display, shown when the right button is pressed and released while no USB drive is mounted, presents all version details sequentially, in every firmware.
  • An unknown interface value in flash, as Oleg Odintsov's firmware 307 writes for its sa390 interface, is taken as jc by every firmware, which crashed on it before.
  • ffemu, the emulator of the firmware's user interface for a PC: a third program, ffemu-multi, runs the multi firmware, and its FDD type dialog (key 8) makes it drive the floppy interface as a Shugart or an Apple2 host does. The Flash mem dialog (key 9) has a new button, Save diff-from-defaults to FF.CFG, which writes the options that differ from the defaults or from flash.
  • Unit tests of the image handlers and of the floppy code, built and run on a PC by the plain make, in tests/.

Installing

Connect the pins marked by the same labels on the diagrams below with Dupont wires or jumpers. The connections are valid for all of the Apple2, Shugart (e.g. TR-DOS) and IBM PC modes.

Prepare Gotek model SFRKC30.AT2 (MCU 415)

Move the encoder's button from the KC30 header to jumper JA (which is Select too).

             J4          J5  JA  JC      S0             Encoder (view to the terminals):
---------------------   -----------------------------     . . .
| .   .   C   D   . |   | .  E1   .   .   S   .   . |    |^-^-^|
-----               |   |                           |   [|     |] 
    | .   .   .   . |   | D  E2   .   .   S   .   C |    |v-v-v|
    -----------------   -----------------------------    E1 . E2 

An AT32F415 in QFN32, such as the SFRKC30.AT2, with an Apple2 host needs the Apple2 bootloader, with the multi firmware as with the Apple2 one. Pin PA10, the KC30 header's Select pin, carries stepper phase 0 there, and the standard bootloader takes it for a held Select button, so at every power-on it stops in its update mode, showing "UPD" or "FF Update Flash".

To install the bootloader, unplug the host, put alt/apple2/at2-bootloader/flashfloppy-apple2-at2-bootloader-3.44m1.upd on the USB drive as its only .upd file and hold both buttons at power-on. This is needed only once.

NOTE: A power cut while the bootloader is being replaced leaves the board to be programmed over USB or a serial cable (Firmware Programming), from the .dfu or .hex in the same folder. The Apple2 bootloader serves a Shugart host as well; it only stops reading the KC30 header's Select pin.

In order to make such Gotek work with IBM PC, either the JC jumper must be installed (ATTENTION: the JC jumper may damage the Apple2/Agat), or the setting interface = ibmpc must be written to the flash memory: put FF.CFG with this line on a USB drive and power on the Gotek, then you can remove this file. Note that TR-DOS will work fine with or without JC and with or without this setting. Note that any FF.CFG that sets interface = will write the specified value back into flash, and the Factory Reset will also delete the setting.

Prepare Gotek model SFRKC30.AT4.35 (MCU 435)

No special bootloader is needed. No encoder moving is needed. The JC jumper can be installed for all the mentioned modes; there is no need to write interface = ibmpc into flash then.

             J4          J5  JA  JC      S0          
---------------------   -----------------------------
| .   .   C   D   . |   | .   .   J   .   S   .   C |  Note the differences from 415:
-----               |   |                           |  - different position of C
    | .   .   .   . |   | D   .   J   .   S   .   . |  - added JC (J-J)
    -----------------   -----------------------------  - no encoder reconnection

Cable for Apple2

A simple cable for one drive can be made from a 14 to 34 wire ribbon cable (some wires can be unused) with IDC-20 connector on the controller's side, and IDC-34 on the Gotek side.

For connecting multiple drives, see the details on the upstream wiki page Apple II.

Controller side, view to the pins at the Controller:

-----------------------------------------  
|PH0 PH1 PH2 PH3 WRQ  .  DE  RD  WR  WRP|  
|GND GND GND GND  .  +5   .   .   .   . |  
--------^----------___--------------^----

Gotek side, view to the pins at Gotek:

-----------------       ---------------------------------------------------------------------
| .   .   .  +5 |       | .  PH0  .   .  DE   .   .  PH1 PH2 PH3 WR  WRQ  .  WRP RD   .   . |
=======---=======       | .   .   .  GND GND GND GND  .   .   .   .   .   .   .   .   .   . |
                        --------^------------------------___----------------------------^----

Cable for Agat

A simple cable for one drive can be made from a 12 to 34 wire ribbon cable with SNP34-30V (male) on the controller side (it can be soldered to, or non-loose Dupont wires can be put on its tail pins), and IDC-34 on the Gotek side.

Alternative - if you have an original Agat FDD cable, you can match it with an FDC-30 (ribbon cable connector for PCB soldering) by pushing FDC's tail pins into the female connector on the cable, and crimping both sides of the ribbon cable. The edge pairs of FDC's tail pins can be soldered short to prevent misalignment when mating.

Controller side, view to the tail pins of the connector on the cable:

 _-------------------------------------_  
|GND  .   .  PH0 PH1 PH2 PH3 +5   .   . |
| .   .   .   .   .   .   .   .   .   . |
|RD  WPR  .  WRQ  .   .   .  DE  WR  GND|
-----------------------------------------

Gotek side, view to the pins at Gotek:

-----------------       ---------------------------------------------------------------------
| .   .   .  +5 |       | .  PH0  .   .  DE   .   .  PH1 PH2 PH3 WR  WRQ  .  WRP RD   .   . |
=======---=======       | .   .   .  GND GND  .   .   .   .   .   .   .   .   .   .   .   . |
                        --------^------------------------___----------------------------^----

For connecting multiple drives, see the details in the specialized adapter board project agat-disk-hub: https://github.com/mike-shevchenko/agat-disk-hub

Install the firmware

The multi firmware: alt/multi/flashfloppy-multi-3.44m1.upd from the zip, as any FlashFloppy update (Firmware Update), for the STM32F105, the AT32F415 and the AT32F435: put the only .upd file on the USB drive and hold both buttons or press and hold the encoder at power-on. This will install the firmware. Its logfile build is in alt/multi/logfile/.


ffemu

  • Linux (x86-64, Ubuntu 22.04+): ffemu-3.44m1-linux-x86_64.tar.gz, ffemu-apple2-3.44m1-linux-x86_64.tar.gz, ffemu-multi-3.44m1-linux-x86_64.tar.gz

  • Windows (Git Bash, MSYS2 or Cygwin): ffemu-3.44m1-windows.exe, ffemu-apple2-3.44m1-windows.exe, ffemu-multi-3.44m1-windows.exe

      ffemu [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]
      ffemu-apple2 [ <directory> | <usb-drive-image> | /dev/sd<usb-dr...
    
Read more

ffemu v1.4

Choose a tag to compare

@mike-shevchenko mike-shevchenko released this 16 Oct 19:44

ffemu on Ubuntu

Introducing ffemu, a build of FlashFloppy's user interface for a PC

The Gotek firmware inside this release is the stock FlashFloppy, upstream master as of 2026-10-13, commit d4da404. Every firmware image built from this release is byte-identical to the upstream's.

ffemu runs the FlashFloppy user interface in a terminal, with no Gotek hardware. The firmware's own code is compiled natively: it draws on an emulated display, reads an emulated USB drive, and takes the keyboard for its buttons, its rotary encoder and the host computer's signals on the floppy interface.

What's new since 1.3

At a glance: version 1.4 draws the character LCD as a real one looks, marks the factory defaults in the configuration dialog, keeps the Console through the firmware's own resets, and offers the firmware's 8x16 font made from 6x13.

  • Faint dots on the character LCD: in the half block rendering, on a terminal of 16 colors or more, the dots of each character that are not lit show faintly, as on a real panel; the characters are white on a blue panel, bright or dark.
  • Factory defaults are marked with = in the Flash mem dialog (key 9).
  • The Console (named Firmware console until now, though it shows ffemu's own lines too) keeps its contents when the firmware resets itself, after a factory reset for one, with a separator line where the reset was; only a power cycle starts it afresh.
  • One question for all of FF.CFG: when OK writes options that FF.CFG on the drive sets otherwise, ffemu asks once and changes every one of them, in a single pass with one .BAK; until now it listed at most four and changed only those.
  • 8x16 font made from 6x13: a check box in the Display dialog (key 0) draws the OLED's 8x16 font as the firmware's logfile and debug builds for the STM32F105/AT32F415 do since keirf#1078, bold from the 6x13 one, to save flash.
  • The emulated firmware's configuration log lines match the shorter ones of the firmware since keirf#1078.
  • Built with the firmware: the plain make at the top of the tree builds both ffemu programs as well, and so does the CI build.
  • Fixed minor issues:
    • Dialog colors: the note of a Save is dark green, readable on the light gray; a button's text is bright white while it has the focus; hotkeys are dark red; Tab reaches the FF.CFG buttons before OK and Cancel.
    • The hotkey letters of the Flash mem dialog are red only while a letter moves the focus: not while typing in a text field, nor under a message box.
    • A long path in the note of a Save is shortened at its left with ... to fit the dialog.

Commits since 1.3

  • ffemu: Bump version to 1.3+
  • ffemu: Fix dialog colors and Flash mem dialog's Tab order
  • ffemu: Mark factory defaults in Flash mem dialog with =
  • ffemu: Rename Firmware console pane to Console
  • ffemu: Keep Console through firmware's own resets, marked by separator
  • ffemu: Ask about every option FF.CFG would override, without listing them
  • ffemu: Shorten config log lines as firmware does
  • ffemu: Add check box for 8x16 font made from 6x13 one to Display type dialog
  • ffemu: Highlight Flash mem dialog's hotkeys only while letters move focus
  • ffemu: Shorten path in Flash mem dialog's note at its left to fit
  • ffemu: Note in README that it was written with help of Claude
  • ffemu: Show LCD's unlit dots faintly in half blocks, white ink on any blue
  • ffemu: Keep README and scripts within 80 columns
  • ffemu: Build both programs with firmware by plain make, and so in CI
  • ffemu: Bump version to 1.4

Downloads

  • Linux (x86-64, Ubuntu 22.04+): ffemu-1.4-linux-x86_64.tar.gz, ffemu-apple2-1.4-linux-x86_64.tar.gz
  • Windows (Git Bash, MSYS2 or Cygwin): ffemu-1.4-windows.exe, ffemu-apple2-1.4-windows.exe

Running

ffemu [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]
ffemu-apple2 [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]

Without an argument, the physical USB drive attached is taken. See ffemu/README.md for the details.

ffemu v1.3

Choose a tag to compare

@mike-shevchenko mike-shevchenko released this 16 Oct 19:29

ffemu-apple2 on Ubuntu

Introducing ffemu, a build of FlashFloppy's user interface for a PC

The Gotek firmware inside this release is the stock FlashFloppy, upstream master as of 2026-10-07, commit 822b6e3. Every firmware image built from this release is byte-identical to the upstream's.

ffemu runs the FlashFloppy user interface in a terminal, with no Gotek hardware. The firmware's own code is compiled natively: it draws on an emulated display, reads an emulated USB drive, and takes the keyboard for its buttons, its rotary encoder and the host computer's signals on the floppy interface.

What's new since 1.2

At a glance: version 1.3 emulates the character LCD and the 7-segment LED displays, writes FF.CFG from the configuration dialog, and explains every option there.

  • Character LCD displays of 16x2, 20x2, 20x4 and 40x2 characters, chosen in the Display dialog (key 0): an HD44780 on a PCF8574 I2C backpack, drawn dark on its lit panel, with two character ROMs to choose from: CYR, Latin and Cyrillic, the default, from MELT's modules, whose codes the other Cyrillic modules share, and A00, Latin and Japanese, the ROM of most other modules.
  • 7-segment LED displays, 3 digits on a TM1651 or 2 digits on 74HC164 shift registers, also in the Display dialog; the unlit segments are faint, as on the real thing.
  • The Flash mem dialog (key 9) writes FF.CFG on the USB drive: Save all writes every option, Save diff-from-flash only the options whose value differs from flash, which is all the firmware needs. The file is made from the firmware's own example FF.CFG, each option below the comments that explain it; the old file is kept as FF.CFG.BAK. This works on a USB drive made from a directory or a mounted physical one; an image file is not written.
  • Help in the Flash mem dialog: its last row explains the option or the value under the cursor.
  • FF.CFG no longer undoes changes: the firmware applies FF.CFG over flash on every boot, so a change made in the Flash mem dialog, or the display-type that fitting another display offers, used to last one boot when the file set the option too. Now ffemu says so, and offers to change the file as well.
  • IMAGE_A.CFG in the Status window, as the firmware wrote it.
  • Ctrl+Home resets ffemu and the device together, as starting ffemu again would: the host computer's signals back at their defaults, latching off, the firmware's writes to the USB drive dropped. Home still power-cycles the device alone, and now keeps the latched buttons down too, so that a function the firmware checks at power-on can be reached.
  • Fixed minor issues:
    • Esc acts after 25 ms instead of 200 ms, which stays over ssh.
    • Errors are shown in bright magenta, and the display's frame widens to fit its title.
    • The display-type suffix boxes (rotate, hflip and the rest) are disabled, empty and gray while the display type is not an OLED, since FF.CFG cannot hold them then; until now a ticked one was dropped silently.
    • The Display dialog's radio buttons look as the Flash mem dialog's do.

Commits since 1.2

  • ffemu: Draw Display type dialog's radio buttons as Flash mem dialog does
  • ffemu: Disable display-type suffix boxes while display type is not OLED
  • ffemu: Bump version to 1.2+
  • ffemu: Add Save all and Save diff-from-flash to FF.CFG buttons to Flash mem dialog
  • ffemu: Show IMAGE_A.CFG in Status
  • ffemu: Shorten Esc delay to 25 ms, keeping 200 ms over ssh
  • ffemu: Emulate 7-segment LED display, 3 digits on TM1651 or 2 on 74HC164
  • ffemu: Show errors in bright magenta, fit display frame to its title
  • ffemu: Change display-type in FF.CFG too when display change needs it
  • ffemu: Check FF.CFG on OK of Flash mem dialog for options it would undo
  • ffemu: Show help inside Flash mem dialog, explaining item under cursor
  • ffemu: Say in Flash mem dialog that only options ffemu supports are offered
  • ffemu: Emulate HD44780 character LCD on I2C backpack, CYR and A00 ROMs
  • ffemu: Draw disabled check boxes empty, light gray on dark gray
  • ffemu: Bump version to 1.3
  • ffemu: Keep LCD character ROM choice enabled whatever display is chosen
  • ffemu: Keep latched buttons through power cycle, reset all with Ctrl+Home

Downloads

  • Linux (x86-64, Ubuntu 22.04+): ffemu-1.3-linux-x86_64.tar.gz, ffemu-apple2-1.3-linux-x86_64.tar.gz
  • Windows (Git Bash, MSYS2 or Cygwin): ffemu-1.3-windows.exe, ffemu-apple2-1.3-windows.exe

Running

ffemu [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]
ffemu-apple2 [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]

Without an argument, the physical USB drive attached is taken. See ffemu/README.md for the details.

ffemu v1.2

Choose a tag to compare

@mike-shevchenko mike-shevchenko released this 16 Oct 19:22

ffemu-apple2 on Ubuntu

Introducing ffemu, a build of FlashFloppy's user interface for a PC

The Gotek firmware inside this release is the stock FlashFloppy, upstream master as of 2026-10-07, commit 822b6e3. Every firmware image built from this release is byte-identical to the upstream's.

ffemu runs the FlashFloppy user interface in a terminal, with no Gotek hardware. The firmware's own code is compiled natively: it draws on an emulated OLED display, reads an emulated USB drive, and takes the keyboard for its buttons and rotary encoder.

NOTE: The previous release 1.1 was withdrawn; 1.2 has everything 1.1 had.

What's new since 1.0

At a glance: version 1.2 adds the build based on the Apple2 firmware, more deeply emulates the floppy drive interface to the computer, uses the physical USB drive attached when run without arguments, and improves the terminal UI.

  • Introduced two flavors: ffemu runs the Shugart firmware, as before, and ffemu-apple2 the Apple2 firmware, which lists .hfe images only. Each keeps its own settings, flash memory state and log file, so both can run at once.
  • Now ffemu takes the physical USB drive attached, if there is one; if there are more, it lists them, each with the /dev/ disk device path to specify as the argument.
  • The keyboard controls the emulated host computer's signals on the floppy interface, shown in the Controls pane: Drive Select, Motor On, Direction of steps, Step pulse, and Side for Shugart (FDD types called Step/Dir: actual Shugart (Beta Disk / TR-DOS), IBM PC, Amiga), Drive Enable and the four stepper Phases for Apple2/Agat, which go through the states a computer goes through, one per key press. The firmware's own floppy code runs on them, so the track display, the head steps and the beeper behave as on the device; the Status window shows the cylinder, the side and the image mounted.
  • Fixed minor issues:
    • ** FF.CFG now stays visible** though dimmed while the USB drive is ejected, and is re-read on every Eject.
    • The color scheme for the keyboard keys and Gotek buttons is improved.
    • Ctrl+L now repaints the screen, for a terminal that got out of sync, which happens with TUI apps, especially on Windows after resizing.
    • The display could hang with a 100% CPU core usage.
    • The display auto-scrolled slowly on a virtual machine whose coarse sleeps were missed at the start.

Commits since 1.0

  • gotek/floppy: Provide C fallbacks for ARM-only code
  • ffemu: Fix up mark, explain Flash mem dialog, mark cut bottom line, add Ctrl+L
  • ffemu: Move version to version.h, bumped to 1.0+
  • ffemu: Use term "USB drive" everywhere instead of "USB flash drive"
  • ffemu: Fix slow display on OS whose coarse sleeps were missed at start
  • ffemu: Fix hang of firmware in handler waiting on I2C bus
  • ffemu: Add build for Apple2 firmware
  • ffemu: Emulate host computer's signals on floppy interface
  • ffemu: Keep showing FF.CFG, dimmed, while USB drive is out
  • ffemu: Redesign keys and buttons: red keys, round buttons, lit when pressed
  • ffemu: Take USB drive attached when run without argument

Downloads

  • Linux (x86-64, Ubuntu 22.04+): ffemu-1.2-linux-x86_64.tar.gz, ffemu-apple2-1.2-linux-x86_64.tar.gz
  • Windows (Git Bash, MSYS2 or Cygwin): ffemu-1.2-windows.exe, ffemu-apple2-1.2-windows.exe

Running

ffemu [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]
ffemu-apple2 [ <directory> | <usb-drive-image> | /dev/sd<usb-drive-dev>1 ]

Without an argument, the physical USB drive attached is taken. See ffemu/README.md for the details.

ffemu v1.0

Choose a tag to compare

@mike-shevchenko mike-shevchenko released this 16 Oct 19:05

ffemu on Ubuntu

ffemu runs the FlashFloppy user interface in a terminal, with no Gotek hardware. The firmware's own code (src/main.c, the display driver, FatFS, the image handlers) is compiled for the host: it draws on an emulated OLED display, reads an emulated USB flash drive, and takes the keyboard for its buttons and rotary encoder. It is meant for working on menus, display layout, fonts and code pages without flashing a device.

What it does

  • Emulates an SFRKC30.AT2 board (AT32F415) with an SSD1306 or SH1106 OLED display of 128x32 or 128x64, drawn as Braille dots, half blocks or ASCII.
  • The USB drive is a directory of the host, built into a FAT32 volume with the short names, long names and attributes that Windows or Linux would give the files when copying them to a real drive. It can also be an image file of a whole drive, or a real USB flash drive read directly.
  • What the firmware writes to the drive never reaches the files, the image or the disk.
  • Shows the FF.CFG that the firmware reads, the configuration in its flash memory, which can be edited in a dialog and is kept across runs, and the firmware's console, also written to a log file.
  • Long and combined button presses via the latch mode; power cycles, USB drive insertion and removal.
  • Commands on standard input drive it without a terminal, for testing.

Downloads

  • ffemu-1.0-linux-x86_64.tar.gz: Linux on x86-64, Ubuntu 22.04 or later; nothing else to install.
  • ffemu-1.0-windows.exe: Windows, to run in Git Bash, MSYS2 or Cygwin, which provide the msys-2.0.dll it needs.

Running

ffemu [<directory> | <image> | <disk>]

The directory defaults to the current one. Reading a disk such as a USB flash drive needs sudo on Linux, or a terminal started as administrator on Windows. See ffemu/README.md for the details.

The firmware inside is FlashFloppy from the fork's main line, where this release is tagged: the upstream master of the time, 483077a, with this release's feature branch merged in. Besides ffemu, the branch holds four changes that the upstream took later the same day in pull request keirf#1073: out-of-tree builds, 64-bit hosts, C fallbacks for ARM assembly, and a fix for a buffer overrun when FF.CFG changes oled-font. It reports its version as the commit hash.