Dwedit / goombacolor

GBC/GB emulator for GBA
33 stars 1 forks source link

Display issue with homebrew game "Gameboy Wordyl" #1

Open PrgmrAtHrt opened 2 years ago

PrgmrAtHrt commented 2 years ago

I noticed that when booting said game in goomba color in gbc mode (Prefer GBC over SGB) with the auto border setting turned off, the background of the opening screen appears black instead of white. When the auto border setting is turned on, the background is white as it should be albeit with the sgb border now being shown.

goomba bugged goomba normal

Dwedit commented 2 years ago

Goomba Color isn't initializing the tile maps at all, it's just clearing all the GBA tile map memory to 00 bytes.

For a zero-filled GBC tilemap, the GBA tilemaps should be:

But instead, the game never initialized the GBC's tile map, so Goomba Color was defaulting to 00 bytes for GBA map tiles.

If that happens, then the GBA background color bleeds through to the screen, and it is black. Normally the GBA background color is never seen, since there are two layers of Color 0 tiles covering it up. But with a border visible, it's possible to run out of layers, so Goomba Color is assigning the first background color to the Main GBA background color, so the White color was getting shown instead of the Black color.

The game really should be clearing the tile map, and not just leaving it in the post-bootrom state. There's still a Nintendo logo left on the screen that needs to be erased.

But it is a bug that Goomba Color should provide something better on the screen if the game failed to initialize the tile map.