FDC programming

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ManOfSteel

FDC programming

Post by ManOfSteel »

Hello,
Before using the DMA for my floppy driver, I would like to fully understand how the FDC itself works. That's why I will first be using the FDC without the DMA then programming it to use the DMA.
My question is how to actually read a sector. I know approximately how to send the read command then the parameters (drive, sector, track, ...) but when these are done, I don't know what to do next, especially from where do I load the read sector. I know it's done by reading the data port (1f0) with hard drives but how to do it with floppies.
Thank you in advance.
ManOfSteel

Re:FDC programming

Post by ManOfSteel »

Hello,
Ok, since I have no reply in that field, I will try to skip the direct access to the FDC, and will switch to the DMA technique.
I know a bit what's the purpose of the DMA and that it uses one of its channels (2, IIRC) to communicate with the FDC. I read some documents about the DMA but didn't find any useful information about using it with the FDC, most of them being about how to use it for sound transfer with sound blaster cards. I also read some old posts here and in other forums but wasn't so much satisfied.
So, I would like to have a small "synopsis" of what I have to do to, let's say, read a sector using the DMA (like you set up this, you set up that, you send this, you send that, ...).
Also, if I don't have to use the FDC ports when using the DMA, then how do I send commands to do useful things like reading or writing a sector? Or do I still use some FDC ports, after all????
I realy need help.
Thank you in advance.
grinny

Re:FDC programming

Post by grinny »

EduOs has a nice example (http://eduos.sourceforge.net/) with dma and maybe http://www.isdaman.com/alsos/hardware/fdc/floppy.htm helps too.

grinny
Post Reply