libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.89k stars 1.78k forks source link

libretro api: frame limiter toggle? #7050

Closed turhope closed 5 years ago

turhope commented 5 years ago

I couldn't find any mention of this in the repo or forums.

Is there an api method to turn on/off the frontend's frame limiter from the core itself? Some fork of snes9x has a feature called "Fast Loading" which runs the emu fullspeed when nothing is happening (video, audio zero) and it can run 4-7 seconds of load times into merely blips. But the fork's internal method is kludgy and intrusive and creates some audio distortions due to its audio skipping buffering methods.

If there isn't one, can the Retroarch devs expose the limiter to the cores? Disable / enable + Query limiter status (don't activate from core if user already requested fast-forward)? I think it would be another useful tool to make libretro more user-experience positive.

ghost commented 5 years ago

Settings -> Frame Throttle -> Maximum Run Speed

turhope commented 5 years ago

Normally you have to [i]manually[/i] hit the fast-forward key to skip load times. This involves lots of guesswork when to stop, especially when you're playing brand new games.

Forked core has this ability to detect when load times happen. And it [i]automatically[/i] fast-forwards the emu to skip. Then runs emu back at normal speeds when activity starts. For snes9x, it works much of the time. No user interaction needed = less frustrating and more enjoyable. But the way it does this internally inside the emu has some problems.

I don't think Retroarch has any auto fast-forward feature (without needing user input)? And core has no ability to tell frontend when to engage fast-forward without use of hotkey?

hizzlekizzle commented 5 years ago

And core has no ability to tell frontend when to engage fast-forward without use of hotkey?

Correct. What you're describing can only be done inside the core. It can't be a generalized frontend feature because the frontend doesn't have that intimate of knowledge of the inner workings of a core.

turhope commented 5 years ago

Would it be possible to expand retro_system_av_info to have a variable like info->timing.framelimiter, which would notify frontend to disable or enable the fast-forward hotkey?

If this is troublesome, I'll see if the core has some alternate way to fix the audio pops, bugs.

Unless it's possible to use RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO and set ridiculous fps like 9999? (only thought about this just now and can't test until later)

turhope commented 5 years ago

Changing timing.fps didn't do anything.

Without the ability for the core to have a Retroarch callback to turn off frame limiter in frontend, there's no perfect way to do auto-framelimiter. And since no one (including original inventor) outside snes mini community seems to care about this auto-speedup feature, I'll just try hacking it into my own private forks of snes9x,bsnes,fceumm,nestopia,beetle-psx/pcfx,etc.

dopadream commented 1 year ago

Settings -> Frame Throttle -> Maximum Run Speed

I know this is old as shit, but that's not even an option in the Frame Throttle menu. Was it removed?

hizzlekizzle commented 1 year ago

Settings rarely go away in RetroArch, they just change names lol. This one is now known as "Fast-Forward Rate" but it should still work the same.