Skip to content

feat(us): match 135 small NTSC-U level functions - #4

Merged
Veradictus merged 9 commits into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-levels-20261105
Nov 6, 2026
Merged

Veradictus merged 9 commits into
OpenRAC:masterfrom
llesieur99:codex/us-sub200-levels-20261105

Conversation

@llesieur99

@llesieur99 llesieur99 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Match 135 NTSC-U-only level functions smaller than 200 bytes in plain C. They account for 15,100 distinct function-body bytes and 1,926 placements across the 51 NTSC-U level programs. The latest batch adds 13 functions present in 13 level placements; all 13 were checked before one complete 54-target build. Sources use inherited file flags, external globals and the existing native level naming convention. This is a tranche of the remaining small-function catalogue, not a claim that every function below 200 bytes is finished.

Fix c_objects.compile_one to pass the actual level target to the stock native checker. Without that target, multiplayer code was compiled under the story program's $gp; the new unit test covers this regression.

Validation

  • The stock native checker reports MATCH for all 135 sources, with no per-function flag overrides or injected instructions.
  • An independent relocation audit checks each compiler object against all 1,926 retail placements, including level-specific addresses and $gp slots, with no masked nonrelocation words.
  • The final complete NTSC-U build matched all 54 programs with the 135 C functions registered. An independent linked-section audit confirmed all 54 outputs against 120,537,627 non-BSS retail bytes and verified every new C symbol in its program.
  • 45 unit tests, tests/check_repository.py and git diff --check pass.

The prior config/us/built.tsv remains unchanged because a full existing-C two-disc carry was not run. The official exact NTSC-U counters stay at 733,416 bytes and 6,225 functions. This PR claims the 135 verified linked C functions, not an official progress increase or gameplay validation.

Limits

This contribution targets NTSC-U only. The PAL disc is unavailable, so the PAL full build, compile-all check and canonical two-disc carry remain unverified. Maintainers can review whether the verified NTSC-U-only scope is suitable for merge. func_L39_005A3D9C matched in the isolated checker but was excluded: its 4-mod-8 start and following padding prevent this C object from being linked under the repository's current rules.

Based on upstream b3dc80785e74dd913812f0313c0f1b21bd773b50. Only source, configuration, generated report/header and tests are included; no retail programs, assembly dumps or proprietary toolchains are published.

Add 17 plain C functions below 200 bytes for NTSC-U-only level places.
Their 728 distinct function bytes occur in 273 verified placements. Preserve
the inherited file flags and the existing PAL/shared source separation.

Pass the actual level target to the stock native checker so multiplayer
functions compile under their program's GP. Add a focused regression test.

Verified stock C checks, relocation-resolved retail bytes at every place,
all affected full-program NTSC builds, independent linked-section equality
for all 54 current outputs, 45 unit tests and repository checks. The source
review and diff check include no game data or private paths.

PAL full builds and the canonical two-disc carry remain unavailable. The
official exact NTSC-U counters and built.tsv are unchanged; request review
in a draft PR without merging.
@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.77% · 733.42 KB of 7.51 MB
Fuzzy match 10.68% (+0.03%)
Functions 6,225 / 16,222
Units complete 301 / 397
✅ Newly matched (128)
  • func_L01_003CA050 (196 bytes)
  • func_L39_00669478 (192 bytes)
  • func_L03_003CEE58 (192 bytes)
  • func_L01_0034DF10 (188 bytes)
  • func_L01_003CA118 (188 bytes)
  • func_L30_004E2E08 (188 bytes)
  • func_L39_00522A40 (188 bytes)
  • func_L03_0039BCB8 (188 bytes)
  • func_L07_0030FBB8 (188 bytes)
  • func_L41_0053D1A8 (176 bytes)
  • func_L39_0065F000 (176 bytes)
  • func_L03_0032CB68 (176 bytes)
  • func_L07_003E1980 (176 bytes)
  • func_L39_006D6228 (176 bytes)
  • func_L39_006DC988 (176 bytes)
  • func_L13_003ACCB0 (172 bytes)
  • func_L01_00500F98 (172 bytes)
  • func_L39_006D5F80 (172 bytes)
  • func_L39_005C0AC8 (164 bytes)
  • func_L39_00665B20 (164 bytes)
  • func_L39_006DCA38 (164 bytes)
  • func_L01_003F08D8 (160 bytes)
  • func_L01_0045FE28 (160 bytes)
  • func_L39_00669D48 (160 bytes)
  • func_L01_0031F6C8 (156 bytes)
  • func_L04_003E1690 (156 bytes)
  • func_L01_004DF068 (156 bytes)
  • func_L39_00606078 (156 bytes)
  • func_L03_0039BD78 (156 bytes)
  • func_L21_003AFDA8 (156 bytes)
  • …and 98 more

Commit 9565c17 · Ratchet & Clank: Up Your Arsenal on ByteMatch

