Donkey Kong Land 2 timing [solved]

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Donkey Kong Land 2 timing [solved]

Post by zeroone »

Can anyone shed some light on how Donkey Kong Land 2 performs its frame timing? It does not appear to depend on interrupts. Rather, it seems to work its magic by polling LY and the LCD Control Register.

The timing appears to be slightly off in my emulator. Sometimes it writes to VRAM for a full extra scanline after VBlank. Other times it starts writing to VRAM a few dots before HBlank. If I allow it to write to VRAM at arbitrary times (which is not how the hardware works), the game appears to function normally.
Last edited by zeroone on Mon Dec 25, 2017 1:18 pm, edited 2 times in total.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Donkey Kong Land 2 timing [solved]

Post by zeroone »

BGB confirms inaccessible VRAM writes and the game functions normally even when these writes are blocked. It's strange, but it functions.
Post Reply