Add real-PSP USB debug loop: bun run psp:hw#37
Merged
Merged
Conversation
Run a freshly compiled game on a real PSP over USB (PSPLINK + usbhostfs), with no memory-stick copy. `scripts/psp-hw.ts` serves the cargo output as host0:, ldstarts the raw .prx through PSPLINK, and gives an edit -> build -> run reload loop (Enter to rebuild+reload). No env vars: it auto-picks a free TCP port block and waits for the USB reconnect after each reset. Encodes the hard-won details so callers don't hit them: - load the raw pspjs-runtime.prx, not EBOOT.PBP (PSPLINK doesn't unwrap PBP -> 0x80020148 UNSUPPORTED_PRX_TYPE) - reset before each reload, not modstun (rust-psp modules don't free memory -> 0x800200D9 MEMBLOCK_ALLOC_FAILED) - auto-avoid a squatter on the default port 10000 Adds docs/psp-hardware-debugging.md (host tools + PSPLINK setup, usage, troubleshooting, manual equivalent) and a README pointer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
bun run psp:hw <game>runs a freshly compiled game on a real PSP over USB — no memory-stick copy. It drives the PSPLINK + usbhostfs debug chain so you get a tight edit → build → run loop on real hardware.bun run psp:hw walk3d # build, load onto the PSP, then press Enter to hot-reloadusbhostfs_pcserves the cargo output dir to the PSP ashost0:pspshldstarts the rawpspjs-runtime.prxthrough PSPLINK (stays resident)reset(clean memory) +ldstart(your latest build)No env vars. The script auto-picks a free TCP port block and waits for the USB reconnect after each reset.
Why these specifics (encoded so you don't hit them)
.prx, notEBOOT.PBP— PSPLINK doesn't unwrap the PBP container →0x80020148 UNSUPPORTED_PRX_TYPE.resetbefore each reload, notmodstun— rust-psp modules don't free memory on stop →0x800200D9 MEMBLOCK_ALLOC_FAILEDon the 2nd load.Contents
scripts/psp-hw.ts— the wrapper (build + serve + reload loop;--once,--no-build,-r).docs/psp-hardware-debugging.md— one-time host-tools + PSPLINK setup, usage, troubleshooting, and the manual command equivalent.package.jsonpsp:hwscript + README pointer.Test
Validated end-to-end on a real PSP (Pro CFW): auto-selected port 10100, detected the PSP,
reset+ reconnect,ldstartsucceeded, clean exit. Fullbun run psp:hw walk3d --once(bundle + cargo build + load) also verified.🤖 Generated with Claude Code