You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opt-in, byte-checked game patches in the relinker
#6207
Proposal: let the relinker apply a per-title patch file to the executable at conversion time. Each entry gives a virtual address, the bytes expected there and the bytes to write. The relinker refuses the conversion on a mismatch or on overlap with its own rewrites, and records what it changed. With no patch file the output is byte-identical to today's. Nothing in code or docs names a title.
Why: titles hard-code budgets tuned for one machine, and PCs vary in core count, page size and per-access cost. The relinker already compensates for host differences at conversion time (--to-intel, --to-rosetta, --linux-fixed-base); a checked, recorded change of a game constant is the same kind of step, and it can be shared and reproduced where a hex-edited app.elf cannot.
Headline result, Hades II (PPSA36082): its 512 MiB upload pool overflows and a copy writes to NULL (the class in #1965). One byte of app.elf raising the pool to 768 MiB gave, pinned to 2 cores with 10 interleaved runs per arm, 7/10 crashes at base against 0/10 (one-sided Fisher p = 0.0015). It buys headroom only; I know of no emulator-side fix. Details, caveats and the design are in #6206.
PR 1 (core patcher) is open: #6314, tracked in #6206. PRs 2–4 follow only if you want the feature.
Questions:
Should this live in the relinker, or in a separate tool that edits an already converted app.elf?
Is PR 1 acceptable as scoped (parser, apply step, checks, record, --verify-patches, tests and docs)?
AI assistance: the analysis, measurements and this text were produced with LLM assistance; I reviewed them and take responsibility for them.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal: let the relinker apply a per-title patch file to the executable at conversion time. Each entry gives a virtual address, the bytes expected there and the bytes to write. The relinker refuses the conversion on a mismatch or on overlap with its own rewrites, and records what it changed. With no patch file the output is byte-identical to today's. Nothing in code or docs names a title.
Why: titles hard-code budgets tuned for one machine, and PCs vary in core count, page size and per-access cost. The relinker already compensates for host differences at conversion time (
--to-intel,--to-rosetta,--linux-fixed-base); a checked, recorded change of a game constant is the same kind of step, and it can be shared and reproduced where a hex-editedapp.elfcannot.Headline result, Hades II (PPSA36082): its 512 MiB upload pool overflows and a copy writes to NULL (the class in #1965). One byte of
app.elfraising the pool to 768 MiB gave, pinned to 2 cores with 10 interleaved runs per arm, 7/10 crashes at base against 0/10 (one-sided Fisher p = 0.0015). It buys headroom only; I know of no emulator-side fix. Details, caveats and the design are in #6206.PR 1 (core patcher) is open: #6314, tracked in #6206. PRs 2–4 follow only if you want the feature.
Questions:
app.elf?--verify-patches, tests and docs)?AI assistance: the analysis, measurements and this text were produced with LLM assistance; I reviewed them and take responsibility for them.
All reactions