Repository navigation
feat(us): add native frontend routines with NTSC validation - #1
Merged
Veradictus merged 5 commits intoOct 29, 2026
Merged
Conversation
Add plain C for the NTSC frontend float setter and its boot_elf copy, using their existing counterpart file flags. Regenerate the native source map, Bytematch names and NTSC report without claiming an exact progress gain. Verified both complete 12-byte bodies with the stock checker and both full NTSC programs with the stock C insertion build. An independent linked-section audit agrees; all 24 unit tests and the repository checker pass. PAL full builds and the complete two-disc carry remain pending. Keep this as a draft contribution until those gates and built.tsv are refreshed.
ByteMatch progress reportSCUS_973.53
✅ Newly matched (2)
SCES_524.56
No function changes. Commit f1ec2cd · Ratchet & Clank: Up Your Arsenal on ByteMatch |
Add the NTSC short-counter/RGB state update and the state-derived ratio routine in their native boot_elf files. Each complete body is 200 bytes, with the existing counterpart file's Ps2EeAs flags and typed helpers. Stock compilation and independent SDK linkage match all bytes with zero masks. Complete NTSC builds match with one C function in frontbin and three in boot_elf; separate linked-section and symbol audits agree. Regenerate native metadata without increasing the exact progress counts. All 24 unit tests and the repository checks pass. PAL full builds and the complete canonical carry remain pending; the PR stays a draft.
Add three native 296-byte placements with their unchanged counterpart file flags. Credit the NTSC decomp drafts and keep globals external. Explicitly retain the initializer's observed resident-address store for review. Verified stock native C checks, independent SDK links with actual symbol addresses and zero masks, and complete NTSC frontbin/boot_elf builds MATCH with two/five C functions. Independent linked-section audit passes. All24 unit tests and repository checks pass; exact counters are unchanged. PAL full builds and the canonical two-disc carry remain unavailable, so the PR stays draft and built.tsv is not refreshed or claimed as validated.
Add the1108-byte native dialog routine from the attributed NTSC draft, using the original file flags. Its compiler-generated128-byte jump table is linked through the existing whole-file path rather than replaced by retail words. Allow stock-matching native core objects with private data into that path; keep shared-file and native-level exclusions. Validate native symbol addresses with NativeNames. Document the behavior and add11 regression tests. Independent SDK link reproduces the complete routine and entire relocated table with zero masks. Both focused NTSC program builds MATCH with frontbin2C and boot_elf6C. Independent audit confirms all8 C symbols and every linked non-BSS section against retail. All35 unit tests and repository checks pass. PAL full builds and canonical two-disc carry remain pending. The PR stays draft, built.tsv and exact C counters are unchanged, and no merge is attempted.
Load and configure rabbitizer only when code_section actually disassembles code. Importing asm_build for pure metadata/link tests needs no disassembler. Add a subprocess regression importing the module with Python -S. All36 unit tests pass without site packages; no CI dependency installation or weakened check is required. The disassembler configuration is unchanged.
Veradictus
marked this pull request as ready for review
October 29, 2026 15:36
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
Add six native NTSC-U routines, in eight program placements:
func_U_003EB578func_U_003F0D38func_U_003C4CB8func_U_003E46B0func_U_00396860func_U_003C18B0func_U_003BC0F0func_U_003B82B8The two agent waves add three 296-byte placements and the 1,108-byte dialog routine. The three 296-byte placements represent two distinct routines, not 888 unique bytes. The original two 12-byte placements are also one distinct frontend function, not 24 unique bytes. This does not claim that every frontend or level copy of the new routines is now compiled from C.
-mno-split-addressesrecipe; the 200-byte routines and table update inherit@ps2as; the two initializer copies keep their default assembler. No per-function override, assembly instructions, register pin, barrier or byte substitution.0x001D4B4C, explicitly rather than hiding it behind a qualifier or instruction workaround. Literal-address accesses have existing repository precedent, but are called out here for review.D_00142694[]declaration for the ratio routine. Typed helper interfaces replace unprototyped calls.nonmatching/boot_elf/func_003E47F8.cdraft; no SDK source or headers are imported.Native objects with compiler-generated data
The dialog routine's stock C compile produces a 1,108-byte function, four text alignment bytes and 128 bytes of read-only jump-table/padding. Previously
c_objects.pyrejected all isolated native objects with extra sections even when the C matched.Native core objects that pass the stock check can now use the existing whole-object
files.tsvlinker path. The build links the compiler's data section, not retail words substituted into C. Addresses come from the real relocations or the existing unique-data lookup; the whole-program comparison remains mandatory. Native named symbols are checked withNativeNamesin both the isolated-text and whole-object paths. Shared objects retain their existing whole-PAL-file requirements, and native level data objects remain rejected. No compiler transform or flag override is added.Twelve regression tests cover stock-match requirements, unchanged shared/level exclusions, single whole-object registration, wrong native symbol addresses, missing data placement and import without optional packages. The disassembler is loaded only when disassembly is requested; the full test suite also passes with Python
-S.docs/versions.mddocuments the new native core path.Verified locally
tools/check.py --version us --nativereports MATCH for all eight source files, with inherited flags.c_objects.compile_oneaccepts all eight objects: seven text-only objects and the dialog whole object with its compiler-generated read-only table.tools/asm_build.py --version us --c frontbin boot_elf, with the generic native whole-object support described above, completes with both programs MATCH: two functions from C in frontbin and six in boot_elf. Other functions were assembled in this focused validation build.tools/asm_build.py --version us --ccompletes with 54 of 54 NTSC programs MATCH. This build uses the same eight C placements; every other function remains assembly, so this is not a full-C-corpus carry claim..rodatafrom the compiler object.python tests/check_repository.pypasses after regeneration.python -S -m unittest discover -s tests: 36 tests pass, including twelve new native-object regression tests, without installed site packages.git diff --checkand scoped outgoing-content review pass; no game data, assembly dumps, objects, toolchains or private paths are included.Full-program NTSC ELF SHA-1s checked by the build:
3bc94ee895e4b4af9b5602a229af599c1103b542487975305f8a263c750dfede50391b575ed07835Why this is a draft
pr_check.pyhave not been run: PAL inputs are not available in this environment.carry_us.shworkflow, with both discs and the full existing C set, still needs to be run before merge.config/us/built.tsvthrough that canonical workflow before promoting these candidates into the exact progress figure.The native map entries record the verified NTSC compile results, but are provisional integration metadata rather than a claim that the complete PAL/NTSC carry was run.
config/us/built.tsvis unchanged. The generated report keeps exactmatched_code=627004andmatched_functions=5671unchanged; this PR does not advertise an exact progress increase or gameplay validation.No PAL source or flag table is changed. Based on
403f30a9561324342c87802960eefbaaae13b372.