

On input the emulator will actually roll back the entire emulation to the state it was in that many frames ago, then fast forward the emulation back to real time to compensate. This is actually savestate-based, and related to the lag compensation used in fighting games online. The community is also working to document the "natural" lag in long lists of classic games in order to calibrate the new feature for as many pieces of software as possible.Īs I understand it this is actually crazier than the article implies (though both might be accurate interpretations of what's going on). Work on "LAGFIX," as the feature is being called by RetroArch developers, has been going on since early March and continues to be refined and debugged by the community through regular open-source builds.

Save states help make sure the internal game logic doesn't get out of sync during the "run-ahead" process, while audio output running on different cores can make sure the music and sound effects don't end up wonky. This extra emulation work obviously comes with a lot of extra processing overhead, but that's not a big concern for emulating older systems running on modern, multi-core PCs (slower processors on the Raspberry Pi and other microconsoles boxes might run into more problems). It's a major accomplishment and the culmination of a lot of theorizing for an emulation community that has been maniacally focused on latency mitigation for many years. The result is classic emulated games that can actually run with less input lag than the original hardware, as seen in this super-slow-motion Super Mario Bros. Then, the emulator actually shows the third post-input frame (where Sonic first shows a visible reaction) timed for when the first post-input frame would naturally appear, cutting out the delay a player would usually see. So in a game like Sonic the Hedgehog, which has two frames of input lag, the game will quickly emulate two additional, hidden frames after every new input. In some games, the actual delay can be two to four frames (or more), which can start to be a noticeable lag at the usual 60 frames per second (or about 17ms per frame).Īn experimental Input Lag Compensation mode being rolled out in new versions of RetroArch fixes this issue by basically fast-forwarding a few hidden frames behind the scenes before displaying that first "reaction" frame in the expected spot. That means the game doesn't output its reaction to a new input until the next frame after the button is pressed at earliest. Further Reading Accuracy takes power: one man’s 3GHz quest to build a perfect SNES emulatorWhile early game consoles like the Atari 2600 sample and process user inputs between frames, consoles since the NES usually run that game logic while a frame is rendering.
