#include "hwregs.h"
#include "vdp.inc"
+
| dma_systovram(vmem_addr, src, count)
.globl dma_systovram
dma_systovram:
| set source address
move.l 8(%sp), %d0
+ lsr.l #1, %d0
move.l %d0, %d1
vdp_setreg_reg VDP_REG_DMASRCL, %d0
lsr.w #8, %d1
or.w #(VDP_VRAM_DMA & 0xf0), %d1
| last word needs to come from RAM, so we push it on the stack
move.w %d1, -(%sp)
- move.w (%sp), VDP_CTL_PORT
- add.l #2, %sp
+ move.w (%sp)+, VDP_CTL_PORT
| after DMA ends the cpu can continue, turn DMA off
vdp_setreg VDP_REG_MODE2, VDP_M2_INIT + VDP_M2_DISP
rts
-
+
| vi:ft=gas68k: