Skip to content

Match 16 PAL-only functions (one in 10 level overlays, 6 big ones) - #211

Open
JeremyL71 wants to merge 3 commits into
OpenRAC:mainfrom
JeremyL71:pal/jeremyl71-batch3
Open

JeremyL71 wants to merge 3 commits into
OpenRAC:mainfrom
JeremyL71:pal/jeremyl71-batch3

Conversation

@JeremyL71

@JeremyL71 JeremyL71 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Matches 16 PAL-only functions, each in a file of its own. Builds on main after #209.

  • One function that the retail disc carries in 10 level overlays (first commit).
  • Six big functions, 1–2.5 KB: one in the main image, five in the multiplayer menu (second commit).
Copy File
func_L01_00604E40 src/pal/overlays/l01_dreadzone_station/L01_00604E40.c
func_L02_005B4FF0 src/pal/overlays/shared/L02_005B4FF0.c
func_L04_005B4B98 src/pal/overlays/l04_sarathos_swamp/L04_005B4B98.c
func_L05_005DADB8 src/pal/overlays/l05_dark_cathedral/L05_005DADB8.c
func_L06_005ACD78 src/pal/overlays/shared/L06_005ACD78.c
func_L07_0059FD50 src/pal/overlays/l07_valix_lighthouse/L07_0059FD50.c
func_L10_005C2090 src/pal/overlays/shared/L10_005C2090.c
func_L11_005AEE30 src/pal/overlays/l11_tempus_station/L11_005AEE30.c
func_L15_005D2B50 src/pal/overlays/l15_control_level/L15_005D2B50.c
func_L41_0056C970 src/pal/overlays/l41_battledome_tower/L41_0056C970.c
  • The routine is 1308 bytes in every level. The ten files differ only in each level's tables and $gp globals.
  • func_L07_0059FD50 is the first PAL source for level 07, so it opens src/pal/overlays/l07_valix_lighthouse/, the name the US tree uses.
  • A block-local one (set to 0, then to 1 just before id == one) keeps loop.c from merging the compare constant with the two stores of 1, as retail does. The dead one = 0 emits no code.
Function File
func_0044B920 src/pal/game/0044B920.c
func_L00_00747DD0 src/pal/overlays/l00_multiplayer_menu/L00_00747DD0.c
func_L00_00751D98 src/pal/overlays/l00_multiplayer_menu/L00_00751D98.c
func_L00_00756998 src/pal/overlays/l00_multiplayer_menu/L00_00756998.c
func_L00_00772330 src/pal/overlays/l00_multiplayer_menu/L00_00772330.c
func_L00_00777D90 src/pal/overlays/l00_multiplayer_menu/L00_00777D90.c
  • The menu-page builders (func_L00_00756998 and its neighbours) use one static inline initialiser per item class: inline arguments are evaluated left to right, which gives retail's load / call / load order.
  • func_L00_00747DD0 uses /* cflags: -fno-gcse */ to keep a float scale in $f20 across a loop.

Checks

  • match_map.py --update-native (PAL and US): the 16 functions are match in config/pal/map.tsv.
  • audit_pal_relocs.py: 913 relocations in the 16 functions (640 + 273), 0 mismatches, 0 unresolved.
  • progress.py --check and match_map.py --check pass for US and PAL. inventory.py --version pal --write leaves config/pal/inventory.tsv unchanged.
  • PAL: 11216 → 11232 functions, 26.31 % → 26.73 % of the code.

The functions are reserved in my comment on #112.

🤖 Generated with Claude Code

func_L01_00604E40, func_L02_005B4FF0, func_L04_005B4B98, func_L05_005DADB8,
func_L06_005ACD78, func_L07_0059FD50, func_L10_005C2090, func_L11_005AEE30,
func_L15_005D2B50, func_L41_0056C970: the same 1308-byte routine in each
level overlay. The C is identical apart from each level's tables and $gp
globals (all 0 in every level). func_L07_0059FD50 is the first PAL source of
level 07, so it opens src/pal/overlays/l07_valix_lighthouse/ (the US name).

The block-local `one` (set to 0, then to 1 just before `id == one`) keeps
loop.c from merging the compare constant with the two stores of 1, as
retail does; the dead `one = 0` emits no code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bytematchdev

bytematchdev Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

ByteMatch progress report

SCES_532.85

Code matched 26.73% (+0.42%) · 1.55 MB of 5.80 MB
Fuzzy match 27.74% (+0.42%)
Functions 11,232 (+16) / 18,376
Units complete 5,677 (+1) / 5,735
✅ Newly matched (16)
  • func_L00_00747DD0 (2,532 bytes)
  • func_L00_00756998 (2,268 bytes)
  • func_L00_00772330 (2,260 bytes)
  • func_L00_00777D90 (1,752 bytes)
  • func_L00_00751D98 (1,632 bytes)
  • func_L06_005ACD78 (1,308 bytes)
  • func_L02_005B4FF0 (1,308 bytes)
  • func_L10_005C2090 (1,308 bytes)
  • func_L01_00604E40 (1,308 bytes)
  • func_L04_005B4B98 (1,308 bytes)
  • func_L05_005DADB8 (1,308 bytes)
  • func_L07_0059FD50 (1,308 bytes)
  • func_L11_005AEE30 (1,308 bytes)
  • func_L15_005D2B50 (1,308 bytes)
  • func_L41_0056C970 (1,308 bytes)
  • func_0044B920 (1,032 bytes)

SCUS_974.65

Code matched 21.67% · 1.25 MB of 5.78 MB
Fuzzy match 22.85%
Functions 10,087 / 18,172
Units complete 5,548 / 5,607

No function changes.

Commit 84b4525 · Ratchet: Deadlocked on ByteMatch

JeremyL71 and others added 2 commits December 5, 2026 18:03
Main: func_0044B920
Multiplayer menu (level 00): func_L00_00747DD0, func_L00_00751D98,
func_L00_00756998, func_L00_00772330, func_L00_00777D90

func_L00_00756998 and its neighbours build menu pages with one static
inline initialiser per item class: inline arguments are evaluated left to
right, which gives retail's load / call / load order. func_L00_00747DD0
keeps a float scale in $f20 across a loop with -fno-gcse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch3 branch from 20abbb6 to 84b4525 Compare December 5, 2026 17:03
@JeremyL71 JeremyL71 changed the title Match one PAL function present in 10 level overlays Match 16 PAL-only functions (one in 10 level overlays, 6 big ones) Dec 5, 2026
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