Request analysis of my glitchy PPU implementation

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Request analysis of my glitchy PPU implementation

Post by clueless » Tue Aug 29, 2017 6:32 pm

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: 9689
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Request analysis of my glitchy PPU implementation

Post by lidnariq » Tue Aug 29, 2017 6:42 pm

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 » Fri Sep 01, 2017 9:11 am

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