Atari.Org
Click Here
HomeNewsServicesForumsSupport

Talk Atari

Atari.Org Forums


16/32-Bit

8-Bits

Classics

Emulation

Jaguar

Lynx

Classic Consoles Forum 8-Bits Forum 16/32 Forum
Emulation Forum Jaguar Forum Lynx Forum
 
 Subject: RE: DMA Memory2memory.
Author: SoLo2 (80.58.20.170.proxycache.rima-tde.net)
Date:   03-19-2004 15:23


Here is a little explanation as some
persons didn't seem to understand
the purpose of DMA memory2memory.

Thanks to the only answerer. Sadly
he was talking of another concept:
STe's sound DMA. I am talking of
old ST's FD/HD DMA capabilities.

DMA is a chip that has some memory
in it. 16 Bytes does it have.
Normally, in the Atari ST, it copies
memory from main RAM into itself
(buffering)
and out to Hard Disk or Floppy Disk.
And the other way round: from HD, FD
into its buffer and out to main memory.
All this with a little cooperation from the
68000 processor.
I wish to use its buffer capabilities to
copy from RAM into DMA chip, and then
from DMA chip back to RAM. Without
sending to FD or HD. This way I could
spare processor time, while memory
is being shifted.

thanks,
SoLo2

The following code does not work
but gives the idea of what I am
trying to do.


; D0.L=memory source
; D1.L=memory destination
DMATransfer
; XBIOS Traps:
; $2A DMARead, $2B DMAWrite
movem.l d0-d1,-(sp)

; address register
; set memory address
move.b d0,$ffff860d
lsr.l #8,d0
move.b d0,$ffff860b
lsr.l #8,d0
move.b d0,$ffff8609

; counter register
move.w #1,$ffff8604

; mode register
; bit 2: A1, Floppy Controller
; bit 3: HDC=1, FDC=0
; bit 7: get DMA buss=1
; bit 8: out of memory=1,
; into memory=0
move.w #$000,$ffff8606

; read trigger
move.w $ffff8604,d0

move.w #200,d0
DMAWait nop
dbra d0,DMAWait

; address register
; set memory address
move.b d1,$ffff860d
lsr.l #8,d1
move.b d1,$ffff860b
lsr.l #8,d1
move.b d1,$ffff8609
; write trigger
move.w #$80,$ffff8604

; counter register
move.w #1,$ffff8604

; mode register
; write into memory=1,
; read from memory=0
move.w #$100,$ffff8606

; write trigger
move.w #1,$ffff8604

movem.l (sp)+,d0-d1
rts



 Topics Author  Date
  DMA Memory2memory. new SoLo2 03-17-2004 22:09 
   RE: DMA Memory2memory. new joe 03-18-2004 07:24 
    RE: DMA Memory2memory. new Ragstaff 03-18-2004 12:03 
     RE: DMA Memory2memory.  SoLo2 03-19-2004 15:23 
      RE: DMA Memory2memory. new The Paranoid 03-19-2004 17:51 
       RE: DMA Memory2memory. new Greenious 04-03-2004 14:49 

 Reply To This Message
 Your Name:
 Your Email:
 Subject:
 Human verification:   What's this?
               _    __     _ _     
 _ __  ___ _ _| |_ / _|___| (_)___ 
| '_ \/ _ \ '_|  _|  _/ _ \ | / _ \
| .__/\___/_|  \__|_| \___/_|_\___/
|_|                                
    



Copyright © 1997-2024 Atari.Org 
Atari is registered trademark of Infogrames