A ardunio based project to launch games on the Zaparoo platform via the contents of a floppy disc using the Adafruit Floppy FeatherWing.
A microcontroller interfaces with the FeatherWing to connect a 34 pin floppy drive. The supporting libaries allow the controller to read from any 3.5 or 5.25 IBM PC compatible FAT floppy disk (so pretty much any 90s floppy drive will work). When a write-protected disc is inserted into the drive, the controller will look at the root of the disk for a file called "zaparoo.txt". The contents of this file are the same as the text in a standard Zaparoo nfc tag (See ZapScript). Until another disk is inserted, the motor of the drive will not spin.
The floppy drive bus does not have a dedicated pin that triggers when a disk is inserted. Other singals like the "READY" and "DISK CHANGE" only change when a new disk is inserted and the motor spins up. Polling those signals would cause the drive to constantly spin, adding additional wear and tear on the device. "WRITE PROTECT" is active only when a protected disk is in the drive and it will change when removed, allowing for motor free detection.
- Adafruit Floppy FeatherWing (Buy or Build).
- Adafruit Feather M4 Express (Buy) or a RP2040*
- Floppy Drive (Tested using a Sony mpf920)
- 34 Pin Floppy Ribbon Connector
- A power supply for the floppy drive**
- (Optional). It is easier to use a cheap Another way to write floppy disks (Cheap usb drives should be more than enough)
- (Optional) Female pin headers to easily connector the two boards. You can source these c.heaply on alliexpress (or if using an Adafruit Feather Board, they sell the correct size headers but they are more expensive).
* During testing, a Adafruit Feather RP2040 was used. The exists some hardware bug that allows the Feather Wing to backpower the RP2040. As a result, if the floppy drive is powered before the microcontroller, the RP2040 will enter boot_sel mode. Due to this flaw, only M4 firmwares will be distributed.
** Many 3.5 only require a 5v supply (the documentation suggests at least 2amps). Check you floppy pinnout to see what your drive requires. You can use a 4-pin AT / ATX / IDE Molex to Berg Floppy Drive Power Cable (adafruit as sells one) that you can use to plug into a apporpriate supply or use to solder you own barrel connectors.
After you've soldered your boards, connect the microcontroller to your computer and enter boolsel mode (on the M4, double click reset) (you should see a new drive connected). Download the latest .uf2 from the releases page and copy it to the microcontroller drive. Now that your board's firmware is flashed, you can connect everything to your system via the usb of your microcontroller. Configure Zaparoo to use Simple Serial and insert a write-protected disk to launch a game.
If you want to compile from source instead of the prebuilt firmware.
- Download and install the Ardunio IDE.
- Follow the instructions to add your board to the IDE (For the M4, see this page and this page).
- Install the "Adafruit_Floppy" library from the Library Maanger and install any of its dependencies.
- Select your board model to flash and select the com port.
- Change the USB Stack to "TinyUSB"
- Update your board settings to the recommened values in the Adafruit_Floppy libary page. -RP2040: "Overclock to 200MHz and select -O3 optimization for best performance" -M4: "Overclock to 180MHz, select Fastest optimization"
- Compile and upload the firmware.