Skip to content

feat(us): match 23 more small NTSC-U level functions - #6

Merged
llesieur99 merged 8 commits into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-after135-20261106
Nov 6, 2026
Merged

llesieur99 merged 8 commits into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-after135-20261106

Conversation

@llesieur99

@llesieur99 llesieur99 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow up to merged PR #4 on upstream master 6bcc69b01f2fa5af0c0eec83cd2fd8a5ccf79327. Match 23 additional NTSC-U-only level functions smaller than 200 bytes in plain C: 1,792 distinct function-body bytes across 242 level placements.

The latest wave adds three functions (328 body bytes, 18 placements): two multiplayer menu wrappers and a 96-byte table scan present in 16 levels. The table scan keeps the table base separate from its three-word slot offset to reproduce stock compiler output. All 18 placement relocations resolve exactly to retail.

The earlier 36-byte func_L39_005A3D9C starts 4 mod 8 in all 17 multiplayer levels. Its stock compiler output matches retail but has one trailing zero alignment word. After stock MATCH, the build verifies one function, one zero padding word, no other allocated data, and no relocation in the padding. It changes only the generated ELF .text size/alignment metadata. No C instruction or retail byte is rewritten. A standalone PS2 link and every retail placement verify the 36-byte body.

Validation

  • Stock native checks report MATCH for all 23 sources with inherited flags, no inline assembly or register pins. Independent relocation proofs cover all 242 retail placements.
  • On head fe987850a2a97ca064997e0c5724506602b749a8, the full NTSC-U build reports SCUS_973.53: 54 of 54 targets match. An independent linked-section audit confirms 158 C functions in 2,168 placements and 120,537,627 non-BSS bytes identical to retail across all 54 programs.
  • All 50 unit tests pass with python -S; repository checks pass. The staged files were scanned for disc/archive references, private paths, and keys.

Limits

This contribution targets NTSC-U only. The PAL disc is unavailable, so the PAL full build and two-disc carry remain unverified. The official NTSC-U report remains at 6,341 exact functions and 730,328 exact bytes (9.73%) until these linked C functions are carried into that counter. The full build is byte-exact; gameplay has not been validated.

Only C source, build tools, tests, configuration, documentation, and generated header/report updates are included. No retail programs, assembly dumps, game assets, or proprietary toolchains are published.

Build on upstream master after PR OpenRAC#4 merged. Add seven NTSC-U-only C functions under 200 bytes across 36 level placements, including one source with a per-level gp slot alias.

Validated by stock checks, per-placement relocation proof, 54/54 full NTSC-U builds, independent linked byte audit, 45 unit tests and repository checks. The official carried counters remain unchanged for these seven pending the maintainers carry.
@bytematchdev

bytematchdev Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

ByteMatch progress report

SCES_524.56

Code matched 10.40% · 784.63 KB of 7.55 MB
Fuzzy match 10.40%
Functions 6,485 / 16,164
Units complete 276 / 419

No function changes.

SCUS_973.53

Code matched 9.73% · 730.33 KB of 7.51 MB
Fuzzy match 10.57% (+0.02%)
Functions 6,341 / 16,222
Units complete 291 / 391
✅ Newly matched (23)
  • func_L39_0065F0B0 (152 bytes)
  • func_L39_00572710 (136 bytes)
  • func_L40_003EF8A8 (132 bytes)
  • func_L39_005A34C8 (132 bytes)
  • func_L39_00679E90 (116 bytes)
  • func_L39_00679F90 (116 bytes)
  • func_L40_00448D68 (96 bytes)
  • func_L40_0053CF40 (92 bytes)
  • func_L39_0067C220 (80 bytes)
  • func_L39_005A3550 (76 bytes)
  • func_L39_005A3680 (76 bytes)
  • func_L39_006DAA58 (72 bytes)
  • func_L39_005C0918 (64 bytes)
  • func_L39_006933F0 (64 bytes)
  • func_L39_00669978 (56 bytes)
  • func_L39_006D06F8 (52 bytes)
  • func_L39_006DA4C8 (52 bytes)
  • func_L40_0053C788 (48 bytes)
  • func_L39_0067C0E0 (48 bytes)
  • func_L39_006D5570 (44 bytes)
  • func_L39_005A3D9C (36 bytes)
  • func_L39_005A42D8 (28 bytes)
  • func_L01_0050BF40 (24 bytes)

Commit fe98785 · Ratchet & Clank: Up Your Arsenal on ByteMatch

@llesieur99 llesieur99 changed the title feat(us): match seven more small NTSC-U level functions feat(us): match nine more small NTSC-U level functions Nov 6, 2026
@llesieur99 llesieur99 changed the title feat(us): match nine more small NTSC-U level functions feat(us): match 12 more small NTSC-U level functions Nov 6, 2026
@llesieur99 llesieur99 changed the title feat(us): match 12 more small NTSC-U level functions feat(us): match 16 more small NTSC-U level functions Nov 6, 2026
@llesieur99 llesieur99 changed the title feat(us): match 16 more small NTSC-U level functions feat(us): match 19 more small NTSC-U level functions Nov 6, 2026
@llesieur99 llesieur99 changed the title feat(us): match 19 more small NTSC-U level functions feat(us): match 20 more small NTSC-U level functions Nov 6, 2026
Match two multiplayer menu wrappers and a shared table scan in plain C.
The table scan retains the base pointer and advances three words before
searching, matching the stock compiler output at all 16 placements.

Stock native checks report MATCH for all three functions. Independent
relocation checks prove all 18 retail placements. The full NTSC-U build
reports 54 of 54 targets match; an independent audit verifies 158 linked
C functions, 2,168 placements, and 120,537,627 non-BSS bytes against
retail. All 50 unit tests and repository checks pass.

PAL validation and the canonical two-disc carry remain pending.
@llesieur99 llesieur99 changed the title feat(us): match 20 more small NTSC-U level functions feat(us): match 23 more small NTSC-U level functions Nov 6, 2026
@llesieur99
llesieur99 merged commit af91efb into OpenRAC:master Nov 6, 2026
2 checks passed
llesieur99 added a commit that referenced this pull request Nov 6, 2026
Add four native NTSC-U C functions below 200 bytes after merged PR #6.
They cover 452 distinct body bytes in 35 level placements. Two routines
are shared by 17 and 16 multiplayer levels, respectively.

The 16-copy routine's final eight-byte callee has five catalogue names
across the levels. Each retail call target was independently checked
against the same eight-byte body before integration.

Stock native checks report MATCH for all four sources. Independent
relocation proofs cover all 35 places. The full NTSC-U build reports
54 of 54 targets match; the linked-section audit verifies 162 C
functions, 2,203 placements, and 120,537,627 non-BSS retail bytes.
All 50 unit tests and repository checks pass.

PAL validation and the canonical two-disc carry remain pending.
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