hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.09k stars 2.16k forks source link

FPS counter doesn't work properly with software render #19217

Open foxsevent opened 4 months ago

foxsevent commented 4 months ago

Game or games this happens in

ULUS10478 SpongeBob's Truth or Square,

What area of the game

Whole game except video files playback. Other game affected Dante's Inferno - ULUS10469 That being said the game doesn't seem to actually run slower so maybe somethings of with the counter, afterburner shows 60fps in both modes. Bez tssssytułu

Speed seen in PPSSPP

100% 40/40 hardware, 100% 60/60 software

GE frame capture and debug statistics

No response

Platform

Windows

Mobile device model or graphics card (GPU)

Windows 10, AMD RX7900 GRE

PPSSPP version affected

Both stable 1.17.1 and latest dev build.

Last working version

None, issue is present even in the oldest version of PPSPP available v1.14.4-622

Graphics backend (3D API)

Direct3D 11

Any other notes or things you've tried

No response

Checklist

Deka710 commented 4 months ago

try overclock the CPU in system setting

foxsevent commented 4 months ago

try overclock the CPU in system setting

Did try that, even at 1000mhz it's still just 40fps.

Deka710 commented 4 months ago

try overclock the CPU in system setting

Did try that, even at 1000mhz it's still just 40fps.

maybe the game indeed runs at 40fps, iirc dante inferno also 40FPS game, u need cheat for 60FPS.

foxsevent commented 4 months ago

try overclock the CPU in system setting

Did try that, even at 1000mhz it's still just 40fps.

maybe the game indeed runs at 40fps, iirc dante inferno also 40FPS game, u need cheat for 60FPS.

Maybe but then why does the FPS counter report it as 60fps in software mode?

Deka710 commented 4 months ago

try overclock the CPU in system setting

Did try that, even at 1000mhz it's still just 40fps.

maybe the game indeed runs at 40fps, iirc dante inferno also 40FPS game, u need cheat for 60FPS.

Maybe but then why does the FPS counter report it as 60fps in software mode?

maybe innacaurate because i tried 30fps game and it show 60fps in software mode.

Deka710 commented 4 months ago

Screenshot_2024-05-31-05-24-33-629_org mozilla firefox i guess its similar in spongebob's truth or square

foxsevent commented 4 months ago

There seems to be 3 values in that file regarding fps.

MaxFPS = 40 PSPMipAdjustMinFps=30 PSPMipAdjustMaxFps=31

No such file sadly in Sponngebob. Not even frametimes match up. B2ez tytułu B1ez tytułu

This is with the 60fps cheat. B1ez tytułu

So these games are probably just running at 40fps but im still curious why software mode reports it as 60

foxsevent commented 4 months ago

try overclock the CPU in system setting

Did try that, even at 1000mhz it's still just 40fps.

maybe the game indeed runs at 40fps, iirc dante inferno also 40FPS game, u need cheat for 60FPS.

Maybe but then why does the FPS counter report it as 60fps in software mode?

maybe innacaurate because i tried 30fps game and it show 60fps in software mode.

Yeah you're right even 30fps games are reported as 60fps, weird. Im also curios how many games are there that run at 40fps on the PSP and why?

Panderner commented 4 months ago

Dante's Inferno & SpongeBob's Truth & Square are capped at 40 fps.

foxsevent commented 4 months ago

Dante's Inferno & SpongeBob's Truth & Square are capped at 40 fps.

It would seem so which is very weird as it creates a uneven frame rate since the PSP screen is 60hz. 20fps makes sense since it's even 20 40 60, same with 30fps 30 60 but 40fps you get 40 80. Still there's the small issue of the fps counter always showing 60fps in software mode regardless of internal frame rate.

LunaMoo commented 4 months ago

Software renderer was never ment as a choice for playing so while fixed and improved over the recent years, it still has issues. FPS counter is one of them.

PSP games are like fishes in the ocean, outside a few that shared same engine, each works in different ways and has different quirks, some are ports that were awfully ported from different platforms and when it comes to PSP screen it was an early LCD which hidden any faults with it's poor quality. Some game dev could wish to see more than 60fps, but also wanted to play for longer than an hour and 40 was his pick, could as well be used to workaround some issue they were lazy or had no time to debug properly, we'll never know. Thankfully on modern hardware from quite a few years it's a widespread standard to have various forms of VRR, which does even better job of showing 40fps than having a tiny, laggy, outdated LCD with ghosting.

hrydgard commented 4 months ago

Since all this affects is the counter, not really the highest priority.

We'd have to add checking for if the game moved the framebuffer pointer, but even that wouldn't work in GTA which uses a quite odd method of frame flipping, which would need even more detection code (in the hardware renderers we need this anyway as part of our framebuffer tracking, but in software mode we don't have framebuffer objects as a thing at all). So, questionable if this is worth the extra complexity.