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

Debug tiles occasionally render all white in Gameboy Color games #18

Open zeta0134 opened 5 years ago

zeta0134 commented 5 years ago

With certain games, the debug tile window renders all white. Other debug areas (backgrounds, sprites, etc) and the game screen aren't affected:

tetris_dx_title

As far as I can tell in my testing, affected games show no debug tiles throughout the entirety of their gameplay, regardless of which backgrounds are enabled or what the background palettes get set to.

zeta0134 commented 5 years ago

... d'oh. Looks like affected games are writing to a background palette. The DMG background palettes, specifically, which aren't used in Gameboy Color mode. Some games write 0x00 to these registers during their initialization sequence, which renders as all white.