feat(tools): prepare game test directories with bundled modules #450

Closed
Wessamdevil wants to merge 1 commit from upstream-pr/450 into main
Wessamdevil commented 2026-10-03 10:51:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Wessamdevil on 2026-10-03T10:51:45Z.


What

Preparing a relinked title currently requires manually assembling resources, host PRX libraries, MinGW runtime DLLs and bundled ELF modules. Extra startup dependencies outside sce_module/ also need staging beside the main executable before conversion.

Add a Python standard-library preparation tool that creates a separate test directory, checks input ELF and host-library headers, records the relinker command and failure log, and copies resources and runtime libraries after successful conversion. Repeatable --module [NAME=]ELF arguments stage additional modules under their imported filenames without changing the inputs. Existing output directories, unsafe module filenames and filename collisions are rejected. Add 14 integration cases, CTest registration and usage documentation.

Tested

  • Windows x86-64, WinLibs MinGW-w64 GCC 15.2.0 (15.2.0posix-14.0.0-ucrt-r7), CMake 3.31.10 and Ninja. Full build and the libs target succeed; ANYPS5_ENABLE_SPIRV_TOOLS=ON.
  • All 14 preparation cases pass, including real ELF-to-PE conversion, executing a synthetic Windows output with the expected exit code, converted guest modules, Linux output generation, preservation of inputs, module aliases/collisions, runtime DLL handling and retained conversion errors. Linux game execution was not tested.
  • Full CTest: 145/147 pass. The two failures are in unchanged graphics code: agc_shader_memory fails SPIR-V validation (OpSelect vector sizes differ), and agc_driver_flip crashes on invalid flip submissions. Both reproduce after the final tool changes.
  • Quake II PS5 (PPSA09477, version 01.003.000): main executable and four bundled ELF modules convert. Supplying Party.prx=<decrypted prx/party.prx> and libPlayFabMultiplayer.prx clears the initial missing Party.prx startup failure. All startup libraries then load; execution stops at unresolved NID gbMKV+8Enuo (sceNgs2PanGetVolumeMatrix). No menu or gameplay verified. No bypass flags or API stubs were introduced.
  • No game binaries, assets or private logs are included.

Checklist

  • Based on current main; no other open PR implements this preparation tool
  • One topic per PR
  • No comments added in code
  • No unimplemented API paths or silent stubs introduced
  • Investigation notes and results are in this PR, not new repository reports
  • No new third-party dependencies
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4725988632 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/450). Originally posted by [Wessamdevil](https://github.com/Wessamdevil) on 2026-10-03T10:51:45Z. --- ### What Preparing a relinked title currently requires manually assembling resources, host PRX libraries, MinGW runtime DLLs and bundled ELF modules. Extra startup dependencies outside `sce_module/` also need staging beside the main executable before conversion. Add a Python standard-library preparation tool that creates a separate test directory, checks input ELF and host-library headers, records the relinker command and failure log, and copies resources and runtime libraries after successful conversion. Repeatable `--module [NAME=]ELF` arguments stage additional modules under their imported filenames without changing the inputs. Existing output directories, unsafe module filenames and filename collisions are rejected. Add 14 integration cases, CTest registration and usage documentation. ### Tested - Windows x86-64, WinLibs MinGW-w64 GCC 15.2.0 (`15.2.0posix-14.0.0-ucrt-r7`), CMake 3.31.10 and Ninja. Full build and the `libs` target succeed; `ANYPS5_ENABLE_SPIRV_TOOLS=ON`. - All 14 preparation cases pass, including real ELF-to-PE conversion, executing a synthetic Windows output with the expected exit code, converted guest modules, Linux output generation, preservation of inputs, module aliases/collisions, runtime DLL handling and retained conversion errors. Linux game execution was not tested. - Full CTest: 145/147 pass. The two failures are in unchanged graphics code: `agc_shader_memory` fails SPIR-V validation (`OpSelect` vector sizes differ), and `agc_driver_flip` crashes on invalid flip submissions. Both reproduce after the final tool changes. - Quake II PS5 (`PPSA09477`, version `01.003.000`): main executable and four bundled ELF modules convert. Supplying `Party.prx=<decrypted prx/party.prx>` and `libPlayFabMultiplayer.prx` clears the initial missing `Party.prx` startup failure. All startup libraries then load; execution stops at unresolved NID `gbMKV+8Enuo` (`sceNgs2PanGetVolumeMatrix`). No menu or gameplay verified. No bypass flags or API stubs were introduced. - No game binaries, assets or private logs are included. ### Checklist - [x] Based on current `main`; no other open PR implements this preparation tool - [x] One topic per PR - [x] No comments added in code - [x] No unimplemented API paths or silent stubs introduced - [x] Investigation notes and results are in this PR, not new repository reports - [x] No new third-party dependencies - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!450
No description provided.