feat(web): apply a local game patch during conversion #24722

Merged
WhiteAssassins merged 3 commits from upstream-pr/24722 into main 2026-11-27 14:45:40 +00:00
WhiteAssassins commented 2026-11-21 00:17:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by WhiteAssassins on 2026-11-21T00:17:20Z.


What

Let users select one local TOML patch when converting a single app from a ZIP or a folder. The browser passes the patch to the existing relinker parser and applies it during conversion. A malformed patch, a patch with no entries, an unmatched target, or mismatched expected bytes stops conversion before packaging.

This adds the local patch picker as a first step toward a catalog picker. The picker is available for single-app conversions.

Tested

CachyOS Linux, Emscripten 6.0.12: built relinker_web and ran python3 tools/test_web.py --build <wasm-build>. All 50 web tests passed. The WASM integration checks Linux ELF and Windows PE conversion with synthetic inputs, with a patch targeting either the main executable or a bundled module. It checks that rejected patches return no artifacts. No PS5 title was used.

Conventions and git diff --check pass. I checked the shared files the overlap tool could not compare. #22984 applies cleanly over this branch. #24378 adds Russian separately and will need the new patch strings if both PRs land.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5422245552 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24722). Originally posted by [WhiteAssassins](https://github.com/WhiteAssassins) on 2026-11-21T00:17:20Z. --- ### What Let users select one local TOML patch when converting a single app from a ZIP or a folder. The browser passes the patch to the existing relinker parser and applies it during conversion. A malformed patch, a patch with no entries, an unmatched target, or mismatched expected bytes stops conversion before packaging. This adds the local patch picker as a first step toward a catalog picker. The picker is available for single-app conversions. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> CachyOS Linux, Emscripten 6.0.12: built `relinker_web` and ran `python3 tools/test_web.py --build <wasm-build>`. All 50 web tests passed. The WASM integration checks Linux ELF and Windows PE conversion with synthetic inputs, with a patch targeting either the main executable or a bundled module. It checks that rejected patches return no artifacts. No PS5 title was used. Conventions and `git diff --check` pass. I checked the shared files the overlap tool could not compare. #22984 applies cleanly over this branch. #24378 adds Russian separately and will need the new patch strings if both PRs land. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-11-21 00:44:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T00:44:50Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the review covered the changed files, and the reported web checks were not run here.

What I ran

  • Reviewed head 1c47b1da5e8ef7400dc679cec4f77e9af7e42c09 using repo_read.py.
  • No tests or build commands were run. The PR description reports a relinker_web build and 50 passing web tests; those results were not independently verified.

Results

Check Result Note
Changed code review passed All nine changed files were read.
Build and web tests not run Results are author-reported.
Console title behavior not run No PS5 title was used.

Findings

Blocking

None.

Non-blocking

None.

Sources

The browser binds the supplied patch text to conversion options and checks that patch targets match the executable or converted modules at the reviewed head. The worker reads a single selected patch file as UTF-8, enforces its size limit, and passes it through for conversion at the reviewed head.

Not verified

  • No build or tests were run during this review; the reported test results remain author-reported.
  • No PS5 title or physical-console behavior was verified.
  • Files read: core/relinker/wasm/Bindings.cpp, demo/web/app.mjs, demo/web/i18n.mjs, demo/web/index.html, demo/web/tests/app.test.mjs, demo/web/tests/archive.test.mjs, demo/web/worker.mjs, docs/user/USAGE.md, and tools/test_web.py. The manifest lists all nine changed files as included; none were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6001421201 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24722#pullrequestreview-6001421201). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T00:44:50Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the review covered the changed files, and the reported web checks were not run here. ## What I ran - Reviewed head `1c47b1da5e8ef7400dc679cec4f77e9af7e42c09` using `repo_read.py`. - No tests or build commands were run. The PR description reports a `relinker_web` build and 50 passing web tests; those results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All nine changed files were read. | | Build and web tests | not run | Results are author-reported. | | Console title behavior | not run | No PS5 title was used. | ## Findings ### Blocking None. ### Non-blocking None. ## Sources The browser binds the supplied patch text to conversion options and checks that patch targets match the executable or converted modules [at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1c47b1da5e8ef7400dc679cec4f77e9af7e42c09/core/relinker/wasm/Bindings.cpp#L75-L90). The worker reads a single selected patch file as UTF-8, enforces its size limit, and passes it through for conversion [at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1c47b1da5e8ef7400dc679cec4f77e9af7e42c09/demo/web/worker.mjs#L147-L155). ## Not verified - No build or tests were run during this review; the reported test results remain author-reported. - No PS5 title or physical-console behavior was verified. - Files read: `core/relinker/wasm/Bindings.cpp`, `demo/web/app.mjs`, `demo/web/i18n.mjs`, `demo/web/index.html`, `demo/web/tests/app.test.mjs`, `demo/web/tests/archive.test.mjs`, `demo/web/worker.mjs`, `docs/user/USAGE.md`, and `tools/test_web.py`. The manifest lists all nine changed files as included; none were excluded. ## To get this to a good state Nothing is required.
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!24722
No description provided.