pata-gpio icon indicating copy to clipboard operation
pata-gpio copied to clipboard

Feature Request - IDE Host

Open hsiboy opened this issue 2 years ago • 5 comments

Hi,

i'm interested in this project, so that the raspberry PI could appear as several IDE devices, specifically ATAPI devices. Following the same functionality as RaSCSI the raspberry pi could be used to mount and present disc images. ATAPI devices for vintage computers and keyboards/samplers are failing (due to their age) and being able to upload CD, Zip (100mb, 250mb and 750mb) disk images and present them as a device would be super useful.

Happy to throw some beer/coffee tokens into the hat to help motivate/support.

Best.

hsiboy avatar Oct 18 '21 10:10 hsiboy

Hi,

yep, I agree, this would be very useful. Unfortunately, due to the strict timing requirements for IDE, this isn't easily possible.

Maybe with a bare metal firmware this could be done, but a regular tool on Linux can't reply on the ATA bus in realtime.

So: Either FPGA help is needed or some very clever bare metal magic.

Manawyrm avatar Oct 18 '21 15:10 Manawyrm

Hi @Manawyrm you make a good point! Interestingly, the RaSCSI project has a "bare metal" version, i wonder then how difficult it is to implement 🤔

hsiboy avatar Oct 30 '21 21:10 hsiboy

Yes, but SCSI is much simpler timing-wise. With SCSI, you get commands and replies. With IDE you need to reply to memory-mapped registers in a very short timeframe. If you dedicate a whole core of the quad core processor to just polling the bus at all times, then it would probably work.

Manawyrm avatar Oct 31 '21 10:10 Manawyrm

@Manawyrm but can it possibly do packet based ATAPI? stuff like PIO mode 4? that's non dma right?

There is two communities specifically (apart from arcade communities who want to use cdrom and dvd roms) that are dying to get their hands on a virtual PIO/ATAPI?, the one is the Roland device owners since the SP808 and various other devices had ATAPI (presumably PIO mode 4) zip drives, and the MC2000 community

there used to be a very expensive device a few years ago that does the job, I think it was 200 buckeroos, but it's no longer happening.

This is in the domain of ground breaking stuff that will change emulation forever, there are probably 50 important devices that need atapi to sd, and the pi could probably deliver that in spades, even read/write

lanmower avatar Oct 07 '23 10:10 lanmower

@Manawyrm but can it possibly do packet based ATAPI? stuff like PIO mode 4? that's non dma right? Sadly not easily. You still need to reply to those registers within the very strict timing requirements, which is going to be very hard on a Pi.

Also: The Pi 3/4 are now "deprecated" and the new Pi 5 won't allow for any of this sort of thing to happen.

On the other hand, there's been rumours about the Pi 5 having the same PIO peripherals as the RP2040/Pi Pico. If that really turns out to be true and we get proper tooling for it, I'm hopeful that there's something that could be done.

Generally, to pull this off properly, you want an FPGA.

Manawyrm avatar Oct 07 '23 13:10 Manawyrm