-->

How do I set up Run-Ahead latency reduction in RetroArch on Linux for arcade games?

RetroArch 1.7.2 — Achieving better latency than original hardware through  new runahead method | by libretro | Medium

Run-Ahead (and its modern lightweight alternative, Preemptive Frames) is RetroArch's engine for eliminating input lag. It runs the emulation engine ahead of what is displayed, calculates save states in real time, and retroactively inserts your button inputs so actions happen on screen instantaneously.

When properly configured for arcade cores like FinalBurn Neo (FBNeo), it makes playing retro arcade games on modern PC displays feel as responsive as an original CRT arcade cabinet.

Measuring and Enabling Run-Ahead Step-by-Step

1.Determine the Game's Native Frame Lag:Default keys: P to pause, K for frame advance.

Different arcade hardware (Neo Geo, Capcom CPS2, Namco System 11) has different built-in input delay. You must measure the target game's native lag first:

  1. Launch your arcade game in RetroArch.

  2. Press P on your keyboard to pause emulation.

  3. Press and hold a distinct action button (such as Attack, Jump, or Joystick Right).

  4. While holding the button, press K repeatedly to advance the game frame-by-frame.

  5. Count how many presses of K it takes until the character's movement animation actually starts on screen.

Calculation: Subtract 1 from the total frame count.

Example: If pressing K 3 times shows the punch animation on the 3rd frame, the game has 2 frames of lag. Set Run-Ahead to 2 frames.

2.Enable Latency Reduction in RetroArch:RetroArch 1.15+ supports Preemptive Frames.

  1. Open the RetroArch Quick Menu (F1 or Controller Guide Button).

  2. Navigate to Settings $\rightarrow$ Latency.

  3. Select your method:

    • Option A — Preemptive Frames (Recommended): Turn Preemptive Frames to ON. This modern method uses fewer CPU cycles by re-running core logic only when a button state changes.

    • Option B — Classic Run-Ahead: Turn Run-Ahead to Reduce Latency to ON.

  4. Set Number of Frames to Run-Ahead (or Preemptive Frames) to the number calculated in Step 1.

3.Configure Arcade Core Settings:Crucial stability tweak for FinalBurn Neo.

When using FBNeo or MAME:

  • Set Run-Ahead Use Second Instance to OFF. While Second Instance prevents audio popping on some home console cores, FBNeo handles state rollbacks better in single-instance mode or via Preemptive Frames.

  • If you notice micro-stutters or audio crackling, drop the Run-Ahead count down by 1 frame.

4.Save Game or Core Overrides:

Since frame latency varies between arcade boards (e.g., Metal Slug vs Street Fighter III):

  1. While in the game, open the Quick Menu (F1).

  2. Go to Overrides.

  3. Select Save Game Overrides to apply these specific latency settings only to this individual arcade title.

Linux System-Level Latency Optimization

To get true zero-perceived-latency on Linux, combine RetroArch's Run-Ahead with these display driver configurations:

  • Wayland vs X11: Running modern Wayland compositors (Hyprland, KDE Plasma Wayland, GNOME Wayland) provides tear-free rendering with lower latency than traditional X11 window managers.

  • Variable Refresh Rate (VRR): Enable FreeSync/G-Sync in your display settings. Arcade games often run at precise non-standard refresh rates (e.g., Midway hardware runs at ~53.7 Hz, Neo Geo at ~59.18 Hz). VRR allows your display to sync directly to the core's native refresh rate without stuttering or forced V-Sync buffering.

  • Audio Driver: In Settings $\rightarrow$ Audio, set the driver to alsa or alsathread (or pipewire if using native PipeWire audio) for minimal sound delay.

Share on Google Plus

About Giampaolo Rossi.

Fond of computer and video games. Stay informed of the latest news on games for Linux and Android. The future of gaming is in Linux. All you need to know about How to play Windows games on Linux.
    Blogger Comment
    Facebook Comment

0 commenti:

Post a Comment

Random Posts