feat: add ppsspp_set_register (write MIPS Allegrex registers)#2
Open
dmang-dev wants to merge 2 commits into
Open
feat: add ppsspp_set_register (write MIPS Allegrex registers)#2dmang-dev wants to merge 2 commits into
dmang-dev wants to merge 2 commits into
Conversation
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>
2 tasks
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 byppsspp_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 fakeppsspp_save_statewould silently fail, asCLAUDE.mdalready 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.setRegconfirmed against PPSSPP'sCore/Debugger/WebSocket/CPUCoreSubscriber.cpp(paramsname/value).ppsspp_set_register pc 0x08800000, thenppsspp_get_registersto confirm.🤖 Generated with Claude Code