Hacker News new | ask | show | jobs
by calamari4065 860 days ago
Do you really need DMA if your controller is fast enough and has enough memory? Couldn't you just emulate that behavior with modern hardware?
1 comments

On the PC platform, the floppy is hardwired to DMA channel 2. DMA "channels" were orginally provided by an Intel 8237A DMA controller or compatible, and this is an ISA device.

DMA and FDC controller functionality got taken over by chipsets. ISA became the LPC bus, which still exists - and I believe will keep existing, because TPMs use it. But not sure if modern PCHs include the ISA DMA functionality any more. The floppy was really the only thing that used it.

PC floppies don't have to use DMA, they can use PIO.

So ...

- you need to create a PIO floppy driver for your OS

- you need something that takes floppy controller signals and converts them to LPC (signaling is not the same) and something like that doesn't exist (FPGA hobby project to the rescue)

- you need to wiire that into a modern PC's LPC bus, meaning you need to physically connect those LPC pins to an LPC debug header on your motherboard (if it has one-and if it does, you probably have to add header pins)

- then you need to do something to convert SATA power from the PSU to the floppy's four-pin mini-Molex. I think there's big Molex (IDE hard drives) to double-mini-Molex so with a SATA-to-Molex adapter you can "frakenstein" that.

LPC does DMA just fine, there are off the shelf LPC SuperIO chips with FDD support. There is also this project trying to bring ISA back from LPC https://www.vogons.org/viewtopic.php?t=93291

>ISA became the LPC bus, which still exists - and I believe will keep existing, because TPMs

already superseded by almost 10 year old eSPI. eSPI dropped DMA support.