Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Occasional Corrupt Map Tiles #1
I'm not programming using this engine myself, but there's a visual issue I've seen in Super Princess' 2092 Exodus and Luna, so I suspect it's a bug in the engine, and so I thought I would file a ticket.
Sometimes when scrolling the engine appears to incorrectly decode or assign a map tile, resulting in a corrupt appearance. The tile remains in its incorrect state as long as it remains on-screen. If I scroll the tile off-screen and then back on-screen the issue goes away. Unfortunately, I don't have a reliable way to force the issue to happen. It just happens somewhat rarely seemingly at random.
I have attached photos of the bug expressing twice in Luna. Look towards the top-left corner. Again, I saw the issue once or twice in Super Princess' 2092 Exodus, but I lack any screenshots of the issue there.
So after a bit of investigation I found out the function set_bkg_tiles can fail writing into vram sometimes because of the vblank interruption that I am using. I have coded a new function SetTile faster than set_bkg for one tile and that also checks out on exit if the stat_reg marks vram in modes 0 or 1 (writable) and otherwise it tries it again.
Changes are in this commit