nesdev.com
http://forums.nesdev.com/

Glitchy background in TMNT 2
http://forums.nesdev.com/viewtopic.php?f=3&t=14449
Page 1 of 1

Author:  miker00lz [ Fri Jun 24, 2016 6:08 pm ]
Post subject:  Glitchy background in TMNT 2

I searched for this, but couldn't seem to find anything related to my issue. Maybe I didn't look hard enough.

I've had this glitchy BG in TMNT 2 on my emulator forever, and I've never been able to determine the cause. Has anybody else run into this before? Maybe in an early stage in your own emulator... it's fine outside of the levels, like intro screen, character select, cutscenes. That all looks great.

Image

Author:  Zepper [ Fri Jun 24, 2016 6:44 pm ]
Post subject:  Re: Glitchy background in TMNT 2

Let's begin with... your rom crc (32-bit checksum).

Author:  miker00lz [ Fri Jun 24, 2016 7:03 pm ]
Post subject:  Re: Glitchy background in TMNT 2

0xA9217EA2

Don't think there's anything wrong with the ROM, it works fine in any other emulator.

Author:  Zepper [ Fri Jun 24, 2016 7:04 pm ]
Post subject:  Re: Glitchy background in TMNT 2

Ok, it seems correct.
It's a mapper 4 game (MMC3). How is your PPU IRQ timing code?

Author:  miker00lz [ Fri Jun 24, 2016 7:18 pm ]
Post subject:  Re: Glitchy background in TMNT 2

Well I'm decrementing the counter on any PPU read where the address line transitions from low to high on bit 12 then doing the IRQ when it wraps around. I can't think of any other MMC3 games that don't look right in it.

Author:  koitsu [ Fri Jun 24, 2016 7:30 pm ]
Post subject:  Re: Glitchy background in TMNT 2

Looks like they're changing CHR pages with the IRQ counter (i.e. changing CHR pages at a scanline). It appears they're changing out the CHR-ROM that maps to $0800-0FFF, happening "after" the status bar all the way to where the fire happens. The only thing I can't explain is the CHR swap that's happening on the scanlines near the doorway and under the painting on the left... I would think a lot more would be changing than just that.

Okay, checked it out in no$nes instead -- I highly recommend you do so too. Go to the VRAM Viewer, BG Map tab and take a look. You'll see the exact same behaviour there. So yeah, it's intentional.

Sprite 0 is not involved in any of this (just noting that here in case someone wonders).

Author:  miker00lz [ Sat Jun 25, 2016 10:08 am ]
Post subject:  Re: Glitchy background in TMNT 2

I suppose reviewing my bank switching code closely is a good start.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/