delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/29/08:05:15

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: <slrn5mbioi.297.pekangas@sci.fi>
References: <5E6E9801EF3 AT brain1 DOT lstm DOT ruhr-uni-bochum DOT de> <slrn5m9fk0 DOT qln DOT pekangas AT sci DOT fi>
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019