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
SpiglerG

fdc programming

Post by SpiglerG »

i'm programming the floppy disk driver for my os.
i searched all over the net but there aren't many documents.
so i ask you: how could i program the fdc?
i don't need code, only specifications like: how to reset the drive, how to do the seek function, how to write/read sectors(ie: what command send to what port).

please help me.
SpiglerG

Re:fdc programming

Post by SpiglerG »

ok. if i'll need more help i'll ask.
Xardfir

Re:fdc programming

Post by Xardfir »

Just a quick reccommendation on setting up your DMA for the floppy:
Older PC's (and Bochs) like the DMA settings at 'single transfer'.
Newer PC's (and real hardware) prefer 'demand transfer' as the newer disk controllers have have built in FIFO's to speed things up.
I doubt the Bochs developers will implement the FIFO's as programmers can't access them via software and it would just add overhead. 'Auto initialisation' also works well if set up correctly as the DMA chip can reset itself to the beginning of a buffer once a track of sector has been read.
Finally always allocate a DMA buffer on a 64k boundary and never read more than 64k at a time. This is a wonderful feature brought to you by IBM.
Also a lot of the functions of the dma controller DO NOT function as IBM left a lot of the chip's connections unconnected. DMA programming is probably the worst part of programming a floppy driver.
Post Reply