Input Lag Compensation to compensate for game's internal lag?



maybe you have the video option “black frame insertion” turned on, on a 60hz monitor? try disabling that if that is the case.


Yeah, interlaced video is not quite working yet in runahead.

I don’t have it done correctly in Snes9x, and Genesis Plus GX resets the field counter every time state is loaded.

These are issues within the cores themselves.


Despite use of the word “core”, all the RunAhead stuff is strictly single-threaded for now.

While most situations are entirely sequential, there is one situation that could be made parallel. That is when using Secondary core, and input is not dirty. In that case, the two cores could be in two different threads. I have not implemented that, and RetroArch would need changes to accommodate two threads trying to use the callback systems.


Ah, Ok. I never use Vsync in Retroarch since i have Freesync capable hardware. So, no problems at all with slowdowns in interlaced SNES games menu, title screens etc. Tried it with bsnes too.


There’s still some core options that are causing problems with runahead 2 instances.
FCEUMM isn’t cropping the picture when using the overscan option, it’s just changing the geometry
(easy to verify with super mario bros 3, the margin on the left side should disappear).

I saw some desync while changing the overclock option during runtime too.


What precise sequence of actions will cause the settings to not be synchronized?

I’m trying out Armadillo, and I’m seeing the overclock feature and overscan options work fine.


I’m starting a game with runahead activated, 2nd instance ON in FCEUmm.
Horizontal and vertical overscan cropping options are disabled.
Exclusive Fullscreen is ON (just realised the issue does not happen if you stay in windowed mode).

If I enable both to crop the picture, it stays the same like this:

If I go to the latency menu and disable runahead or 2nd instance, then it works:


Nope, still can’t reproduce the issue at all.

Downloaded RetroArch Nightly, used Core Updater to get official version of FCEUmm.

Run a game in FCEUmm just to get the options menu, have FCEUmm set to no cropping, quit the game, quit RetroArch.

Turn on RunAhead with secondary instance, run the game again.

Turning vertical and horizontal cropping on and off works perfectly.

Second try, from a fresh configuration file…

Doing this sequence of commands:

  • Enable Fullscreen Mode
  • Load a game in FCEUmm
  • In Quick Menu > Options, turn off horizontal and vertical cropping (both on by default)
  • Press ESC to quit
  • Run RetroArch again
  • Turn on RunAhead and Secondary Instance
  • Load the game
  • Turn on cropping in Quick Menu > Options

I still see cropping turn on fine. Just can’t reproduce this issue at all.


It seems to go wrong after you go windowed to fullscreen here.
I start in windowed and then push F to go fullscreen.


Found the issue, entering and leaving fullscreen mode destroys the environment hook.

The whole call stack:

CMD_EVENT_FULLSCREEN_TOGGLE > CMD_EVENT_REINIT > video_driver_reinit > CMD_EVENT_RESET_CONTEXT > drivers_init > menu_driver_init > menu_update_libretro_info > CMD_EVENT_LOAD_CORE_PERSIST > libretro_get_system_info > libretro_get_system_info_lib > libretro_get_environment_info

The function libretro_get_environment_info is wiping away all environment hooks I added, so the core never sees any options changes after entering and leaving fullscreen mode.


Thanks, it’s working fine now! :slightly_smiling_face:


New issue… :persevere:

Can’t activate runahead with fb alpha.
I did finish dodonpachi and esp galuda with it before but now impossible on the latest core version.
I get the “Can’t load state.” message, while loading/saving states work.


Somehow managed to get a secondary core desync in Snes9x 2010 while playing Final Fantasy II.


Hello all !!

Can anyone please explain to me why I can’t use the “Run Ahead Input Latency” feature on my PS3? Every ROM I try to run just results in a never ending black screen. If I run the game without enabling the feature and then toggle to Retroarch to enable it, I get crazy audio problems and some games (like Sonic) slow down worse than a slow motion picture!

Forgive me for my ignorance on the subject, I’m merely an end user trying to play some old SNES games, no programming skills whatsoever! I’m also sorry if this isn’t the right place to ask this question but I would really appreciate if someone told me if this is a recurring problem in all PS3s or just mine!



Sorry if it doesn’t work, I don’t have a PS3 and have never tested it on that system. From what you described, I have no clue why it’s failing.

Also make Retroarch and the cores are as new as possible, get nightly builds if you can.


I’ve managed to get it working on my PC, but no luck on the PS3. Could it be the PS3 has not enough processing power to run the feature?


@Johnnyusp for the audio problem, try enabling the option, “use second instance” and as this is a cpu demanding feature, dont use “frame delay” or even hard gpu sinc, to see if it helps with the slow downs.


Thanks a lot for your responses!


Easiest way to see if it’s just a performance issue is to try a really light core such as QuickNES.


I was wondering, can this concept be combined with rollback netcode in online multiplayer like in fighting games? as far as I understand how this lag compensation works the netcode doesn’t even need to be changed but instead just do the fast forward trick for every game frame on the client side. and this should be pretty performant too since unlike with emulation doing some more loops through the frame data logic shouldn’t cost that much time.