Run ROM in headless emulator (libmgba)
run_emulatorLaunch a Game Boy ROM in an emulator with a timed input script. Captures screenshots and returns emulation results like exit code and elapsed time.
Instructions
Launch the ROM via the bundled libmgba-linked gbs-mgba-runner with a scripted input timeline. Captures a PNG at the end (and optionally mid-run). Returns { success, screenshotPath, midScreenshotPath?, exitCode, elapsedMs, stderrTail }. Retrieve the image via the screenshot tool. Build the runner once with mcp-server/native/build.sh (needs a local mGBA checkout); or set GBS_MGBA_RUNNER to an absolute path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | No | Scripted input timeline. | |
| romPath | Yes | Absolute path to the .gb/.gbc ROM (usually build_rom output). | |
| durationMs | No | Total emulator runtime in milliseconds. Capped at 60s; split into multiple calls for longer walkthroughs. | |
| screenshotAt | No | Capture an extra snapshot at this time (ms) in addition to the final frame. |