Open ISSOtm opened 3 years ago
When a new border is loaded the SGB first copies the tilemap of the empty black border at address $028E90 which is filled with tile 1 (address $0020) to VRAM address $7800 (word address $3C00). Normally tile 1 is a non-transparent tile with black palette. After that the new tilemap is copied. So if the black border is selected then it copies it twice.
Quartet puts a transparent tile at tile address $0020 with a single row of non-transparent black pixels at the bottom. When the SGB copies the tilemap of the black border the Gameboy background color is white so the white color is visible through the transparent tile except for the black line at the bottom of the tile.
Then the SGB copies the new tilemap from Quartet which is filled with tile 0 and that tile is fully transparent so the lines disappear.
Then why does it not occur with other games? The cracktro, for example, uses a different border, byt IIRC is not subject to this despite having a non-blank tile 1.
The cracktro has a non-transparent tile 1 that's why it doesn't occur. Quartet has a transparent tile 1 (except for the bottom row of pixels) so the white background comes through.
Games can avoid this issue by using a non-transparent tile 1 or by making sure that the Gameboy background color is black while using MASK_EN
For some reason, during Quartet's initial load, the border briefly flashes with dark lines. Investigate and document why. (Note: if the bugs ends up fixed on that download page, it's still present in the cracktro.)
Tip: the bug reproduces on Mesen-S, which has both a GB and SNES debugger, so it should be easier to figure out.