Skip to content

Match 43 NTSC-U functions in C (shared overlays and level 00 menu) - #212

Draft
cadelass wants to merge 12 commits into
OpenRAC:mainfrom
cadelass:decomp/ntsc-u-shared-more
Draft

cadelass wants to merge 12 commits into
OpenRAC:mainfrom
cadelass:decomp/ntsc-u-shared-more

Conversation

@cadelass

@cadelass cadelass commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Matches 43 NTSC-U functions in C (11 shared overlay functions, 32 level 00 multiplayer menu functions), on top of the current main. Four functions from the earlier local batch (func_L00_0059AA78, func_L05_004EEFE0, func_L41_003BD898, func_L41_0040E680) were matched upstream in the meantime and are left out.

34726a9 Match 11 shared overlay functions across L00, L01, L06 and L41

  • L00: func_L00_006F6E68 (-mno-split-addresses), func_L00_006B7FE4
  • L01: func_L01_004AF620 (-mno-split-addresses), func_L01_004B6EB8, func_L01_005241D8, func_L01_0056FC88, func_L01_005B6C08, func_L01_0068EC48
  • L06: func_L06_004C7010
  • L41: func_L41_00411C20, func_L41_004438E0
  • func_L00_006CB868 returns a value, so its extern in L01_004AF1F0.c and L01_006C1388.c now says s32 (both functions still exact).

d280655 Document the small-table la lever

docs/agents/levers.md: a table of 8 bytes or less (sized array, or a scalar indexed through its address) gives one la macro, which keeps retail's adjacent lui/addiu after an index sll (func_L00_0059AA78).

c463f89 Update the NTSC-U map for 11 shared matches

Generated file, last commit only. tools/match_map.py --write on this branch adds exactly these 11 rows.

9030914 Match 11 level 00 multiplayer menu functions

func_L00_00519490, func_L00_00538B68, func_L00_005390E0, func_L00_00545EA8, func_L00_005BDF70, func_L00_00711708, func_L00_00766DD0, func_L00_007670A0, func_L00_0076B4E8, func_L00_0076CC40, func_L00_0076ECA8. Some use the module's Sony EE GCC route (@ee29 -O2 -G0, like their neighbours); func_L00_00519490, func_L00_005390E0 and func_L00_00545EA8 also need -fno-strict-aliasing (already on 95 merged files).

5c9e986 Document the @ee29 route and -fno-strict-aliasing for workers

docs/agents/levers.md and docs/agents/queue.md: use the neighbouring files' @ee29 line; add -fno-strict-aliasing when a candidate is a few bytes short with it.

e04ee74 Update the NTSC-U map for 11 level 00 matches

Generated rows only. (The PR has two map commits because the branch was already pushed; happy to squash them on request.)

4efe6f6 Match 9 more level 00 multiplayer menu functions

func_L00_00513368 (@ee296 -O2 -G0 -falign-jumps=1, like its neighbours), func_L00_00541080 (@ee29), func_L00_00708258, func_L00_007094D8, func_L00_00709158, func_L00_0070AB68, func_L00_0076F368, func_L00_00775EE0, func_L00_0077D000.

3f4ec3b Update the NTSC-U map for 9 level 00 matches

Generated rows only.

bcb849f Match 12 more level 00 multiplayer menu functions

func_L00_004F5018, func_L00_0051CB60, func_L00_00537BB0, func_L00_00552C88, func_L00_0071D120, func_L00_007221C8, func_L00_0073B4E8, func_L00_007650B8, func_L00_007705C0, func_L00_00772210, func_L00_00772348, func_L00_0076C1F0.
func_L00_004F5018, func_L00_0051CB60 and func_L00_00552C88 match at the config/overlay_functions.tsv / map boundaries (160, 212 and 332 bytes). config/us/functions.tsv still carries the older merged sizes (308, 312, 348) from before func_L00_004F50B8 and func_L00_0051CC70 were split off and matched, so match_map.py --update-native refuses them; --write produces exactly these three match rows and changes nothing else.

