Page 1 of 1

8x16 sprite glitching in Mapper 69 (Sunsoft 5B / FME-7)

Posted: Fri May 31, 2019 11:18 am
by LightStruk
I added mapper 69 and all of its Sunsoft goodness to my emulator over the last couple of days; now it plays Gimmick! beautifully. I'm encountering a very strange bug in two other mapper 69 titles: Batman - Return of the Joker (U) and Gremlins 2: Shinshu Tanjou (J).

If you make Batman or Gizmo stand still in these games, everything looks fine. If you move them, however, their animations glitch with what could be patterns from the wrong part of CHR. For example, press Up to make Batman look up, and the frame in-between standing still and looking up glitches. Press B to make Batman fire, and the frame of Batman raising his arm glitches, but the frame of him holding the gun outstretched is fine. If you walk, some intermediate frames look like they might contain pieces of the "BATMAN" logo from the title screen.

I know this looks like a bug in my implementation of mapper 69 CHR bank switching, but do these games even switch banks for these animations? These are both CHR-ROM games, so it's not an issue with writing or reading CHR-RAM.

Why would I only see a bug in the player sprite, but only if the player is moving and only if the player's sprite is made up of 8x16 sprites and only if the game is mapper 69?

Any ideas what might be going on?

Re: 8x16 sprite glitching in Mapper 69 (Sunsoft 5B / FME-7)

Posted: Fri May 31, 2019 4:48 pm
by tepples
Have you checked which bank number is getting switched into the player's sprite window on your emulator vs. on Mesen or FCEUX?

Re: 8x16 sprite glitching in Mapper 69 (Sunsoft 5B / FME-7)

Posted: Sat Jun 01, 2019 6:32 pm
by LightStruk
At your suggestion, I just spot-checked some of the bank assignments in the sprite viewer and PPU viewer in Mesen, including (I think) during the frame that glitches in my emulator, and they agree with my emulator. It wasn't exhaustive; I may still have missed something.

The glitches either diminish or go away entirely in the second screen of Batman - Return of the Joker stage 1-1, only to return on the third screen. Again, this implies a CHR banking issue of some kind, since the bank assignments change on those screens as different enemies are swapped in.