Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMA timing is wrong during active scan (Bugzilla #43) #43

Open
GerbilSoft opened this issue Mar 30, 2016 · 0 comments
Open

DMA timing is wrong during active scan (Bugzilla #43) #43

GerbilSoft opened this issue Mar 30, 2016 · 0 comments
Labels

Comments

@GerbilSoft
Copy link
Owner

status CONFIRMED severity normal in component vdp/io for ---
Reported in version unspecified on platform All
Assigned to: David Korth

On 2011-09-17 04:42:55 -0400, Javier Degirolmo wrote:

Reporting an issue described some time ago in a forum:
http://gendev.spritesmind.net/forum/viewtopic.php?t=820

This bug is present in Gens and was inherited by Gens/GS.

In real hardware, access to video memory is restricted during active scan, and only a few accesses can be performed (e.g. in the case of VRAM in H40 mode, it's limited to 18 bytes per scanline). During a DMA transfer from 68000 memory (e.g. ROM or RAM), the 68000 is temporarily halted.

Gens emulates this by writing all the data immediately and then adding a delay to 68000 emulation. This isn't noticeable as long as DMA operations remain within blanking time, but this has noticeable side effects if the DMA is performed during active scan, as the contents of VRAM change as the screen is being drawn.

The title screen in Gaiares suffers from this issue. In order to blink the "Press START button" message, it clears all the text and then redraws the copyright message. The reason this works is because the DMA is executed during active scan - it's fast enough to clear the press start text but not fast enough to clear the copyright text (which ends up getting cleared during vblank instead).

A way to fix this would be to emulate DMA transfers every scanline instead of executing all of it at once. This is what Fusion does. Not cycle accurate, but then again the emulator isn't cycle accurate for starters.

On 2013-02-05 11:54:47 -0500, David Korth wrote:

This is on my TODO list, but I have a bunch of other stuff ahead of it in order to get Gens/GS II 1.0_pre1 ready for release.

Since it's not a game-breaking bug, it will probably have a lower priority.

I'm also planning on writing a DMA test suite ROM to test various aspects of DMA, including the "zero-length" bug and 128K wraparound. I'll be sure to include something like this in the test suite.

@GerbilSoft GerbilSoft added the bug label Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant