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
|