acemielektron / fddEMU

AVR (atmega328p) based floppy drive emulator for PC
https://acemielektronikci.blogspot.com/2021/10/fddemu-disket-surucu-emulatoru.html
GNU General Public License v3.0
145 stars 22 forks source link
arduino atmega328p atmega32u4 diy drive emulator floppy

fddEMU

An AVR (atmega328p) based floppy drive emulator for PC
build for atmega328p & atmega32u4
fddEMU on perfboard

fddEMU is a DIY floppy drive emulator. You can immediately begin testing fddEMU on serial terminal with an arduino nano, an SD adapter that converts 5 volts arduino power supply and signals to 3.3 volts suitable for SD card, an SD card, and some jumper cables. Standalone (using without usb serial connection) require SSD1306 i2c screen, buttons and a 5 volts power supply.

fddEMU on breadboard

A very compact and configurable PCB design for fddEMU (created by @ikonko)
Please check documentation and photos for compact PCB for detailed explanation and configuration options. Gerber files are available in hardware folder. Compact multilayered pcb

Limitations

Hardware (Required)

Hardware (Optional)

Pin mapping (single drive) Arduino Pro Micro Arduino Nano FDD Ribbon Cable
GND GND 1 (GND)
RX (PD2) D2 (PD2) 20 (Step pulse)
TX (PD3) D3 (PD3) 18 (Direction)
8 (PB4) D4 (PD4) 16 (Motor on B)
10 (PB6) D5 (PD5) 12 (Drive Select B)
5 (PC6) D6 (PD6) 32 (Select head)
6 (PD7) D7 (PD7) 8 (Index pulse)
4 (PD4) D8 (PB0) 22 (Write data)
9 (PB5) D9 (PB1) 30 (Read data)
7 (PE6) A0 (PC0) 24 (Write enable)
A3 (PF4) A1 (PC1) 26 (Track zero)
24 (PD5 - TXLED) A2 (PC2) 28 (Write protect)
A1 (PF6) A3 (PC3) 34 (Disk changed)


Pin mapping (dual drive) Arduino Pro Micro Arduino Nano FDD Ribbon Cable
GND GND 1 (GND)
RX (PD2) D2 (PD2) 20 (Step pulse)
TX (PD3) D3 (PD3) 18 (Direction)
8 (PB4) D4 (PD4) 14 (Drive Select A)
10 (PB6) D5 (PD5) 12 (Drive Select B)
5 (PC6) D6 (PD6) 32 (Select head)
6 (PD7) D7 (PD7) 8 (Index pulse)
4 (PD4) D8 (PB0) 22 (Write data)
9 (PB5) D9 (PB1) 30 (Read data)
7 (PE6) A0 (PC0) 24 (Write enable)
A3 (PF4) A1 (PC1) 26 (Track zero)
24 (PD5 - TXLED) A2 (PC2) 28 (Write protect)
A1 (PF6) A3 (PC3) 34 (Disk changed)


Micro SD Adapter connections Arduino Pro Micro Arduino Nano Micro SD adapter
A0 (PF7) D10 (PB2) CS
16 (PB2) D11 (PB3) MOSI
14 (PB3) D12 (PB4) MISO
15 (PB1) D13 (PB5) SCK
VCC 5V VCC
GND GND GND


0.96" OLED SSD1306 connections Arduino Pro Micro Arduino Nano 0.96" OLED SSD1306
GND GND GND
VCC 5V VCC
2 (PD1) A4 SDA
3 (PD0) A5 SCL



Resistor ladder for ADC buttons
Connected to pin A7 (ADC7) on Arduino Nano or pin A2 (PF5) on Arduino Pro Micro
Resistor Ladder 1x5

Firmware
Download with submodules(u8glib & lufa): git clone https://github.com/acemielektron/fddEMU --recursive
If not downloaded with recursive option run (in fddEMU folder): git submodule update --init --recursive
Current Makefile assumes avr-gcc and avr-binutils are installed and are in the path, avr specific includes are in "/usr/avr/include" (arch) or "/usr/lib/avr/include" (ubuntu)
run make to build fddEMU.hex with default options.
build options:

Note: Due to larger bootloader on Atmega32U4 and added code overhead for USB-Serial all features of fddEMU will be avaialble on Atmega32U4

Warning: Writing > 28K (28672 bytes) firmware to Arduino Pro Micro results in bootloader being overwritten and requires reprogramming the bootloader using external programmer (eg. USBASP). Please check output of avr-size at the end of make process and make sure it is < 28K.

How to use

How to use (GUI button interface)

How to use (Serial interface)
initial serial output

fddEMU serial interface is used through keys

How to use through host system (Virtual Disk)
-if virtual disk (VFFS) is enabled and loaded- Virtual disk root directory contains a "DISKS" directory, a "DRVA.TXT" file and if DUAL drives enabled a "DRVB.TXT" file. If an SD card is inserted "DISKS" directory contains the file listing of inserted SD card's root directory otherwise it will be empty. "DRVA.TXT" would contain name of the image file loaded the "drive 0" and "DRVB.TXT" would contain name of the image file loaded to "drive 1". Writing the name of an image file to either "DRVA.TXT" or "DRVB.TXT" would result loading requested image file to respective emulated drive upon host releasing the drive. However disk write cache might interfere writing into these files and a cache flush might be required.

Troubleshooting

Acknowledgements

Releases

Note: Please report any errors on github issues for fddEMU. Suggestions for improvements and feedback could be posted on discussions or fddEMU blog page Although the blog page is in turkish, feel free to write comments either in turkish or english.