FCEUX and Prince of Persia

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Eugene.S
Posts: 295
Joined: Sat Apr 18, 2009 4:36 am
Location: Russia (UTC+3)
Contact:

FCEUX and Prince of Persia

Post by Eugene.S » Thu Apr 16, 2020 4:14 am

Hi nesdev.
FCEUX had an obscure bug in OLD-PPU code that was fixed a couple days ago:

https://github.com/TASVideos/fceux/comm ... b359388ac8
https://github.com/TASVideos/fceux/comm ... f33a5f84d7

disable-sprite-in-leftmost-8-pixels part of the oldppu was broken since Nov 7, 2018
Sprites at left side of screen in "Prince of Persia" was affected by this bug.

Zeromus told me:
it broke EVERY game that scrolls
only most people use newppu so nobody noticed
This is strange, because i used 22.03.2019 build very long time and tested
many popular games (~150 titles) on old-PPU, but all of them was correct.
This is main reason why this bug was founded 1.5 years later.

So, what's wrong with Prince of Persia?
And what games potentially affected too?

lidnariq
Posts: 9383
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: FCEUX and Prince of Persia

Post by lidnariq » Thu Apr 16, 2020 9:42 am

The visual bug was that that flag in the PPU was being ignored, and so all 256 columns of sprites were being drawn, causing pop-on/pop-off on the left side of the screen.

Fiskbit
Posts: 117
Joined: Sat Nov 18, 2017 9:15 pm

Re: FCEUX and Prince of Persia

Post by Fiskbit » Thu Apr 16, 2020 10:01 am

I'm not exactly surprised people weren't noticing this. The "latest release" of FCEUX is from 2016. Most users likely never had a version with the bug.

User avatar
rainwarrior
Posts: 7812
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: FCEUX and Prince of Persia

Post by rainwarrior » Thu Apr 16, 2020 10:32 am

Did a quick test and can confirm Super Mario Bros 3., TMNT, and Alfred Chicken all incorrectly had sprites on the left.

Why didn't anyone notice? I dunno. I think most people using the interim versions of FCEUX also use New PPU. (At least, I do.) It's also a fairly subtle bug that shouldn't break anything in a functional sense, just visual error on the edge of the screen? People are very used to there being some garbage on the edge of the screen most of the time, but probably most people wouldn't think hard about the wrong kind of garbage appearing there?

User avatar
Eugene.S
Posts: 295
Joined: Sat Apr 18, 2009 4:36 am
Location: Russia (UTC+3)
Contact:

Re: FCEUX and Prince of Persia

Post by Eugene.S » Thu Apr 16, 2020 10:38 am

Okay, i understand now how this bug works on standard games:
When sprite appears at first 8 left pixels, it must be cleared, but this doesn't happen.

But "Prince of Persia" shouldn't have character sprite at first 8 pixels.
I guess this is game bug, but it was hidden until it meets FCEUX bug:
Attachments
pop.png
pop.png (11.19 KiB) Viewed 620 times
sprite.png
sprite.png (8.63 KiB) Viewed 645 times

Post Reply