SourMesen / Mesen-S

Mesen-S is a cross-platform (Windows & Linux) SNES emulator built in C++ and C#
GNU General Public License v3.0
415 stars 100 forks source link

GB: Tetris DX doesn't display SGB content #152

Open redacted173 opened 4 years ago

redacted173 commented 4 years ago

Tetris DX doesn't display the SGB content (background image) in either SGB1 or SGB2 mode. It looks like the first SGB packet sent after the second GB CPU reset is missed by the BIOS by one NMI (frame). The missing packet is probably the cause. I don't know the SGB BIOS very well, but it looks like it counts frames (stored in $0102) and only after that counter reaches 9 does it check the packet ready bit at $6002. $0102=1 seems to take multiple frames, but one of the later states (not always the same one?) seems to skip a frame, too. Tetris DX may send the packets earlier than other SGB enhanced games that work.

The game still runs so this is a relatively minor problem.