Close
0%
0%

NetPi-IDE

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.

NetPi-IDE_PoC_schematic.pdf

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

Preview

  • 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?

Share

Discussions

Humpty Dumpty wrote 02/02/2021 at 22:46 point

Is this project still being worked on? Do you plan for the NetPi-IDE to support redbook / cd audio & mixed-mode disc images as well?

  Are you sure? yes | no

BRFud wrote 02/22/2020 at 16:26 point

I look forward to news on this project's development. I was hoping for a device which could serve .iso files of CD-ROM images to a retro host computer that would see the device as an IDE optical drive, and this project seems the closest opensource in that direction.

  Are you sure? yes | no

ferdinandoportel wrote 12/22/2019 at 19:43 point

I eagerly awaits this project evolve to work similarly to the flashfloppy project (for floppy disks emulation). 
however, due to the much larger size of the optical disc images, it would be nice to allow the images to be accessed through a NAS server running on a raspeberry pi 3 or 4

  Are you sure? yes | no

Christof wrote 04/18/2019 at 16:23 point

We use an 2 Gig Flash Module, 40 Pins PATA (IDE) bus with DOS operating system in our machines. We have problems with corrupted data from time to time. This solution would make the maintaining much easier and our working process much more stable. In the past we already managed to switch from floppy disc to IDE and this would help us even further.

@AlanH please contact me if it is possible to send a sample.

  Are you sure? yes | no

aaronvt wrote 03/18/2019 at 17:11 point

is there a repo somewhere for this...  I was looking to do something similar but would rather contribute to an existing project than start from scratch

  Are you sure? yes | no

jurquijo wrote 03/08/2019 at 15:09 point

Excited to see this project start up again! My hope is that someday I'll be able to get one of these running with a Gridcase 1530 laptop - they're VERY particular about which model of hard drive they work with.

  Are you sure? yes | no

AlanH wrote 02/10/2019 at 03:01 point

No just R/L got in the way.  I plan on returning in Summer.  v1 is opensource and working but in a PCjr form factor.  I have a new board design that is much more compact and iCE40up5k based.  I need to start debugging it in a few weeks once things calm down.

  Are you sure? yes | no

ferdinandoportel wrote 02/08/2019 at 06:44 point

was this project abandoned?

  Are you sure? yes | no

jon wrote 02/19/2018 at 16:49 point

How easy would it be to do something like this but with a floppy drive?  Maybe support the HxC HFE Format and store the HFE format floppies on a SD card?  Kind of like a HXC Floppy drive, but more open source :)

  Are you sure? yes | no

James Hall wrote 02/19/2018 at 18:15 point

Would this help you? https://github.com/keirf/FlashFloppy I haven't used it myself but seems like it might work and those usb floppy emulators are not expensive.

  Are you sure? yes | no

Jan wrote 02/18/2018 at 22:33 point

@AlanH Have you considered programming the Pi bare metal for this project? Resources: https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=72260 C++ bare metal environment for Raspberry Pi: https://github.com/rsta2/circle

  Are you sure? yes | no

Lameturtlez wrote 10/25/2017 at 00:16 point

This is great and would solve a ton of problems. We use alot of hardware samplers with ide hard drives and proprietary operating system, if possible please consider me for a board. Im even interested in coding for my architecture.

  Are you sure? yes | no

AlanH wrote 05/07/2017 at 16:59 point

Pusalieth, if you follow the link to the project page at retrotronics.org, you will find links to the ATA specs.  A quick Google search will turn them up too.  Adam, yes XTA is electrically compatible so should be possible with an alternate FPGA load.

I haven't made much progress lately as I help run the Vintage Computer Festival Southeast which was a week ago.  I'm busy editing speaker videos atm.  Once I'm done (~2 weeks), I will return to primary development on this project!

  Are you sure? yes | no

Adam Brisebois wrote 05/07/2017 at 02:34 point

What are the chances of re-tooling this for XTA instead of ATA parameters?  This would breathe new life into several old XT models such as the Tandy 1000 RL / RLX that used the old XTA IDE standard.

  Are you sure? yes | no

Hugh Darrow wrote 05/06/2017 at 19:13 point

Great job man. I've wanted to start similar projects to this in the past, however when I try looking for a spec sheet on the interface I can't find anything. How did you implement an IDE interface in a FPGA? How did you know how to implement it?

  Are you sure? yes | no

Wesley Stevens wrote 04/17/2017 at 22:08 point

I been wanting to see something like this fruit for many years. kennethrlowe There are floppy emulators out there that can work from usb drives btw though little pricey.

  Are you sure? yes | no

kennethrlowe wrote 04/13/2017 at 19:17 point

This is fantastic! I work at a facility that still has a large fleet of DOS boxes and we are sick of using floppy disks to transfer files around. We are very interested in this and I would love to get on the list to receive one of your first run of testing boards!

  Are you sure? yes | no

Gregg C Levine wrote 04/13/2017 at 14:19 point

You were at VCF East? Interesting. This is an interesting project.

  Are you sure? yes | no

AlanH wrote 03/31/2017 at 12:15 point

Thanks.  My near term goal (April) is get rest of my wiki page documented (setup instructions mostly), get the redirector finished, and send the first runs of boards to some testers.  But this weekend I hoping to use the VCF-East as a plug fest for compatibility testing!

  Are you sure? yes | no

Valentin Angelovski wrote 03/31/2017 at 07:22 point

Nice work! :D

  Are you sure? yes | no

Eric Hertz wrote 03/31/2017 at 06:43 point

Cool, I had some thoughts along these lines a while back... I'm definitely interested in seeing this one progress!

  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