Page 1 of 1

New Down and Dirty Gameboy VRAM Timing Document

Posted: Tue Jun 14, 2011 10:08 am
by kevtris
Well, I've been busy making an FPGA Gameboy now, and to further that goal I have extensively tested the GB hardware.

I stuck my logic analyzer on the VRAM bus and LCD signals to see exactly what is going on when I run a test ROM and adjust the scroll, window, and sprites.

So far, I have gotten all the exact VRAM timing down for the background and window stuff, and I am finishing up sprites.

Unlike the NES, the Gameboy will actually stall the pixel writes to the LCD while it "catches up" with the VRAM reading. This causes the rendering portion of a scanline to take more or less cycles, depending on the X scroll, X window, and number and position of sprites.

So, without further ado, here is my findings document. It's highly preliminary and I have yet to add the sprite information, but I will be adding that soon since I am almost done implementing that.

http://blog.kevtris.org/blogfiles/Nitty ... Timing.txt

Also, if anyone wants a decent test ROM for playing with scrolling, windowing, and sprites, I made one of those too. It's been tested on a real Gameboy of course (since I'm running it on my Super GB for testing) and it has been tested on an original DMG and a GB pocket.

http://blog.kevtris.org/blogfiles/gbtest.gb

I posted the source code to the test rom, too:

http://blog.kevtris.org/blogfiles/gbtest.asm

Posted: Wed Jun 22, 2011 10:39 pm
by Lord Nightmare
Am eagerly awaiting updates! Fascinating stuff!

LN

Posted: Fri Jul 29, 2011 8:45 pm
by 3gengames
I was just watching AVGN and noticed a GB game that also does funky scrolling stuff. Thought it'd be interesting to see the games that do stuff with precise timing, I couldn't find the exact forum post though.

http://cinemassacre.com/2008/08/10/batman-part-2/

5:26 in. Good job too, kev!!! :)

Posted: Fri Jul 29, 2011 8:59 pm
by tokumaru
3gengames wrote:I was just watching AVGN and noticed a GBA game that also does funky scrolling stuff.
That's not a GBA game...
It looks like the water effect was supposed to flicker between the waving background and the solid color with waves at the top, but it looks like shit in that video capture/encode. Now I'm curious to see the original effect...

Posted: Fri Jul 29, 2011 10:22 pm
by Memblers
The original Gameboy screen blurred very easily with any motion, so I bet it looked cool on there. But on GBA, SGB, and emulators, probably not as much. (tho I never had a GBA so I don't know how much it blurs)

Posted: Sun Aug 21, 2011 5:12 pm
by Dwedit
The GBA/DS screen makes perfect 30Hz flicker look like 50% transparency.

Posted: Sun Oct 30, 2011 2:31 pm
by Drag
I actually found this very fascinating to read, thank you very much for putting the time in to research this and form this document. I'd be interested in seeing any further developments. :D

Posted: Wed Jan 18, 2012 7:46 pm
by beannaich
Sorry for the necro bump, but is there any chance you could divulge the sprite fetch timing information? I've been looking for a low-level graphics timing document for GameBoy for a while now, and it would be absolutely beautiful to know how sprites affect timings :D

Great work Kev, this document is just awesome!