be09778 Update the NTSC-U map for 12 level 00 matches

Generated rows only.

Checks

  • JOBS=8 tools/build.sh: OK
  • tools/audit_matches.py: 7870 exact, 200 not exact. None of the 200 are in this PR; they were already not exact on main.
  • tools/match_map.py --version us --check: OK (12596 rows)

🤖 Generated with Claude Code

cadelass and others added 3 commits December 4, 2026 18:52
func_L00_006F6E68, func_L00_006B7FE4, func_L01_004AF620,
func_L01_004B6EB8, func_L01_005241D8, func_L01_0056FC88,
func_L01_005B6C08, func_L01_0068EC48, func_L06_004C7010,
func_L41_00411C20 and func_L41_004438E0. func_L00_006CB868 returns a
value, so its declarations in L01_004AF1F0.c and L01_006C1388.c now say s32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cadelass and others added 3 commits December 4, 2026 23:58
func_L00_00519490, func_L00_00538B68, func_L00_005390E0,
func_L00_00545EA8, func_L00_005BDF70, func_L00_00711708,
func_L00_00766DD0, func_L00_007670A0, func_L00_0076B4E8,
func_L00_0076CC40 and func_L00_0076ECA8. Some use the module's Sony EE
GCC route (@ee29 -O2 -G0); func_L00_00519490, func_L00_005390E0 and
func_L00_00545EA8 also need -fno-strict-aliasing, as 95 merged files do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cadelass cadelass changed the title Match 11 more shared NTSC-U overlay functions in C Match 22 NTSC-U functions in C (shared overlays and level 00 menu) Dec 4, 2026
cadelass and others added 2 commits December 5, 2026 13:31
func_L00_00513368, func_L00_00541080, func_L00_00708258,
func_L00_007094D8, func_L00_00709158, func_L00_0070AB68,
func_L00_0076F368, func_L00_00775EE0 and func_L00_0077D000.
func_L00_00513368 uses the module's @ee296 -O2 -G0 -falign-jumps=1
route and func_L00_00541080 @ee29, like their neighbours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cadelass cadelass changed the title Match 22 NTSC-U functions in C (shared overlays and level 00 menu) Match 31 NTSC-U functions in C (shared overlays and level 00 menu) Dec 5, 2026
cadelass and others added 2 commits December 5, 2026 14:25
func_L00_004F5018, func_L00_0051CB60, func_L00_00537BB0,
func_L00_00552C88, func_L00_0071D120, func_L00_007221C8,
func_L00_0073B4E8, func_L00_007650B8, func_L00_007705C0,
func_L00_00772210, func_L00_00772348 and func_L00_0076C1F0.

func_L00_004F5018, func_L00_0051CB60 and func_L00_00552C88 match at the
config/overlay_functions.tsv and map boundaries (160, 212 and 332 bytes);
config/us/functions.tsv still has the older merged sizes, from before
func_L00_004F50B8 and func_L00_0051CC70 were split off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cadelass cadelass changed the title Match 31 NTSC-U functions in C (shared overlays and level 00 menu) Match 43 NTSC-U functions in C (shared overlays and level 00 menu) Dec 5, 2026
cadelass and others added 2 commits December 5, 2026 23:23
func_L00_004F8888, func_L00_004F8A38, func_L00_004F8CD8,
func_L00_004F8E50, func_L00_004F9080, func_L00_004FDA60,
func_L00_00765A68, func_L00_00776D08 and func_L00_00778580.

func_L00_004F8888, func_L00_004F8CD8, func_L00_004F9080 and
func_L00_004FDA60 are adapted from rac3-decomp (func_L39_004BCA88,
func_L39_004BCED8, func_L39_004BD280 and func_L39_004C1C60), the same
code in both games; each file says so on its first lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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