Run ELFs on a real PS2 and get structured results: CLI, MCP and GUI
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
techwritescode a132fff37e ps2rig: parse and symbolize the crashscreen report
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 10:34:36 -05:00
cmd ps2rig-gui: align the run list columns with the other text 2026-10-07 09:34:28 -05:00
docs Add agent setup guide and example programs 2026-10-07 09:35:46 -05:00
examples Add agent setup guide and example programs 2026-10-07 09:35:46 -05:00
internal/rig ps2rig: parse and symbolize the crashscreen report 2026-10-15 10:34:36 -05:00
.gitignore Add agent setup guide and example programs 2026-10-07 09:35:46 -05:00
go.mod ps2rig-gui: keep the selected run when the list updates, fix the folder dialog crash 2026-10-07 09:32:16 -05:00
go.sum ps2rig-gui: keep the selected run when the list updates, fix the folder dialog crash 2026-10-07 09:32:16 -05:00
LICENSE Add ps2rig, a hardware test rig for running ELFs on a real PS2 2026-10-07 09:16:27 -05:00
README.md ps2rig-gui: align the header, native folder picker, spacing under settings, no console window 2026-10-07 09:29:46 -05:00

ps2rig

Runs an ELF on a real PS2 running ps2link and returns one JSON result: the outcome (pass, fail, crash, hang, no response), exit code, console output and, for a crash, the faulting addresses resolved to function and source line.

A server queues runs on the console one at a time, resets it before each run, and keeps run history and artifacts. You can start the server from the command line (ps2rig serve) or from a window (ps2rig-gui). Agents use it through MCP tools (ps2rig mcp); people and CI use the CLI.

Use

ps2rig serve --hostname 192.168.0.10     # start the server next to the console
ps2rig run build/bin/app.elf arg1 arg2   # run an ELF, print the result as JSON
ps2rig list | get <run-id> | status | cancel <run-id>
ps2rig artifact <run-id> stdout.txt
ps2rig mcp                               # MCP tools over stdio

The CLI commands talk to the server at $PS2RIG_URL (default http://127.0.0.1:7878); $PS2RIG_TOKEN or --token sets the access token.

A program reports its exit code by printing [ps2rig] exit=<code> on the console, which ends the run. Without it the run ends at the timeout as hang. An exception report from ps2link ends the run as crash.

Crash lines need a build with debug info (debug: true in ps2.yaml); otherwise only function names resolve. addr2line is found through $PS2DEV or the ps2build install.

MCP

{
  "mcpServers": {
    "ps2rig": { "command": "ps2rig", "args": ["mcp"], "env": { "PS2RIG_URL": "http://127.0.0.1:7878" } }
  }
}

Tools: run_elf, get_run, list_runs, get_artifact, cancel_run, console_status.

Build

go build ./cmd/ps2rig            # CLI and server, no C compiler needed
go build ./cmd/ps2rig-gui        # window, needs cgo (see below)
go test ./cmd/ps2rig ./internal/...

ps2rig-gui uses Fyne, which needs a C compiler. With the LLVM clang from Program Files on Windows:

CGO_ENABLED=1 CC=clang CGO_CFLAGS=-DWINBOOL=BOOL \
CGO_LDFLAGS="-luser32 -lshell32 -lgdi32 -lopengl32 -ladvapi32 -lole32 -loleaut32 -limm32 -lwinmm -lcomdlg32 -luuid" \
go build -ldflags "-H windowsgui" -o ps2rig-gui.exe ./cmd/ps2rig-gui

Licensing

CC0 1.0 (see LICENSE)