Skip to content

Integrate reviewed US and PAL matches with verified bindings - #209

Merged
llesieur99 merged 210 commits into
OpenRAC:mainfrom
llesieur99:codex/rac4-open-prs-20261203
Dec 4, 2026
Merged

llesieur99 merged 210 commits into
OpenRAC:mainfrom
llesieur99:codex/rac4-open-prs-20261203

Conversation

@llesieur99

Copy link
Copy Markdown
Collaborator

Summary

Integrate the ready RAC4 pull requests #198, #200, #201, #202 and #205 on current main, preserving their commits and resolving shared generated files in one refreshed report set.

  • Combine the PAL level-00 translation unit extended independently by Match 604 PAL functions across menus and overlays #200 and Match 273 PAL-only functions (28 with @divpad, depends on #204) #205. All five functions in the combined object match their PAL retail bytes.
  • Keep Add vu0.h helpers and match 7 NTSC-U functions #202's VU0 helper policy aligned with the shared helper practice in RAC3, while ordinary EE code remains plain C.
  • Give the PAL menu-state pointer, the level-08 and level-11 pools, and the level-14 effect float distinct C symbols from the resident init flag and shared registration guards. The PAL data-symbol table records their retail addresses and all 56 guard references across 14 level copies.
  • Recut the PAL inventory from the integrated matches, then regenerate both maps and reports. Two PAL sources now use their canonical resident names; a 116-byte aggregate that overlaps an independently matched 100-byte entry is retained in nonmatching/ with a resume condition. Preserve a proven 156-byte function when zero padding precedes linker fill. This also fixes the stale PAL rows that failed Add vu0.h helpers and match 7 NTSC-U functions #202's standalone report check.

The ready PRs retain their exact functions: #198 30/30, #200 603/604 (one overlapping aggregate parked in nonmatching/), #201 13/13, #202 7/7 and #205 273/273. The open drafts #195 and #196 are not part of this integration. #195 explicitly asks not to merge before its four PAL overlaps are reconciled.

Validation

  • Combined PAL level-00 translation unit: five functions compile and match their native byte sequences. Four other menu files had a prototype conflict between Match 604 PAL functions across menus and overlays #200 and Match 273 PAL-only functions (28 with @divpad, depends on #204) #205; their seven calls now share one signature, and all four functions still match PAL bytes.
  • Retail $gp references confirm the distinct PAL data locations: menu pointer 0x0021E070, resident init flag 0x0021E0F8, level-08 moby pool 0x00222714, level-08 registration guard 0x002229C4, level-11 pool 0x00222794, and level-14 float 0x0022270C.
  • 37 focused tool tests pass (PAL/US relocation audits, map, nonmatching, inventory and plain-C policy).
  • The integrated source set has 11,838/11,838 valid game ELF objects, 11 libgcc objects and 26 libm objects. Four cross-PR prototype failures in the initial wrapper run were corrected and recompiled; every source now predates its object.
  • US relocation audit: 545 checked, 0 mismatches and 0 unresolved. PAL relocation audit: 15,970 checked across 1,944 exact native functions, 0 mismatches and 0 unresolved.
  • US/PAL maps and reports regenerate and pass --check; the PAL inventory and catalogue reach a byte-identical fixed point. 895 changed C files have no banned ordinary-EE constructs.

