Skip to content

feat(us): match three small NTSC-U level functions and correct globals - #8

Merged
llesieur99 merged 1 commit into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-after-pr7-20261106
Nov 6, 2026
Merged

llesieur99 merged 1 commit into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-after-pr7-20261106

Conversation

@llesieur99

Copy link
Copy Markdown
Collaborator

Summary

Follow up to merged PR #7. Match three additional NTSC-U-only level functions smaller than 200 bytes in plain C: 400 distinct function-body bytes across 12 retail placements. The new functions are 140, 196, and 64 bytes; the latter two are present in five and six levels.

Two already matched multiplayer functions now declare their actual scalar globals with the documented .data address attribute instead of oversized array views. Their linked bytes remain exact in all 33 existing placements. The 64-byte function uses one truthful file-scope __asm__(".extern D_L01_001DF360, 4") size hint, allowed by the current matching rules, so Ps2EeAs emits its retail $gp load. Its level data address is checked in each copy.

Validation

  • Stock native checks report MATCH for all five changed C sources with inherited file flags. Independent relocation proofs cover all 45 affected placements.
  • The full NTSC-U build on c146d5b90322dab139e6ea0c92996eb4f5224919 reports SCUS_973.53: 54 of 54 targets match.
  • An independent linked-section audit confirms 165 C functions in 2,215 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. Staged paths and source hashes were checked, and the staged additions were scanned for disc/archive references, private paths, and keys.

Notes and limits

No volatile, function-body asm, #define alias, or hardcoded address was added. The sole file-scope asm is the four-byte .extern size hint above. The scalar address attributes follow docs/GLOBALS.md.

This contribution targets NTSC-U only. The PAL disc is unavailable, so PAL validation and the two-disc carry remain pending. 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, configuration, generated names, and progress documentation are included. No retail programs, assembly dumps, game assets, or proprietary toolchains are published.

Add three native NTSC-U C functions below 200 bytes: 400 distinct body
bytes across 12 level placements. The six-copy function uses a true
four-byte .extern size hint so Ps2EeAs emits its retail $gp load.

Replace oversized array views in two already matched functions with
their actual scalar types and the documented .data address attribute.
The two corrections retain exact code in all 33 existing placements.
No volatile, function-body asm, #define alias, or hardcoded address is
added.

Stock native checks report MATCH for all five sources. Independent
relocation proofs cover their 45 placements. The full NTSC-U build
(tools/asm_build.py --version us --c -P8) reports 54 of 54 targets
match. An independent linked-section audit verifies 165 C functions,
2,215 placements and 120,537,627 non-BSS bytes against retail.
python -S -m unittest discover -s tests passes 50 tests; the
repository checker passes.

PAL validation and the canonical two-disc carry remain pending.
@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.58% (+0.01%)
Functions 6,341 / 16,222
Units complete 291 / 391
✅ Newly matched (3)
  • func_L13_003ACAE0 (196 bytes)
  • func_L39_006AA4C0 (140 bytes)
  • func_L01_003D0910 (64 bytes)

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

@llesieur99
llesieur99 merged commit 28b45ee into OpenRAC:master Nov 6, 2026
2 checks 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.

1 participant