Gaiares (flickering text on Title screen)

AamirM's Regen forum

Moderator: AamirM

Post Reply
Eke
Very interested
Posts: 814
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Gaiares (flickering text on Title screen)

Post by Eke » Mon Nov 08, 2010 4:26 pm

Image

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.

AamirM
Very interested
Posts: 469
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Wed Dec 29, 2010 7:52 pm

Thanks for pointing this out. I will fix this soon.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest