From: pekangas AT sci DOT fi (Petteri Kangaslampi) Newsgroups: comp.os.msdos.djgpp Subject: Re: Need help on DMA transfer Date: 29 Apr 1997 10:18:08 GMT Organization: Scifi Communications International Oy, http://www.sci.fi/, helpdesk AT sci DOT fi, 03 2899111 Lines: 36 Message-ID: References: <5E6E9801EF3 AT brain1 DOT lstm DOT ruhr-uni-bochum DOT de> Reply-To: pekangas AT sci DOT fi NNTP-Posting-Host: sci.fi To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk OK, following up myself. I managed to screw up the original, and thought the post never made it anywhere, but apparently it got sent anyhow. So, here are the rest of my points: On 28 Apr 1997 15:12:16 GMT, Petteri Kangaslampi wrote: >On Mon, 28 Apr 1997 12:39:59 GMT, Tom Demmer wrote: >> /* These ones are self-explaining, but how to do it? */ >> set_dma_count( ibdma, rwop->io_cnt ); >> set_dma_addr ( ibdma, rwop->io_pbuf); Simply write the address and count to the correct registers - see, for example, the Allegro _dma_start code. >> if (rwop->io_flags & IO_READ) { >> set_dma_mode( ibdma, DMA_MODE_READ ); >> } >> else { >> set_dma_mode( ibdma, DMA_MODE_WRITE ); >> } Just one out to set the correct mode >> enable_dma( ibdma );/* enable Host side DMA transfers */ Allegro outportb(tdma->single, tdma->dma_enable). Essentially sets/clears the channel mask. >> disable_dma( ibdma ); Likewise, just the other way around. Petteri