AamirM's Regen forum
2 posts • Page 1 of 1
The bug happens in Regen (and Gens) but not in Kega.
This is the first game I found that actually needs a limited number of DMA writes to be performed on a line.
What it does, in order to simulate a blinking "Press Start" message, is that, approx. each 10 frames, it erases the whole Window Plane (setup to be displayed in the bottom area) then writes the bottom text again, using 2 consecutive DMA operations.
The first DMA that clears the plane is triggered during active display and if you perform all the writes immediately then emulates the DMA timing (i.e hangs the CPU until DMA is theoretically finished), the bottom text will not be displayed. Then (normally during VBLANK) the 2nd DMA is triggered and on next frame, the bottom text will be displayed fine.
This results in a flickering text when it should be perfectly stable (as verified on real hardware). The reason is that, on real hardware, the writes that erases the bottom text are performed at the start of VBLANK, so you don't notice anything as they are refilled immediately.
To fix that, you need to perform only a fixed number of writes per line when processing DMA. Off course, depending on your code, it might not be straight-forward implementation. I had to take care of long word writes that triggers a DMA and change internal registers (code, address, DMA,...) in the same instruction, as the 2nd write is supposed to be done AFTER the DMA is finished.
Who is online
Users browsing this forum: Google [Bot] and 1 guest