Skip to content

fix(carry): name the release's empty level hooks by their callers - #466

Merged
Lynder063 merged 2 commits into
OpenRAC:masterfrom
nickyyOO:fix/hook-names-by-callers
Nov 17, 2026
Merged

Lynder063 merged 2 commits into
OpenRAC:masterfrom
nickyyOO:fix/hook-names-by-callers

Conversation

@nickyyOO

Copy link
Copy Markdown
Contributor

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 us2 and --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.

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.
@bytematchdev

bytematchdev Bot commented Nov 16, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCPS_150.56

Code matched 63.09% · 3.47 MB of 5.50 MB
Fuzzy match 63.09%
Functions 7,314 / 8,534
Units complete 894 / 1,140

No function changes.

SCUS_972.68

Code matched 100.00% · 5.52 MB of 5.52 MB
Fuzzy match 100.00%
Functions 8,527 / 8,527
Units complete 1,127 / 1,127

No function changes.

SCES_516.07

Code matched 100.00% · 5.70 MB of 5.70 MB
Fuzzy match 100.00%
Functions 8,608 (+1) / 8,608
Units complete 1,359 (−11) / 1,359
✅ Newly matched (14)
  • 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_00289AA0 (8 bytes)
  • func_002FF288 (8 bytes)
  • func_0032A130 (8 bytes)
  • func_00338A58 (8 bytes)
  • func_00338F50 (8 bytes)
  • func_003417C8 (8 bytes)
⚠️ No longer matching (13)
  • func_PAL_0032B920 100.00% → 0.00%
  • func_PAL_0026F580 100.00% → 0.00%
  • func_PAL_0026F598 100.00% → 0.00%
  • func_PAL_0026F5B8 100.00% → 0.00%
  • func_PAL_0026F608 100.00% → 0.00%
  • func_PAL_0026F620 100.00% → 0.00%
  • func_PAL_0026F670 100.00% → 0.00%
  • func_PAL_0026F678 100.00% → 0.00%
  • func_PAL_0028A468 100.00% → 0.00%
  • func_PAL_00300300 100.00% → 0.00%
  • func_PAL_0033A930 100.00% → 0.00%
  • func_PAL_0033AE40 100.00% → 0.00%
  • func_PAL_00343830 100.00% → 0.00%

SCUS_972.68_v2

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_0026F718 100.00% → 0.00%
  • func_US2_0026F730 100.00% → 0.00%
  • func_US2_0026F750 100.00% → 0.00%
  • func_US2_0026F7A0 100.00% → 0.00%
  • func_US2_0026F7B8 100.00% → 0.00%
  • func_US2_0026F808 100.00% → 0.00%
  • func_US2_0026F810 100.00% → 0.00%
  • func_US2_0026F818 100.00% → 0.00%
  • func_US2_00339A80 100.00% → 0.00%
  • func_US2_00339F90 100.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

@Lynder063
Lynder063 merged commit f9181cd into OpenRAC:master Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants