Skip to content

mGBA

mGBA (0.10 or newer) runs a small Lua script that connects to Lockstep and sends the game’s memory when Lockstep asks for it. It works for Ruby, Sapphire, Emerald, FireRed and LeafGreen.

  1. Open the run, then Settings → Auto-tracking from the game.
  2. Choose Lua script for your player and press Set up a script connection.
  3. Check the address of the computer running Lockstep: 127.0.0.1 if mGBA runs on the same computer, otherwise its IP address in your home network or on Tailscale. A name (such as a Cloudflare address) does not work; the page points it out.
  4. Click mGBA. The script comes filled in, with the address, port and your pairing code, as lockstep-mgba-<CODE>.lua.
  1. Start mGBA and load your game.
  2. Tools → Scripting… opens the scripting window.
  3. In the scripting window, File → Load script… and pick the downloaded file.
  4. The window’s log says [Lockstep] connected to Lockstep. Nothing else is needed; the input line at the bottom is not.

The settings page in Lockstep then shows the game it found. From now on catches, evolutions, nicknames, the team and badges fill themselves in.

If the script cannot find Lockstep, it waits longer after each try (up to a minute) so the game does not stall. Menu names can differ slightly between mGBA versions and languages.