Skip to content

Match 112 NTSC-U functions using RAC3 references - #214

Draft
cadelass wants to merge 3 commits into
OpenRAC:mainfrom
cadelass:decomp/ntsc-u-rac3-crossgame
Draft

cadelass wants to merge 3 commits into
OpenRAC:mainfrom
cadelass:decomp/ntsc-u-rac3-crossgame

Conversation

@cadelass

@cadelass cadelass commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds 112 verified matches for RAC4 NTSC-U (SCUS_974.65). The batch covers the level 00 multiplayer menu, resident routines and shared overlays. The three overlapping matches already in #212 are excluded: func_L00_00519490, func_L00_00537BB0, and func_L00_007670A0.

How the functions were found and checked

  1. Indexed the retail functions with RAC3’s cross-game search. For each RAC4 function without a match, searched RAC3 PAL functions with a matching C definition. Equality after relocation masking was the strongest signal. The similarity search also compared opcodes, control flow, call patterns, constants, field offsets and stack frames.
  2. Used a similarity threshold of 0.70 to select references. Adapted the C from the pinned RAC3 revision against the RAC4 retail dump. Retargeted callees and globals, adjusted structure offsets and constants when the games differed, and used the compiler profile supported by the retail code. The C files credit their donor functions.
  3. Compiled candidates through the repository’s normal toolchain. Compared machine instructions at the RAC4 NTSC-U catalogue locations and separately resolved relocations against retail. Candidates with differing code, unresolved references, or disagreement about the function boundary in the older inventory were kept out of this PR.

Validation

  • Recompiled all 112 added source files on this branch. All 112 matched NTSC-U and all 740 relocation checks passed.
  • The legacy audits reported 87 exact functions and 703 checked relocations with zero mismatches or unresolved references. The other 25 functions were checked at their native NTSC-U catalogue locations.
  • tools/progress.py --version us --check and git diff --check upstream/main...HEAD passed.
  • Local build validation covered the new source files. The PAL retail dump was unavailable, so the PAL map and report still need regeneration. The PAL report check currently fails on missing coverage. The PR is a draft.

Functions by commit

8f71782f — 83 level 00 multiplayer menu routines

  • func_L00_004F1738, func_L00_004F7680, func_L00_004F7FE0, func_L00_004F8028, func_L00_004F8070, func_L00_004F8220, func_L00_004F84C8, func_L00_004F8888
  • func_L00_004F8A38, func_L00_004F8B28, func_L00_004F8CD8, func_L00_004F8E50, func_L00_004F9080, func_L00_004FBCC8, func_L00_004FC7B0, func_L00_004FC9D8
  • func_L00_004FCCC8, func_L00_004FD460, func_L00_004FE2C8, func_L00_004FE448, func_L00_00500070, func_L00_005001D8, func_L00_005005D0, func_L00_005005F8
  • func_L00_00500798, func_L00_005009D0, func_L00_00500D48, func_L00_00500E00, func_L00_005010B0, func_L00_005015B0, func_L00_005017D8, func_L00_00501A88
  • func_L00_00501F00, func_L00_005029A0, func_L00_005032F8, func_L00_00503E88, func_L00_00503F10, func_L00_00504A10, func_L00_00504FC0, func_L00_00505168
  • func_L00_00505478, func_L00_00505C08, func_L00_00505D50, func_L00_00505E00, func_L00_00507530, func_L00_005076D0, func_L00_005078A8, func_L00_00507AF0
  • func_L00_00507BC0, func_L00_00507EB0, func_L00_00508280, func_L00_0050D280, func_L00_0050D9B8, func_L00_0051A350, func_L00_0051A868, func_L00_0051AA08
  • func_L00_0051C1B8, func_L00_0051D6B8, func_L00_0051DBC8, func_L00_00526CD8, func_L00_00526F00, func_L00_00527598, func_L00_00528948, func_L00_0052C0A0
  • func_L00_0052C878, func_L00_0052D298, func_L00_0052F630, func_L00_0052FFD8, func_L00_005363C0, func_L00_005383D0, func_L00_0053A538, func_L00_0053D918
  • func_L00_00541430, func_L00_00541CF8, func_L00_00545F88, func_L00_005466E8, func_L00_005476D8, func_L00_00553F60, func_L00_0055A7F8, func_L00_005664A8
  • func_L00_005664D0, func_L00_005C14E0, func_L00_00770228

e91aa24d — 29 resident and shared routines

  • func_0012C1B8, func_001385A0, func_0013A460, func_0013B510, func_0013D230, func_001428A0, func_00144208, func_003F7118
  • func_00453FA8, func_004E4DF0, func_L00_005E8F44, func_L00_005EBD64, func_L00_0062989C, func_L00_00654E7C, func_L00_0066AA4C, func_L00_00682940
  • func_L00_00682CD4, func_L00_00684230, func_L00_00698E8C, func_L00_0069BB10, func_L00_006A9020, func_L00_006F0CC0, func_L00_006F3990, func_L00_006F6FE0
  • func_L00_006F7110, func_L00_006FF274, func_L00_00701574, func_L01_00420F68, func_L02_003C5F10

a9f598a6 — NTSC-U map and progress

Records the accepted matches and updates the near-miss index after the verified C replaces those drafts.

cadelass and others added 3 commits December 5, 2026 21:17
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
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.

1 participant