Repository navigation
fix(carry): name the release's empty level hooks by their callers - #466
Merged
Merged
Conversation
The boot's empty 8-byte functions (the level hooks each level fills) are alike, so the alignment paired them by order. The order does not hold: USA v2.00 has its hooks 8 bytes on and one more, PAL its own run, so many release hooks had another hook's name (func_0026F748, the hero's state change hook, among them). carry.py now pairs each hook by the calls to it: a v1.01 function with a place in the release (or one function of the same shape) calls the release's hook at the same word. A hook no call names takes its place in the run between two that are named, where both moved alike. The USA v2.00 and PAL catalogues and sources use those names; the hook only USA v2.00 has is func_US2_0026F7E0 (stub_empty_us2), and PAL's empty overlay callback is v1.01's func_0032A130 (moby_do_nothing). Every program of both releases builds to the retail bytes; only hook names and their placed values change.
ByteMatch progress reportSCPS_150.56
No function changes. SCUS_972.68
No function changes. SCES_516.07
✅ Newly matched (14)
|
| Code matched | 100.00% · 5.58 MB of 5.58 MB |
| Fuzzy match | 100.00% |
| Functions | 8,580 (+1) / 8,580 |
| Units complete | 1,288 (−7) / 1,288 |
✅ Newly matched (11)
func_0026F7A0(16 bytes)func_0026F710(8 bytes)func_0026F718(8 bytes)func_0026F730(8 bytes)func_0026F750(8 bytes)func_0026F7B0(8 bytes)func_0026F7B8(8 bytes)func_0026F808(8 bytes)func_00338A58(8 bytes)func_00338F50(8 bytes)func_US2_0026F7E0(8 bytes)
⚠️ No longer matching (10)
func_US2_0026F718100.00% → 0.00%func_US2_0026F730100.00% → 0.00%func_US2_0026F750100.00% → 0.00%func_US2_0026F7A0100.00% → 0.00%func_US2_0026F7B8100.00% → 0.00%func_US2_0026F808100.00% → 0.00%func_US2_0026F810100.00% → 0.00%func_US2_0026F818100.00% → 0.00%func_US2_00339A80100.00% → 0.00%func_US2_00339F90100.00% → 0.00%
SCKA_200.11
| Code matched | 62.70% · 3.46 MB of 5.52 MB |
| Fuzzy match | 62.70% |
| Functions | 7,296 / 8,545 |
| Units complete | 892 / 1,144 |
No function changes.
Commit 13cfad4 · Ratchet & Clank: Going Commando on ByteMatch
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.
Before: the boot's empty 8-byte level hooks were paired with v1.01's by order. USA v2.00 has its hooks 8 bytes on and one more, and PAL has its own run, so many release hooks had another hook's name (func_0026F748, the hero's state change hook, among them). OpenRAC had to pair them again by their callers (pair_stubs).
After: carry.py pairs each hook by the calls to it. A v1.01 function with a place in the release, or the one release function of the same shape, calls the release's hook at the same word. A hook that no call names takes its place in the run between two named ones, where both moved alike. The USA v2.00 and PAL catalogues and sources use these names. The hook only USA v2.00 has is func_US2_0026F7E0 (stub_empty_us2), and PAL's empty overlay callback is v1.01's func_0032A130 (moby_do_nothing).
Tested:
tools/build.py all --version us2and--version pal: every program builds to the retail bytes, and placed.json changes only in hook names and values. carry.py's pairing gives exactly the committed names of every 8-byte empty row in both releases. Unit tests (725, with a new carry test), check_repository and names.py check pass.