X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdma.S;h=8cec2e390d1bdd9a77d21dbfbb3710a91c7cb549;hb=HEAD;hp=b3f9d869dc9023885bb4563e9bddf4d40734d09a;hpb=88989dba0a2f0b59d782d25e01227df04452e8d3;p=mdlife diff --git a/src/dma.S b/src/dma.S index b3f9d86..8cec2e3 100644 --- a/src/dma.S +++ b/src/dma.S @@ -3,6 +3,7 @@ #include "hwregs.h" #include "vdp.inc" + | dma_systovram(vmem_addr, src, count) .globl dma_systovram dma_systovram: @@ -10,6 +11,7 @@ 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 @@ -34,11 +36,10 @@ dma_systovram: 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: