You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actual framerate of the core appears to be managed by how much audio data is pushed through the audio callback. The audio callback will block until there's room in the audio buffer for the pushed data, thus making the core.step take one frame to execute. When the audio being pushed by a single core.step is enough for 1/30th of a second, only 30 calls to core.step can occur per second. Since this is less than the 60fps that the core claims it should be generating, the frontend may start dropping renders to try to achieve the 60fps target rate. This causes the actual framerate to be even less than the 30fps being generated.
What should happen
I believe the framerate reported by the retro_system_av_info structure should reflect the actual number of frames being generated, and the RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO environment callback should be called if/when the fps changes.
The workaround is to set the ppsspp_frame_duplication setting to "enabled", thus causing the core to actually generate 60fps. But the default value for that is "disabled", and most users won't know to change it.
I don't know anything about libretro's audio handling and don't use it, but I will tell you that a physical PSP always produces 59.94.
You can read an explanation of why PPSSPP doesn't produce exactly that many frames here: #14315 (comment)
We used to time emulation based on audio (back in like PPSSPP v0.4.x or something), and changed to using vsyncs because games are very inconsistent (and allowed to be) in how they buffer audio. Is it another limitation of libretro that it's only designed to time things based on audio?
Sounds like maybe the setting to force frame output should be on always. PPSSPP on libretro is already slower and more buggy due to libretro limitations anyway, so presumably someone would run PPSSPP proper if they wanted better frameskip, speed, or compatibility anyway.
Game or games this happens in
All
What area of the game / PPSSPP
When I run a game at 30fps, the core still reports 60fps. This is hardcoded in the libretro interface here:
ppsspp/libretro/libretro.cpp
Line 495 in 005f145
The actual framerate of the core appears to be managed by how much audio data is pushed through the audio callback. The audio callback will block until there's room in the audio buffer for the pushed data, thus making the
core.step
take one frame to execute. When the audio being pushed by a singlecore.step
is enough for 1/30th of a second, only 30 calls tocore.step
can occur per second. Since this is less than the 60fps that the core claims it should be generating, the frontend may start dropping renders to try to achieve the 60fps target rate. This causes the actual framerate to be even less than the 30fps being generated.What should happen
I believe the framerate reported by the
retro_system_av_info
structure should reflect the actual number of frames being generated, and theRETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO
environment callback should be called if/when the fps changes.The workaround is to set the
ppsspp_frame_duplication
setting to "enabled", thus causing the core to actually generate 60fps. But the default value for that is "disabled", and most users won't know to change it.Logs
No response
Platform
Windows
Mobile phone model or graphics card
Radeon RX 480
PPSSPP version affected
libretro core 005f145
Last working version
n/a
Graphics backend (3D API)
OpenGL / GLES
Checklist
The text was updated successfully, but these errors were encountered: