3 ms·
You can get the precise scanout positions easily. For direct scanout: Windows has fullscreen exclusive mode, X11 has unredirecting, and Wayland recently added d
by BearOso 4y ago
You can get the precise scanout positions easily. For direct scanout: Windows has fullscreen exclusive mode, X11 has unredirecting, and Wayland recently added direct scanout surfaces. There's major API extensions to query the vblank times, so you can set up the next frame to start scanout precisely when a console would. Now, you won't be able to modify the image when it's displaying--no racing the beam tricks, but consoles usually locked the vram outside vblank anyway.
- musicale 4y agoThis is interesting - are you saying it's possible with appropriate synchronization to race the scanout on a modern GPU/display to get true line-by-line display for an emulator and avoid the buffering delay (e.g. 1/4 frame at 120 Hz)? Presumably native graphics and games already need to sync with fixed rate displays to avoid tearing (or buffer and pay a latency price.) The fact that tearing exists would seem to indicate that you can update a frame while it is being scanned out. I imagine that racing the beam (or video signal scanout in the case of non-CRTs) might actually work, especially with VGA where you could set to an appropriate resolution.
- BearOso 4y agoExactly. Mark Rejhon, the Blurbusters guy, wrote a lot about it and had a proof of concept. A couple emulators implemented it.
- cmrdporcupine 4y agoBut it's only half the battle, if there's still high latency on the input stack.
- musicale 4y agoA Raspberry Pi is a popular emulation platform. There's essentially zero latency to read a GPIO pin. Even on macOS or Windows 10 platforms, one way serial-to-USB latency seems to be less than a millisecond.