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
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