Repository navigation
Add initial PS4 ELF project support with a pinned public compiler - #92
Closed
yourmomsbasement wants to merge 3 commits into
Closed
yourmomsbasement wants to merge 3 commits into
yourmomsbasement wants to merge 3 commits into
Conversation
Register PS4 through the console interface, import loader segments and explicit function bodies, and generate strict objdiff projects. Use the public PS4 clang target instead of machine-local compiler patches; keep imported-global bindings explicit per project. Include a shareable synthetic demo, relocation and integration tests, and documented beta limitations. No game data or unrelated helper/model changes are included.
yourmomsbasement
marked this pull request as ready for review
October 23, 2026 18:32
n-delic
requested changes
Oct 24, 2026
n-delic
left a comment
Owner
There was a problem hiding this comment.
Thanks for this, the design fits the project well: console code stays in consoles/ps4, the compiler is open-source and checksum-pinned, tools//config/ are off-limits to agents, and nothing weakens the judge. With the pinned clang, objdiff and Ghidra installed, tests/test_ps4_targets.py and the PS4 conformance test pass (38 passed, 1 skipped). I merged main into the branch to resolve a ROADMAP conflict.
A few things to change before merging:
- CI fails:
tests/test_ps4_targets.py:112(test_objdiff_rejects_wrong_call_and_accepts_same_call_with_strict_options) callstoolchains.binary('objdiff-cli')before its skip check, which raises when objdiff isn't installed. Checktoolchains.installed('objdiff-cli') is Nonefirst, as line 327 does. - The Ghidra fallback finds no functions: stock Ghidra doesn't load an ELF with Sony's e_type (0xFE10). On the demo ELF it finds 0 functions; the same file with e_type set to ET_EXEC gives 1. So without a
functions.jsonl, the import the guide describes fails. Give Ghidra a temporary copy with e_type ET_EXEC/ET_DYN (consoles/ps4/scratch.py:483-489), and add a test for that path. - Drag-and-drop and the file picker reject PS4 files:
identifyHeadinapp/static/js/home.jshas no PS4 case (CONTRIBUTING, "Adding a console", step 12). Once it accepts them: an upload lands in its ownuploads/<uuid>/, so afunctions.jsonlbeside the original isn't found, andgame_infonames anebootafter that random folder (scratch.py:183,:216). - One overlapping function stops the whole import (
scratch.py:286-291): Ghidra's results often have overlaps the user can't fix from the app. Trim or skip the function and log it.
Smaller:
split_sourceandjoin_functionsaren't implemented (listed in ROADMAP, fine for now, but AGENTS.md asks for them on a new project console).- The map's
nname is documented but never used (scratch.py:246vs:274);importsis stored and unused. - Dead code:
prune_unit_relocsdoes nothing but is called and tested;if True:intools/configure.py:203;DECOMP_PS4_CLANGset in a test but never read. app/twins.py: the_CACHE_VERSIONbump throws away every project's twins cache on every console; x86-64 objects gave no entries before, so it isn't needed.tests/test_consoles.py:131hard-codes demo names for zlib; better as a console fact or read from the demo's build script.docs/GUIDE.mdisn't updated;tool_argsraisesRomErrorwhere the rest of the console usesForkError; example addresses in the guide could be neutral ones.
Merge the latest shared build, compilation, polishing and platform fixes. Normalize only Ghidra's temporary ELF input, accept PS4 uploads with function-map sidecars, preserve valid map names, trim overlapping analysis and repair missing-tool skips. Remove no-op target pruning and retain upstream's twins cache version.
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.
Superseded by #119, which contains the tested review fixes and current main on the policy-compliant feat/ps4-support branch. This PR was replaced because the new upstream branch-name check rejects its legacy codex/ prefix.
Decrypted Orbis x86-64 executables can now be opened through the normal console importer and worked on as strict objdiff projects. This adds initial PS4 support without a Sony SDK, game files, a locally patched compiler, or host-specific compiler paths.
Changes:
Review fixes (2026-10-26):
Validation (updated 2026-10-26):
Limits:
No game binaries, extracted assembly, reconstructed game C, credentials, personal launchers or unrelated model/agent-management changes are included.