The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: liquidsilver on July 25, 2005, 09:42:55 AM

Title: DMA and Floppy
Post by: liquidsilver on July 25, 2005, 09:42:55 AM
I'm busy with my own os: http://www.cogs.run.to

I can't get a floppy driver to work, and I'm not sure if I need DMA (I though DMA was for quick transfers of memory, but why would you need that?) Can any of you please help.
Title: Re: DMA and Floppy
Post by: BogdanOntanu on July 25, 2005, 10:27:42 AM
You do not need DMA since the CPU is fast enough to do those transfers...
BUT
the DMA channel is hard wired for the floppy (DRQ and DACK lines) so if you do not use it...then it is wasted since it can not be used for something else.

Also setting the FDC to work without DMA is a little bit more subttle. If i remember corectly one of the first SoarlOS versions did have a floppy driver that was not using DMA for the floppy disk...

Title: Re: DMA and Floppy
Post by: arafel on July 25, 2005, 11:56:30 AM
liquidsilver, DMA is used to relieve some workload from the CPU when doing memory transfers. Without dma, all tasks concerned to mem. addresses validation/increment/decrement are handled by cpu.
If you want I could send you a very simple example of floppy disk driver (read/write + dma transfers) from a hobby os project I was working on some time ago.
Title: Re: DMA and Floppy
Post by: MichaelW on July 26, 2005, 05:36:47 AM
The MMURTL OS used DMA transfers for the floppy drives, and the complete source is available here:

http://www.sensorypublishing.com/mmurtl.html



Title: Re: DMA and Floppy
Post by: liquidsilver on July 26, 2005, 09:18:42 AM
Thanx guys, I think I understand now.

arafel: could you send me those things, please (flash.slash@gmail.com)
Title: Re: DMA and Floppy
Post by: thomasantony on July 31, 2005, 06:01:09 AM
Hi,
  I haven't worked on my OS for a long time but it does have a floppy and DMA driver. Check out RooOs at www.tomasm.tk . BTW thanx for listing my site in yours

Thomas :U
Title: Re: DMA and Floppy
Post by: liquidsilver on July 31, 2005, 12:45:32 PM
I got it working! (see 0.03 on my site)

I never new RooOS had floppy support. Why didn't you include it in 1.2?

BTW: The reason I included you was because your code was a great help when I started, especially with interrupts. I included credits in the kernel.asm file.