Skip to content

feat: add ppsspp_set_register (write MIPS Allegrex registers)#2

Open
dmang-dev wants to merge 2 commits into
mainfrom
feat/set-register
Open

feat: add ppsspp_set_register (write MIPS Allegrex registers)#2
dmang-dev wants to merge 2 commits into
mainfrom
feat/set-register

Conversation

@dmang-dev

Copy link
Copy Markdown
Owner

Implements ppsspp_set_register — the register-write half of the completeness gap flagged on the Glama profile and tracked in #1.

What it does

Writes a single MIPS Allegrex register via PPSSPP's cpu.setReg:

  • register — name as shown by ppsspp_get_registers (pc, v0, a0-a3, sp, ra, f0-f31, …).
  • value — a JSON integer (common case) or a string for hex / float / special forms ("0x1F", "1.5", "nan", "-inf") — PPSSPP parses all of these.

The write counterpart to ppsspp_get_registers: redirect execution, fix a return value, patch an argument before a call. Best used while paused / stopped at a breakpoint.

Why not savestate?

The roadmap issue (#1) also listed savestate management — but that's not implementable. PPSSPP's WebSocket debugger exposes no savestate API (the subscriber set is CPUCore, Breakpoint, Disasm, Game, GPU*, HLE, Input, Memory, MemoryInfo, Replay, Stepping, ClientConfig — no savestate.*). Wrapping a fake ppsspp_save_state would silently fail, as CLAUDE.md already warns. Savestates remain PPSSPP's F1-F8 UI keybinds. The CHANGELOG documents this.

Verification

  • npm run build (tsc) passes; CI matrix runs on this PR.
  • cpu.setReg confirmed against PPSSPP's Core/Debugger/WebSocket/CPUCoreSubscriber.cpp (params name/value).
  • No live PPSSPP in CI — recommend a quick runtime check: pause, ppsspp_set_register pc 0x08800000, then ppsspp_get_registers to confirm.

🤖 Generated with Claude Code

Wraps PPSSPP's cpu.setReg to write a GPR/PC/HI-LO/FPU register; value accepts a JSON integer or a hex/float/special string. Counterpart to ppsspp_get_registers. Closes the register-write half of the Glama completeness gap; savestate save/load stays out of scope (PPSSPP's WebSocket debugger has no savestate API).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant