I'm at my wits end here. I'm slowly updating my framework to use DMA for all VDP transfers, and I've been trying to figure out why I can't do a DMA from ROM to CRAM. It works fine with an intermediary buffer in work RAM.
I'm following these instructions from Sega2f.doc:
so to ensure these conditions are met, the final address write is split into two word-size moves, and the values come from the stack:Source address are $000000-$3FFFFF(ROM) and $FFOOOO--$FFFFFF(RAM)
for memory to VRAM transfers. In the case of ROM to VRAM transfers,
a hardware feature causes occasional failure of DMA unless the
following two conditions are observed:
--The destination address write (to address $C00004) must be a word
write.
--The final write must use the work RAM.
There are two ways to accomplish this, by copying the DMA program
into RAM or by doing a final "move.w ram address $C00004"
Code: Select all
move.l d0, -(sp)
move.w (sp)+, vdp_control
move.w (sp)+, vdp_control
I've verified the source address is word aligned.