Skip to content

Add initial PS4 ELF project support with a pinned public compiler - #119

Open
yourmomsbasement wants to merge 4 commits into
n-delic:mainfrom
yourmomsbasement:feat/ps4-support
Open

yourmomsbasement wants to merge 4 commits into
n-delic:mainfrom
yourmomsbasement:feat/ps4-support

Conversation

@yourmomsbasement

Copy link
Copy Markdown

Supersedes #92. The new branch name follows the policy added since that PR opened. The original review is at #92 (review); its four blocking issues and smaller cleanup requests are addressed below. Source splitting and function joining remain explicit roadmap gaps.

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:

  • Register PS4/Orbis through the existing Console interface and expose its compiler, setup packs, guide, data access, function renaming and draft adaptation.
  • Pin the official public LLVM/Clang 5.0.2 archive by SHA-256. Use its existing PS4 target and freestanding headers to select the global stack-guard ABI.
  • Read file-backed loader segments (including Orbis RELRO) and mapped BSS separately. Import explicit function extents/body ranges from a sidecar map or Ghidra; preserve shared-tail boundaries and real thunks.
  • Generate standalone Ninja/objdiff projects with correct ELF symbol indices, relocation widths/addends and strict relocation identities. Keep compiler post-processing ordered after target generation and propagate its failures.
  • Relax eligible internal GOT loads while preserving imports. Optional fixed stack-guard bindings are configured per project; no game address is hardcoded.
  • Integrate x86-64 twin fingerprints and supported permuter weights. Allow narrowly typed linkage-label declarations while continuing to reject emitted assembly.
  • Add a synthetic 15-function demo built only from shareable sources, regression tests, and explicit platform/capability documentation.

Review fixes (2026-10-26):

  • Merge current main through ec92e63 (1.0.7-alpha.1), preserving PSP/macOS additions and bringing in shared incremental compilation, re-measure and polishing fixes.
  • Check objdiff installation before resolving its binary, so CI skips without installed tools.
  • Normalize only Ghidra's disposable ELF input to ET_EXEC/ET_DYN. Original files and matching targets keep their original bytes.
  • Accept PS4 uploads and allow a functions.jsonl or .functions.jsonl selected/dropped with the executable. Path imports retain adjacent maps. Uploaded eboot files get a stable title.
  • Trim/log overlapping functions, use valid unique map names consistently in symbols/relocations, and remove unused imports metadata.
  • Remove no-op relocation pruning, the unconditional configure block and unused compiler environment override. Retain main's twins-cache version; read demo zlib prerequisites from build scripts. Use ForkError consistently and update docs/GUIDE.md.

Validation (updated 2026-10-26):

  • Full suite: 770 passed, 270 skipped, 1 deselected. XDG_RUNTIME_DIR was cleared because this host's systemd does not support OOMPolicy on scopes; the deselected system-GTK test fails on untouched main too. Both systemd failures were also reproduced on untouched main.
  • Compiler-backed PS4 target/console conformance: 42 passed, 1 skipped (whole-game export is a documented gap). Covers actual import/build, agent claims/drafts, matching C accepted and wrong C rejected, path spaces, BSS/RELRO, branches/shared tails, relocation identities, renaming, GOT/guard binding and public-compiler canary emission.
  • Two additional real stock-Ghidra tests pass without sidecars, covering both Orbis executable types and original-file preservation.
  • GUI file recognition and uploaded-map handling have regression coverage. Node GUI tests ran in the full suite.
  • ruff check src tests projects and git diff --check pass.

Limits:

  • Initial beta for decrypted executable ELF files on Linux x86-64, including the Linux app inside WSL 2. No encrypted SELF/PKG import or PRX-module support.
  • Clang 5.0.2 and the starting flags must still be checked against each game; they are not asserted to match every PS4 title.
  • Full-game relinking/export, compiler switching, source splitting, function-piece joining, and class/structure recovery remain documented gaps. Imported-global addresses require independent analysis and explicit configuration.

No game binaries, extracted assembly, reconstructed game C, credentials, personal launchers or unrelated model/agent-management changes are included.

yourmomsbasement and others added 3 commits October 23, 2026 13:11
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.
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.
Give the replacement PR its own head so checks from the legacy codex branch do not remain attached to the same commit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants