Open athairus opened 9 years ago
Poll input (and run a frame of emulation) n ms before the vertical retrace occurs (Windows): https://www.opengl.org/registry/specs/NV/wgl_delay_before_swap.txt
Ditto (Linux?): https://www.opengl.org/registry/specs/NV/glx_delay_before_swap.txt
I currently have an arduino with an LED set up to blink whenever my Gamecube controller's A button is pressed. Coupled with my USB GC adapter, I now have an accurate button press to photon testing setup. What I need to do some real testing is: a high speed camera and a CRT.
This issue is one being worked on around the world by VR people as I type. How do we reduce input latency? Our most demanding audience that we target, speedrunners, have told me many times their biggest complaint about using emulators vs using a console is input latency. Through personal experience, I'd have to agree with them. The question is: why? And how do we improve it? Can we improve it?
What's really important here is the button to photon delay. We want to minimize this as much as possible, less than a frame period for starters.
Button press -> Controller circuitry -> USB -> Interrupts (?) -> OS APIs -> SDL loop <-> libretro core -> Qt -> buffer swap -> monitor
Here's an interesting article on the subject: http://renderingpipeline.com/2013/09/measuring-input-latency/