chistianh and others added 30 commits November 24, 2026 18:45
Menu and save-screen pages (004A6490 to 004D5240), the three group
selectors 004628C0/004629A0/00462A80, the start-of-mode function
0045A210 and the setup function 004FADB8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request/reply helpers of the level 00 multiplayer menu (0070E450 to
007750B8) and the shared request queue function 00699C48.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the Dreadzone ID-slot pair, overlay state updates, and a copy record adapter. Share the L01 scene data layout with the existing initializer.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Co-authored-by: Codex <noreply@openai.com>
JeremyL71 and others added 26 commits December 3, 2026 07:52
Shared overlay: func_L01_0045BC88, func_L04_00499228, func_L02_004CDD50,
func_L02_004C9D20, func_L00_00707320, func_L02_004CB1D8, func_L05_004DF408,
func_L01_003E80B0
Level: func_L00_007572A0, func_L00_0077BE90, func_L00_0077C0E0,
func_L00_0076A4A8, func_L00_0076AA78, func_L00_0076BA88, func_L01_00456868,
func_L00_0076BC30, func_L00_00770FB0, func_L00_00776538, func_L00_007766E8,
func_L00_0077FF78, func_L00_0075AAC8, func_L01_00531460, func_L00_0071C5B0,
func_L00_0074F038, func_L00_00777490
Main: func_004795A8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004EB098, func_L01_003D7540, func_L01_004A8DF8,
func_L01_00474C98, func_L01_004A92C8, func_L00_00612338, func_L01_003EC5A0,
func_L01_004A8FB0, func_L02_004C9038, func_L01_004340D0, func_L01_004A9B80,
func_L00_005AC050, func_L01_0046B100, func_L01_004A9490
Level: func_L02_004007F8, func_L00_0071E7A8, func_L15_004DDF70,
func_L00_00725FF8, func_L00_0074A0C8, func_L00_007825E8, func_L01_00457CC0,
func_L41_003BE160, func_L05_003E5CA8, func_L00_00718A30
Main: func_0044A8E0

