Mail Archives: djgpp/1997/04/29/08:05:15
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 <pekangas AT sci DOT fi> wrote:
>On Mon, 28 Apr 1997 12:39:59 GMT, Tom Demmer <DEMMER AT brain1 DOT lstm DOT ruhr-uni-bochum DOT de> 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
- Raw text -