Files
LibretroAdmin 5ad55b00aa MTGS: a frame runs on the input of the retro_run that presents it
retro_run polls the pad, latches it and lets the EE start a frame, then
consumes the vsync that ends that frame and presents it. Behind that
vsync the EE waits at a frame gate until the next retro_run opens it,
so between two retro_runs it runs nothing and no frame is drawn from
an older retro_run's input.

A pause opens the gate too, and the EE stops at the vsync it waited
behind: a savestate taken there holds no pending frame, and the
retro_run after a load runs a frame on its own input. A GS that closes
opens it as well. When a drain has left a frame pending, retro_run
presents it and the EE stays where it stopped until the next one.

tests/latency: a synthetic BIOS clears the screen once a vsync to a
colour it reads from main RAM, which the harness writes before a
retro_run as the core latches the pad there, and waits between
retro_runs as a frontend does while it presents; each colour must be in
the picture of the retro_run it was written before.

tests/mtgsvsync models the gate on the real work eventcount: each frame
is scanned out from its vsync's registers, drawn from the input polled
in the same call, and the producer starts nothing between calls. A
producer let go at the vsync, and a gate opened before polling, both
fail it.
2026-10-12 12:29:48 +02:00
..