DMA failure on different consoles.
Posted: Mon Oct 31, 2016 8:12 pm
Hi, after months without being able to work on my project, I'm programming my rom again. I'll try to explain the best i can the problem i have.
I hope any of you can help me to fix this error.
The pistol's tiles are DMAed to VRAM. The text tiles are filled to the VRAM by writting them using data port using a MOVE loop.
I tried to transfer the pistol's tiles using DMA and tested the rom on the consoles that i got access.
This is a pic testing the rom on my own console. It works fine and i dont get any glitches. Tested on MegaEverdrive.
This is what i get on my friend's console. Tested on Everdrive.
This is the fragment of my code that i use to fill the VRAM using DMA
I dont have any idea why on different consoles the same code results on a different behaviour.
What can be causing this DMA failure?
Really thank you for your help.
I hope any of you can help me to fix this error.
The pistol's tiles are DMAed to VRAM. The text tiles are filled to the VRAM by writting them using data port using a MOVE loop.
I tried to transfer the pistol's tiles using DMA and tested the rom on the consoles that i got access.
This is a pic testing the rom on my own console. It works fine and i dont get any glitches. Tested on MegaEverdrive.
This is what i get on my friend's console. Tested on Everdrive.
This is the fragment of my code that i use to fill the VRAM using DMA
Code: Select all
DMATOVRAM equ $40000080
******** Entrada: D0 number of bytes/words
******** D1 = 3 bytes DMA source
******** D2 = 2 bytes DMA destination
DMAGEN:
MOVE.W #$8F02,$00C00004 * increment 2 bytes
MOVE.W #$8174,$00C00004 activate dma
MOVE.W #$9300,D4 * Low Counter
OR.B D0,D4
MOVE.W D4,$00C00004
ASR.W #8,D0
MOVE.W #$9400,D4 * High Counter
OR.B D0,D4
MOVE.W D4,$00C00004
LSR.L #1,D1
MOVE.W #$9500,D4 * Low source adress
OR.B D1,D4
LSR.L #8,D1
MOVE.W D4,$00C00004
MOVE.W #$9600,D4 * MID source adress
OR.B D1,D4
LSR.L #8,D1
MOVE.W D4,$00C00004
MOVE.W #$9700,D4 * High source adress
AND.B #%01111111,D1
OR.B D1,D4
MOVE.W D4,$00C00004
ASL.L #2,D2 * Destination address and operation
LSR.W #2,D2
SWAP D2
OR.L #DMATOVRAM,D2
MOVE.L D2,$00C00004
RTS
What can be causing this DMA failure?
Really thank you for your help.