Request analysis of my glitchy PPU implementation

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Request analysis of my glitchy PPU implementation

Post by clueless »

Hello. I am writing a NES emulator as a C++ library (with no dependencies) to be used as a component in a different project. I've written a Gtk "host" binary to test the emulator. I pass all of the "nestest.nes" CPU tests, plus dozens of my own CPU and PPU unit tests.

My PPU implementation is glitchy when scrolling The Legend of Zelda (in any direction) [1]. I've compared my PPU source code with 5 or 6 other emulators on github and I am unable to spot where I've screwed up. I was hoping that the nesdev wizards would be able to suggest things for me to re-examine based on the PPU behaviour and known behaviour of the game, as seen in the video.

My emulator plays non-scrolling games like Donkey Kong just fine, and scrolling in Final Fantasy 1 (single-screen mirroring) looks correct.

Thank you for your time.


[1] https://youtu.be/iDB1xCtqshw
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Request analysis of my glitchy PPU implementation

Post by lidnariq »

That looks like a bug in your MMC1 implementation, not PPU.
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Request analysis of my glitchy PPU implementation

Post by tehcloud »

I agree that it is probably more MMC1 related, but it looks like you have sprite 0 hit issues too. That could be rooted in the MMC1 issues, however.
Post Reply