RetroArch runs cores without vsync if they want a higher FPS than 60

(I’ve had some discussions on the discord server about this, but I’m hoping someone here knows more.)

I’m trying to improve the dosbox-svn core by making it run in sync with the front-end (that is, make it emulate one frame per retro_run() call, which is how cores should behave in general.) However, dosbox being a PC emulator means it needs to run at 70FPS in some cases, since 70Hz is a common VGA refresh rate. Other frame rates are also possible (DOS games love to set custom VGA modes.) Example:

retro_system_av_info info;
retro_get_system_av_info(&info);
info.timing.fps = 70;
environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO , &info);

However, RA will disable vsync when doing that. What I would have expected is that it runs the core at the requested frame rate with vsync and then drop extra frames on 60Hz displays.

Is this a RA bug? If it’s intended behavior, is there a way to convince RA to do vsync?

With dynamic rate control, it will try to force vsync+monitor timing on anything that’s within the max timing skew range. Anything outside of that range just aborts vsync altogether and blocks on audio.

What happens on Windows and an NVidia GPU when vsync is forced in the nvidia control panel? Does the game run in slow motion then?

That’s a good question! I don’t have any Nvidia GPUs to try it, unfortunately. Based on various reports, I suspect it does indeed run slow with lots of audio crackling.

If you force V-Sync on Nvidia control panel, it will maintain your monitor refresh rate, mine is 60Hz, and you won’t be able to use fast forward too. I played Duke Nukem 3D on DosBox core using the same refresh rate as other consoles, the game played so smoothly using some tweaks in the options, higher CPU clock, etc., and a nice gamepad control scheme I couldn’t notice any problem, in fact this game in particular never played better.