Files
LibretroAdmin d3eda41ea3 tools/lag: the lagmeter reads the pad the three ways RetroArch can, plays a script, saves states, and counts the machine's time
- LAG_POLL early|normal|late: the frontend reads its pad before
  retro_run, when the core calls input_poll, or at the first input_state
  after that (RetroArch's "Polling Behavior"; late is its default). The
  press happens between the frames before N and N, so a core that polls
  at the end of a frame for the next shows under "normal" what that
  costs.
- LAG_SCRIPT "F:ID[:FRAMES],...": presses made in both runs, to bring a
  game to where the press is measured; LAG_SAVE "F:FILE": the state after
  frame F. With them a state is made by booting and playing the same way
  in this core and in another (upstream flycast, whose states are not
  this core's), and the same press measured in both.
- A state RetroArch wrote (RZIP-compressed, with its RASTATE header) is
  loaded as it is: libzstd is loaded for it.
- Each line of a trace has the core's input_poll and input_state calls
  in the frame and the sound frames it made; the first line has the
  sound's rate and the frame rate. --compare prints the lag in the
  machine's frames as well, from the sound: a core whose retro_run is not
  one frame of the machine (upstream returns when it shows a picture -
  every other vblank in a game at 30 frames a second) can be held against
  this one, and a run that is not a frame long shows (it showed one: a
  frame end in the wrong place, losing lines).
2026-10-24 06:01:52 +02:00
..