Low cost IDE/PATA disk emulator using a RPi Zero that also brings wireless networking to vintage computers.

Similar projects worth following
This project aims to design and build a complete parallel ATA (PATA) IDE disk emulator from an inexpensive Raspberry Pi Zero. As the highest band-width interface available on the Pi's GPIO header is SPI, a FPGA is used to maintain the IDE register file and basic I/O state machine. Once IDE commands are issued, the Raspberry Pi services each ATA command from a user space daemon and back to the FPGA for delivery to the host.

The bridge board takes a minimalist approach only including level shifting, 3.3V LDO, and small FPGA - a Lattice MachXO2 at the moment. Future revisions of the carrier board will move to a more open Lattice iCE40HX and the IceStorm synthesis chain.

Additional connectivity can be provided to the host system via ATA vendor commands. A MS-DOS redirector service is being developed to allow 'mounting' of a arbitrary path on the PI as a DOS drive letter. A virtual network interface is also planned.

The over-all features of the project are divided into four basic areas.

1) Disk emulation. One may keep a menagerie of image files representing dozens of configurations, boot disks, application use cases, or special use scenarios. Those images can be selected statically when the Pi process is launched or even changed during run-time when the emulator senses an IDE reset pulse or a ‘Read Identification Sector’ command from the host. Image files can be backed up via Linux facilities (ssh, rsync, ftp, etc). Image file content can be manipulated on the Pi via loop-back mounts, mtools, or even x86 emulators built for ARM.

Image files are stored in a read/write partition of the Raspberry Pi’s micro-SD card used to store the operating system (Raspbian). A user may store as many image files as space allows.

Currently master, slave, or master and slave drive emulation is fully working. One may specify, via config file, the full path to an image file, optional CHS drive geometry to report to the host, IDE disk label, and other attributes. A variety of sizes from 10M to 8GB have been testing thus far.

2) DOS Redirector. Part of the NetPi-IDE project is a utility called PIMOUNT.COM. Pimount allows the mounting of any arbitrary directory on the Raspberry Pi’s file system as a DOS drive letter. This opens up enormous possibilities as that mount point could be an auto-mount path for a USB mass storage stick. It could be a Window’s remote file share via SAMBA. It could be a path the Pi is exporting over the network via SAMBA or NFS. Or it could be a parent directory containing all three! The ability to transfer files to your vintage machine just by dragging and dropping files on a modern Windows 10 box through thin air opens up mind-blowing expansion opportunities!

3) Virtual Network Interface. Plans are being laid to develop a DOS packet driver to transfer 802.1 Ethernet frames to the user space service daemon on the Pi side. There, they will be forwarded to a Linux tun/tap interface where traffic may be routed or bridged to physical network interfaces. IDE vendor commands will be used to marshal frames back and forth.

4) The Pi's serial console is routed to a UART block in the FPGA which is directly mapped to unused IDE registers. Serial data is buffered through a 2K FIFO. This allows any host system to see kernel messages including boot messages and have a guaranteed login to the Pi to perform configuration or troubleshooting without having to connect an external cable.

The project goals emphasis performance and compatibility with as many candidate host systems as possible. It's a bit like having a industrial IDE solid state disk module you can ssh in to.


Proof of concept bridge board schematic built specifically for the PC Jr.

Adobe Portable Document Format - 96.29 kB - 03/30/2017 at 04:10


  • 1 × Lattice LCMXO2-2000HC 2000 LUT FPGA
  • 1 × NXP 74HCT1G126 Single bit tri-state'able buffer
  • 1 × TI SN74LVC16T245DGVR Dual 8-bit dual voltage level shifter
  • 1 × TI SN74LVC8T245DGVR Single 8-bit dual voltage level shifter
  • 1 × ST LD1117D33TR 800mA 3.3 Fixed Low Drop Out Linear Regulator

  • VCF East & Configuration

    AlanH04/10/2017 at 19:01 0 comments

    While on the road-trip to VCF East, I was able to rough-in a basic config file parser in straight C. It loads the file line-by-line unchanged from disk while extracting relevant information. Once a config utility is completed, the loaded config file content will be updated in memory by pattern substitution. This way, user comments, white space, and formatting will be mostly preserved even if the daemon has to rewrite the file. I finished and tested the config file edits when I got home and things seem to be working well. Changes are pushed!

    There wasn't a lot of diverse machines I could test with at VCF-East. But I did gather some contact info of people willing to test and even code on non-x86 platforms. I'll include them in this months board build and distribution. My goal this coming weekend is to finish the redirector (functional but not bug free).

View project log

Enjoy this project?



Yann Guidon / YGDES wrote 03/31/2017 at 00:23 point

That's a wonderful hack !

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates