Repository navigation
feat(us): match three small NTSC-U level functions and correct globals - #8
Merged
llesieur99 merged 1 commit intoNov 6, 2026
Conversation
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.
ByteMatch progress reportSCES_524.56
No function changes. SCUS_973.53
✅ Newly matched (3)
Commit c146d5b · Ratchet & Clank: Up Your Arsenal on ByteMatch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.dataaddress 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$gpload. Its level data address is checked in each copy.Validation
MATCHfor all five changed C sources with inherited file flags. Independent relocation proofs cover all 45 affected placements.c146d5b90322dab139e6ea0c92996eb4f5224919reportsSCUS_973.53: 54 of 54 targets match.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,#definealias, or hardcoded address was added. The sole file-scope asm is the four-byte.externsize hint above. The scalar address attributes followdocs/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.