I’ve always been having issues with high input lag on emulators. At the moment Retroarch has less for me on snes than standalone emulators because of the Hard GPU Sync feature. A Mednafen developer sent me an expirimental build for the snes emulator in which he had unfinished code for a ‘‘speculative execution’’ feature. The input lag was way lower, it’s beautiful. Sound was still pretty delayed. He said the input lag was low because ‘‘probably a combination of the speculative execution, and taking care how and when internal input state variables are propagated’’ Another quote
‘‘Normal execution could be described like: Update Input->Emulate Frame->Output Frame Speculative execution in this context is like: Update Input->Emulate Frame(and discard audio/video output)->Save State->Emulate Frame->Output Frame->Load State As for downsides… It can theoretically cause audio and video glitches(such as messed up sound effects, and jerkiness in the video/animations), especially if you try to speculatively-execute more than 1 frame ahead, but it’s mostly game-dependent whether or not it will happen. And speculative execution will increase CPU usage, since you’re running the virtual machine for 2 or more virtual frames for each outputted frame. PS1 games could greatly benefit from speculative execution, since they often have 2+ frames of latency built-in, but Mednafen’s PS1 emulation is sadly too CPU-intensive to make it feasible there. Other emulators could implement the feature(if they haven’t already?), though the difficulty in doing so would depend on how the emulator is designed internally.’’’’
Would it be possible to implement such a thing in Retro arch? Or is this not really feasible with how it works? Because the result felt really, really, really good.