From 0dc35ab3e15078342ffe6e06aefd88dde85d69eb Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 22 Feb 2024 00:16:26 +0000 Subject: [PATCH] Make DMA Fill macro actually work. While most of the fill uses the upper byte, the second byte uses the lower byte. I only noticed this because my emulator has to recreate this quirk in order to pass Nemesis's VDP FIFO test ROM. --- s2.macros.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2.macros.asm b/s2.macros.asm index 174afd9c..e277bf29 100644 --- a/s2.macros.asm +++ b/s2.macros.asm @@ -35,7 +35,7 @@ dmaFillVRAM macro byte,addr,length move.l #(($9400|((((length)-1)&$FF00)>>8))<<16)|($9300|(((length)-1)&$FF)),(a5) ; DMA length ... move.w #$9780,(a5) ; VRAM fill move.l #$40000080|(((addr)&$3FFF)<<16)|(((addr)&$C000)>>14),(a5) ; Start at ... - move.w #(byte)<<8,(VDP_data_port).l ; Fill with byte + move.w #(byte)|((byte)<<8),(VDP_data_port).l ; Fill with byte .loop: move.w (a5),d1 btst #1,d1 bne.s .loop ; busy loop until the VDP is finished filling...