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

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
LightStruk
Posts: 42
Joined: Sat May 04, 2013 6:44 am

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

Post by LightStruk » Fri May 31, 2019 11:18 am

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?

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

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

Post by tepples » Fri May 31, 2019 4:48 pm

Have you checked which bank number is getting switched into the player's sprite window on your emulator vs. on Mesen or FCEUX?

User avatar
LightStruk
Posts: 42
Joined: Sat May 04, 2013 6:44 am

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

Post by LightStruk » Sat Jun 01, 2019 6:32 pm

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.

Post Reply