Finally, here are some crude ASCII diagrams which illustrate the differences across various lag-reduction methods.
I’ve attached a screenshot below in case the forum’s limited width forces you to scroll back and forth.
Legend
| = host v-blank interval
* = input lag
p = game polls input
o = earliest possible point at which a visible reaction could occur
snes9x pre-lagfix
| | |
<emulation><<<<<<<<blocking_on_video>>>>>>>><emulation><<<<<<<blocking_on_video>>>>>>>
p*****************************************************************************o
snes9x post-lagfix
| | |
<emulation><<<<<<<<blocking_on_video>>>>>>>><emulation><<<<<<<blocking_on_video>>>>>>>
p******************************************o
snes9x pre-lagfix with frame_delay:
| | |
<<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation><<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation>
p*****************************************************o
snes9x post-lagfix with frame_delay
| | |
<<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation><<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation>
p**********o
snes9x post-lagfix with frame_delay, game polls input on last scanline
| | |
<<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation><<<<<<<<<<<<sleeping>>>>>>>>>>>><emulation>
p********************************************o
scanline sync
| | |
<emulation><emulation><emulation><emulation><emulation><emulation><emulation><emulation>
p**********o
scanline sync, game polls input on last scanline
| | |
<emulation><emulation><emulation><emulation><emulation><emulation><emulation><emulation>
p**********o
Screenshot
I hope that isn’t too difficult to follow. The asterisk trails give you a quick visual guide. Shorter = less lag.
Note: these diagrams consider only lag introduced by the syncing method. I’m disregarding USB polling, display, driver lag, etc, because they’re independent of sync method. Most games also have at least one frame of internal lag, but that’s out of scope too. In short, the asterisks represent the smallest theoretical time in which you could see a reaction to your input under ideal (unrealistic) conditions.
The diagrams really don’t do scanline sync justice, because I could fit only four <emulation>
's (frameslices) in the space I gave myself. If you double the frameslice count from 4 to 8, which is quite doable, you halve the input lag. Nevertheless, it still illustrates some of its benefits, namely fixed input lag irrespective of polling time, and comparable input latency to a large frame delay without the high CPU requirements.