zeta0134 / LuaGB

A gameboy emulator written in pure Lua. Work in progress.
BSD 3-Clause "New" or "Revised" License
410 stars 33 forks source link

Zelda - Oracle Games - Missing Black Bars during Intro #16

Open zeta0134 opened 5 years ago

zeta0134 commented 5 years ago

The Oracle games have been excellent test cases for the new features of the Gameboy Color. Their intros in particular make heavy use of scanline updates and palette swap trickery, and getting them to render correctly requires the emulator to be quite accurate with regards to its timing and graphics modes.

Something is still not quite right though. The game is supposed to be triggering an hblank interrupt to switch to the lower set of black bars here, and that never happens, leading to a glitched result:

zoos_intro_black_bar zooa_intro_black_bars

I suspect there's something inaccurate with either the timing of LuaGB's graphics modes, or the way it handles the LCD STAT interrupt, which is probably what the game is using to trigger an interrupt on each scanline where it needs to make a change.