[QUOTE=larskj;37423]I can’t really tell if it is relevant or not, but I played around some more with Lakka settings on my i5 NUC…
if I disable vsync, disable audio sync and leave frame throttle at 0 (which makes the game run as fast as possible I assume) - then I get very low input lag:
Nestopia: 4 frames (sometimes 3.5 frames)
Bsnes mercury balanced: 4 frames (sometimes 4.5)
Of course it is useless because the game is running way too fast, but it is interesting to see how low the lag can be in this case.
What would be required for normal game speed with vsync disabled?
If I set frame throttle to 1.0x, then the game stutters/jerks a lot like it is constantly changing speed.
I don’t really see any tearing though.
EDIT: Basically the conclusion from above is that the nes and snes core seem to have the same input lag when game is running very fast, and not the usual 2 frames difference.[/QUOTE]
I have done similar tests (although I haven’t compared to NES emulation yet) and also get very good input lag (better than you, even).
Base setup
i7-6700K
Radeon R9 390 (16.3.2 driver, OpenGL triple buffering enabled)
Windows 10 64-bit
RetroArch 1.3.2 64-bit + bsnes-mercury-balanced core + “Hard GPU Sync” setting enabled for all tests
CIRKA SNES style USB gamepad
HP Z24i (all tests run at native 1920x1200 over DisplayPort)
Test scene:
Super Mario World 2: Yoshi’s Island, first stage. I don’t move at all from the starting position, just stand right there and press jump repeatedly.
Methodology:
Same as previously, i.e. film monitor and gamepad at 60 FPS with a Canon EOS 70D and analyze the video frame by frame afterwards.
Test 1
vsync on
audio sync on
Result: 6 frames of input lag
Test 2
vsync off
audio sync on
Result: 5 frames of input lag
Test 3
vsync off
audio sync off (Note: This is what sets the framerate free, resulting in approximately 220 FPS during the test)
Result: 2-3 frames of input lag
So, turning off vsync seems to have a marginal effect on the input lag (a very consistent 1 frame improvement). However, turning off the audio sync (which is what sets the frame rate free) has a pretty profound effect, improving the input lag by at least 2 frames. During test 3, I never saw more than 3 frames of lag, but approximately 10 of the 30 jumps I did had only 2 frames of lag. The reason I never saw as quick results as this before is that I only disabled vsync and not audio sync.
The results are interesting, but I’m not sure what we can do with them. One way or another, the syncing is pretty much the single biggest culprit when it comes to input lag (at least as far as the monitor/display is fast). Part of the difference we’re seeing (I believe approx. 8-12 ms) is due to the free-running emulator being able to update directly in the front buffer. When vsync is active, the full frame must be complete before it’s scanned out to the display. Without vsync, the emulator can write in the front buffer just before Mario and Yoshi are to be drawn on the screen, saving us the time it otherwise takes to scan from the top of the screen down to Mario and Yoshi’s location.
Another part of the difference (~12 ms?) can probably be explained by the free-running emulator being able to poll input much closer to when the frame is actually output to the screen.
EDIT: Personally, I’m very happy with the 4 frames of input lag I get with NES emulation. It’s probably not realistic to expect lower while maintaining vsync. I only wish for two things:
- For SNES emulation to match this. Still not sure why it can’t.
- For Linux input lag to match Windows.
If both of the above issues were “fixed”, it would be possible to get a total of 5-6 frames of input lag when using a dedicated Linux emulation machine on a low input lag TV. That’s a pretty far cry from the current situtation with, for example, RetroPie, where 9-10 frames of input lag is to be expected even with a low input lag TV.