func_L41_003BE160 declares func_00476678 with its int argument last, as
0051CCC0.c does (ints and floats take separate EE argument registers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_00614E70, func_L01_00654C20, func_L01_004DDCD8
Level: func_L00_00713CB0, func_L15_005053A0, func_L00_00758EB8
Main: func_00469B80, func_004EFEF8, func_0048B778, func_004222C8,
func_0044AC70, func_005482D8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_005B1A78, func_L00_006BA3F0, func_L01_004ED760,
func_L01_004A8BB8, func_L01_004146B0, func_L01_004DB208, func_L01_004A97E0,
func_L01_004EE648, func_L04_004E84C0, func_L01_00441040, func_L01_00523220,
func_L01_00588568
Level: func_L00_00760000, func_L01_00531970, func_L15_00503B60,
func_L00_00757CB0, func_L00_00720B48, func_L01_005102E0, func_L01_00531700,
func_L41_00445270, func_L00_00780A00, func_L00_0074D4C0, func_L00_0077EF00,
func_L01_0050C010, func_L05_003E26F8, func_L00_0075BCB0
Main: func_004AE2D8, func_0044AE78, func_0050DF08

func_L00_00777490 (from an earlier commit) now returns func_0015BA30's
result, which func_L00_00780A00 uses; its code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004B8520, func_L01_004EF6D8, func_L01_0062B6C0,
func_L01_0047E848, func_L01_004B3F88
Level: func_L01_004E7850, func_L00_00726B70, func_L00_0072B3F8,
func_L00_00721C50, func_L00_00743098, func_L41_006240A0, func_L01_005086B0,
func_L00_0073DEC8, func_L00_0073FCF0
Main: func_004532C0, func_00458F10, func_004E3548

Seven were near misses of earlier batches, closed with levers found since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_00406688, func_L01_0049C140, func_L01_004D4F30,
func_L01_004B0310, func_L01_004EAD78, func_L05_0046A328, func_L00_005D6558,
func_L01_00421C08, func_L00_005ABA70
Level: func_L00_00745008, func_L15_004EDC50, func_L00_0072BF68,
func_L02_004C1168, func_L00_00735618, func_L00_0077F218, func_L15_004EE3C0
Main: func_004BE808, func_005430B0

Three were near misses of earlier batches, closed with levers found since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_00446DA0
Level: func_L00_0073BE18, func_L00_00754C90, func_L00_0074F918,
func_L00_00768C60, func_L05_00698D48, func_L15_006907E0, func_L00_00760CC0
Main: func_004D3290, func_004AA2E0, func_004E7F28

func_L05_00698D48 and func_L15_006907E0 call func_L00_0065BA18 and
func_L00_0065BB60 with one argument, which those wrappers pass on to
func_004D0ED8; the shared definitions are written as void(void), as
L01_004ABE88.c already calls func_L00_0065BB60 with two arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004B7F00, func_L01_0043C578, func_L01_00453578,
func_L01_004A6770, func_L00_00594AC8, func_L00_005AB038, func_L00_0068F6A8
Level: func_L00_00727EB8, func_L41_003DF1A8, func_L00_00777640,
func_L00_0071EE50
Main: func_00528078

func_L00_0068F6A8 goes into L00_00691168.c. Both functions read D_002203B4
through $gp, which needs the variable defined in the same file. The new
function indexes the bytes of the u16 at +0x68 that func_L00_00691168
tests, so Obj.x68 becomes a union of both views; func_L00_00691168 still
matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Level: func_L00_0075ACB0, func_L00_0074D7A8, func_L00_0075AC70,
func_L00_00764088, func_L00_0072ACF0, func_L00_00736E50, func_L01_0050BA38,
func_L08_003E7750, func_L01_00516F88, func_L00_00780598, func_L00_007581D8
Shared overlay: func_L01_0056FE58
Main: func_004EF280, func_004F5AF8

func_L00_007581D8 goes into L00_00757590.c: both use D_00221478, which is
defined there and reached through $gp, so it must be defined in the file of
each user. func_L00_00757590 still matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Level: func_L00_00734790, func_L41_003D7218, func_L00_0075BF90,
func_L00_00738F38
Shared overlay: func_L00_005C66E8, func_L01_003D0660, func_L02_004CDFA0
Main: func_005412B0, func_004F7428, func_0051B270

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Level: func_L41_004420F8, func_L00_00774210, func_L00_0075DB30
Shared overlay: func_L01_004D1DF0, func_L01_004A9D60, func_L00_006B8A38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the existing storage symbol and the same slot type for reset, enable and update. Target code and relocation positions stay identical, with the PAL table operands resolving to the canonical binding.
Keep curated PAL rows when regenerating the legacy index. Index ten existing drafts, correct their reproduction commands, and retire the stale archive of an already matched placement.
Level: func_L00_0072E3F8, func_L00_00758010, func_L00_0072AFB0,
func_L00_00757748
Shared overlay: func_L01_004DA240, func_L00_0058B868

func_L00_0072E3F8 and func_L00_0072AFB0 use -fmove-all-movables: without it
loop.c hoists one invariant only in its second pass, after the
strength-reduction inits, and the loop preheader comes out in a different
order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.31% (+3.86%) · 1.53 MB of 5.80 MB
Fuzzy match 27.32% (+3.72%)
Functions 11,216 (+905) / 18,376
Units complete 5,676 (+121) / 5,734
✅ Newly matched (929)
  • func_004C5650 (3,400 bytes)
  • func_004C0A58 (2,248 bytes)
  • func_L00_0072E3F8 (2,052 bytes)
  • func_004C1320 (2,008 bytes)
  • func_004BCA50 (1,752 bytes)
  • func_L00_006B8A38 (1,652 bytes)
  • func_004C8650 (1,640 bytes)
  • func_L00_0075DB30 (1,544 bytes)
  • func_L01_004DA240 (1,500 bytes)
  • func_L01_004A9D60 (1,492 bytes)
  • func_L02_004CDFA0 (1,424 bytes)
  • func_0051B270 (1,348 bytes)
  • func_L00_0051F478 (1,336 bytes)
  • func_L00_0075BF90 (1,336 bytes)
  • func_L00_00738F38 (1,332 bytes)
  • func_004BF1A0 (1,280 bytes)
  • func_L01_0050BA38 (1,204 bytes)
  • func_L00_00736E50 (1,148 bytes)
  • func_004CB8E8 (1,140 bytes)
  • func_L00_00780598 (1,124 bytes)
  • func_L00_007581D8 (1,104 bytes)
  • func_L41_003D7218 (1,104 bytes)
  • func_L00_0072AFB0 (1,092 bytes)
  • func_004F8088 (1,048 bytes)
  • func_004CB038 (1,048 bytes)
  • func_L08_003E7750 (1,040 bytes)
  • func_L01_00516F88 (1,016 bytes)
  • func_L00_005AB038 (1,008 bytes)
  • func_004D5240 (1,000 bytes)
  • func_L00_0071EE50 (992 bytes)
  • …and 899 more
⚠️ No longer matching (28)
  • func_FB_004F7988 100.00% → 0.00%
  • func_004F8840 100.00% → 0.00%
  • func_004E8D80 100.00% → 0.00%
  • func_004F7F78 100.00% → 0.00%
  • func_L00_00526BA0 100.00% → 0.00%
  • func_L01_00574EC0 100.00% → 0.00%
  • func_L00_00520F68 100.00% → 0.00%
  • func_L00_00662BB0 100.00% → 0.00%
  • func_L00_0073E1B8 100.00% → 0.00%
  • func_L00_00741318 100.00% → 0.00%
  • func_L00_00743AB8 100.00% → 0.00%
  • func_L00_00745830 100.00% → 0.00%
  • func_L00_00748FF8 100.00% → 0.00%
  • func_L00_0074A390 100.00% → 0.00%
  • func_L00_0074D9B0 100.00% → 0.00%
  • func_L00_0074DFC8 100.00% → 0.00%
  • func_L00_0053C3E0 100.00% → 0.00%
  • func_L00_005424A8 100.00% → 0.00%
  • func_L00_00508260 100.00% → 0.00%
  • func_L00_00521468 100.00% → 0.00%
  • func_L00_005E6C38 100.00% → 0.00%
  • func_L00_00608680 100.00% → 0.00%
  • func_L01_00696278 100.00% → 0.00%
  • func_L00_007149D0 100.00% → 0.00%
  • func_L00_007149D8 100.00% → 0.00%
  • func_L00_007149E0 100.00% → 0.00%
  • func_L00_007149F0 100.00% → 0.00%
  • func_L00_00714A10 100.00% → 0.00%
📈 Improved (3)
  • func_L00_0053C4F8 0.00% → 98.86%
  • func_L00_00528678 0.00% → 95.04%
  • func_L00_0051CA48 0.00% → 70.56%
📉 Worse (19)
  • func_0050DB58 97.22% → 0.00%
  • func_0051C158 96.43% → 0.00%
  • func_004B50C0 98.19% → 0.00%
  • func_0049E710 99.37% → 0.00%
  • func_004EE6C0 97.57% → 0.00%
  • func_004B6028 97.83% → 0.00%
  • func_004B39A0 96.83% → 0.00%
  • func_004B33E8 96.61% → 0.00%
  • func_0048B280 96.98% → 0.00%
  • func_004B1890 95.69% → 0.00%
  • func_004DD160 95.00% → 0.00%
  • func_01EE1690 92.00% → 0.00%
  • func_0049A410 90.22% → 0.00%
  • func_004CDC60 93.75% → 0.00%
  • func_00163AD0 99.34% → 0.00%
  • func_01EBF9D0 93.75% → 0.00%
  • func_004BA220 95.16% → 0.00%
  • func_004CBF90 88.64% → 0.00%
  • func_01ED6218 91.67% → 0.00%

SCUS_974.65

Code matched 21.67% (+0.09%) · 1.25 MB of 5.78 MB
Fuzzy match 22.85% (+0.04%)
Functions 10,087 (+20) / 18,172
Units complete 5,548 (+6) / 5,607
✅ Newly matched (20)
  • func_004F7008 (1,048 bytes)
  • func_004F77C0 (636 bytes)
  • func_004E7E58 (528 bytes)
  • func_004979A8 (308 bytes)
  • func_L00_00739F70 (308 bytes)
  • func_004F6EF8 (272 bytes)
  • func_L00_00546E70 (224 bytes)
  • func_0048A170 (192 bytes)
  • func_L00_004FBC20 (164 bytes)
  • func_L00_00506128 (164 bytes)
  • func_L00_0077C5C8 (156 bytes)
  • func_L00_0077C668 (152 bytes)
  • func_L00_00507498 (148 bytes)
  • func_L00_004F89B0 (136 bytes)
  • func_L00_00507CE0 (128 bytes)
  • func_L00_00762138 (128 bytes)
  • func_L00_00726AA8 (108 bytes)
  • func_L00_00779DD0 (100 bytes)
  • func_L00_006BB4A8 (52 bytes)
  • func_L01_004ED110 (36 bytes)
⚠️ No longer matching (5)
  • func_004F7008 100.00% → 0.00%
  • func_004F77C0 100.00% → 0.00%
  • func_004E7E58 100.00% → 0.00%
  • func_004979A8 100.00% → 0.00%
  • func_004F6EF8 100.00% → 0.00%

Commit 7812248 · Ratchet: Deadlocked on ByteMatch

@llesieur99
llesieur99 merged commit 7812248 into OpenRAC:main Dec 4, 2026
1 check 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.

6 participants