- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| cmd | ||
| docs | ||
| examples | ||
| internal/rig | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
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)