Add seventeen more NTSC-U-only level functions below 200 bytes. The additions
cover 1,448 distinct function bytes and 193 retail placements. Adapt the
same repository's PAL C where an existing implementation is available,
using the owned NTSC-U addresses and the inherited source-file flags.

The stock native compiler check, independent relocation audit and complete
linked multiplayer programs all match retail. The full 54-program section
audit, 45 unit tests and repository check pass after this addition.

The canonical two-disc carry is still pending without PAL inputs, so
built.tsv and the official exact NTSC-U progress counters remain unchanged.
@llesieur99 llesieur99 changed the title feat(us): match 17 small NTSC-U level functions feat(us): match 34 small NTSC-U level functions Nov 6, 2026
@llesieur99
llesieur99 marked this pull request as ready for review November 6, 2026 02:11
Add sixteen NTSC-U-only C functions below 200 bytes. They contribute 1,868
distinct function-body bytes in 604 level placements. Port the existing PAL
C forms where useful and adjust only values and names measured on NTSC-U.

Keep one inherited flag set per source and compile every candidate through
the stock native checker. Independently verify each relocation at every
place before one full 54-program NTSC-U build. All linked sections, unit
tests and repository checks pass after the batch.

The official exact counters and built.tsv remain unchanged pending the
canonical PAL/NTSC carry. No retail program or compiler binary is included.
@llesieur99 llesieur99 changed the title feat(us): match 34 small NTSC-U level functions feat(us): match 50 small NTSC-U level functions Nov 6, 2026
Add seventeen NTSC-U-only C functions smaller than 200 bytes. They contribute
1,940 distinct function-body bytes across 352 verified level placements.
Adapt existing PAL C only where the retail NTSC-U values and call targets
support the change, with inherited file flags and external globals.

The stock native checker accepts every function. Resolve relocations and
compare complete bodies at every place before a single 54-program NTSC-U
build. All linked sections, unit tests and repository checks pass afterward.

The official exact counters and built.tsv remain unchanged pending the
canonical PAL/NTSC carry. No retail program or compiler binary is included.
@llesieur99 llesieur99 changed the title feat(us): match 50 small NTSC-U level functions feat(us): match 67 small NTSC-U level functions Nov 6, 2026
Add fourteen native NTSC-U C functions under 200 bytes across 225 level placements.

Validated with the stock native checker, relocation-resolved retail comparison, all 54 NTSC-U program builds, independent linked byte audit, 45 unit tests, and repository checks. Official exact counters remain unchanged pending the PAL carry.
@llesieur99 llesieur99 changed the title feat(us): match 67 small NTSC-U level functions feat(us): match 81 small NTSC-U level functions Nov 6, 2026
Add eight native NTSC-U C functions under 200 bytes across 170 level placements.

Validated with the stock checker, per-copy relocation proof, all 54 NTSC-U program builds, independent linked byte audit, 45 unit tests, and repository checks. Official exact counters remain unchanged pending the PAL carry.
@llesieur99 llesieur99 changed the title feat(us): match 81 small NTSC-U level functions feat(us): match 89 small NTSC-U level functions Nov 6, 2026
Port thirteen PAL C counterparts to their NTSC-U-specific code, with adjusted calls and constants, across 76 level placements.

Validated by the stock checker, per-copy relocation proof, 54/54 NTSC-U program builds, independent linked byte audit, 45 unit tests, and repository checks. Official exact counters remain unchanged pending the PAL carry.
@llesieur99 llesieur99 changed the title feat(us): match 89 small NTSC-U level functions feat(us): match 102 small NTSC-U level functions Nov 6, 2026
Port twenty NTSC-U-only C functions under 200 bytes, adding 2,244 distinct function-body bytes and twenty level placements.

Validated by stock native checks, retail relocation proofs, 54/54 full NTSC-U builds, independent linked byte audit, 45 unit tests and repository checks. Official exact counters remain unchanged pending the PAL carry.
@llesieur99 llesieur99 changed the title feat(us): match 102 small NTSC-U level functions feat(us): match 122 small NTSC-U level functions Nov 6, 2026
Port thirteen NTSC-U-only C functions under 200 bytes, adding 2,120 distinct function-body bytes and thirteen level placements.

Validated by stock native checks, retail relocation proofs, 54/54 full NTSC-U builds, independent linked byte audit, 45 unit tests and repository checks. Official exact counters remain unchanged pending the PAL carry.
@llesieur99 llesieur99 changed the title feat(us): match 122 small NTSC-U level functions feat(us): match 135 small NTSC-U level functions Nov 6, 2026
@Veradictus
Veradictus merged commit 8c99b8b into OpenRAC:master Nov 6, 2026
2 checks passed
llesieur99 added a commit that referenced this pull request Nov 6, 2026
Build on upstream master after PR #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.
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.

2 participants