devmiyax / yabause

Yabause is a Sega Saturn emulator and took over as Yaba Sanshiro
http://www.uoyabause.org
GNU General Public License v2.0
207 stars 35 forks source link

Emulation speed with Frame Skip enabled only works at x2 #812

Open MediaMaquina opened 3 years ago

MediaMaquina commented 3 years ago

I found that the frame skip setting only works for me if i set Emulation speed to x2. If i set it to unlimited, toggling Frame Skip (F4) on/off does nothing (same speed). I'm pretty sure 'unlimited' should push the game speed at the max my PC can handle or something like that. This isn't happening. Unless there's some other setting limiting it that i'm not aware of, if so let me know please. Thanks!

Version 1.3.3 Windows 7 x64

dankcushions commented 3 years ago

Frameskip just skips frames in order to maintain full speed, not go as fast as possible. Eg, a 60fps game might run at 30fps on weaker hardware, rather than running at half speed. So, "unlimited" frameskip would just mean the emulator might be running at 1 fps but the game would still be running at normal game speed. It sounds like it's working correctly.

MediaMaquina commented 3 years ago

"unlimited" frameskip would just mean the emulator might be running at 1 fps but the game would still be running at normal game speed.

What does that mean? Are there 2 speeds? An emulator speed and a game speed?

Frameskip just skips frames in order to maintain full speed, not go as fast as possible.

Then why does x2 effectively doubles the game speed if it "just skips frames to maintain full speed"?

From what i see "Frame Skip" a toggle for the "Emulation Speed" setting

And what would be really really helpful is to be able to go faster than x2. Like all major emulators (VBA, SNES9x, PCSX2, ePSXe, etc, etc). Because when testing games you can't be wasting time seeing unskipable cut-scenes. There has to be a way to skip faster than x2! If unlimited is not that then please add x16 or something.

dankcushions commented 3 years ago

think of it this way - on a fighting game there is typically a round time. say, 60 seconds, and a fighting game is typically 60fps. if your computer is too slow, it might not be able to render 60fps, but it still has 60 frames to render for every second in that game timer.

with frameskip off, it can't skip those frames, so on slow hardware the game just becomes slower. it takes longer than 1 second for 1 second to count down in the game timer. the game is running slower.

with frameskip set to X, it skips X of those frames, so the game timer still counts down as normal (but you miss frames of animation, etc)

Then why does x2 effectively doubles the game speed if it "just skips frames to maintain full speed"?

x2 emulation speed means exactly what it says. it doubles the emulator/game speed. "full speed" becomes 120fps, in our example, and frameskip functions accordingly.

frameskip will do nothing at 1x speed if you already can run it at 60fps. there's no skipping needed.

your request for faster than x2 is fine but i don't think any changes would need to be made to frameskip to accommodate this, as it already has 'unlimited' option. effectively it should handle whatever speed you throw at it, but getting the emulator to run at faster than x2 may not be trivial within the code idk.

devmiyax commented 2 years ago

Vertical sync should be disabled if you want more speed than refresh rate.

image