DMA Help

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
jake12
Posts: 14
Joined: Mon Nov 24, 2008 7:03 pm

DMA Help

Post by jake12 »

Hi.

With Floppy DMA, if I do not support paging which address should I use? I have tried to set it up using 0x00000000 and it worked but not on real-hardware. I also tried to send it a unsigned char buffer[512], but it doesn't seem to write to that buffer as it never changes neither on real or emulated hardware. I followed the guide in the wiki to build my dma setup function (translated to C), so it isn't anything fancy, but it should still work. Can someone please advise me on what to do when setting up DMA for floppy usage? I don't have a kmalloc function but I have memset and memcpy and again I am not supporting paging. thanks
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: DMA Help

Post by Combuster »

Not enough information.

The DMA article has everything about placement restrictions. The floppy might error several times before reading successfully (especially on real hardware) so I'd start looking there first.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
jake12
Posts: 14
Joined: Mon Nov 24, 2008 7:03 pm

Re: DMA Help

Post by jake12 »

Thank you. That was helpful. However, I have decided to try another way. I wonder if it is reasonable to assume that if I:

copy stage2.bin+file1.txt

Then when my stage2 is being loaded if I extend its size by the size of file1.txt (will have to be estimated this way) if it would be reasonable to assume that file1.txt will exist in memory contiguously behind stage2. Does this idea seem reasonable or should I go back to the drawing board?
jake12
Posts: 14
Joined: Mon Nov 24, 2008 7:03 pm

Re: DMA Help

Post by jake12 »

It appears I was right (with some variation of theory), thus no need for a 32bit fdc driver. Which is a relief. thanks
Post Reply