Skip to content

Match 17 native NTSC-U routines and carry 20 shared routines - #219

Open
ImBaedin wants to merge 11 commits into
OpenRAC:masterfrom
ImBaedin:t3/match-frontbin-twins
Open

ImBaedin wants to merge 11 commits into
OpenRAC:masterfrom
ImBaedin:t3/match-frontbin-twins

Conversation

@ImBaedin

@ImBaedin ImBaedin commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Matched code

The PR adds 17 native NTSC-U level functions across 269 placements, covering 69,032 function bytes. The regional code uses the retail NTSC-U update rates, animation lengths, transition delays, and particle timing. Each native source inherits the flags of its PAL counterpart. The PR also carries twenty existing PAL functions into NTSC-U and extends the coverage of two already carried functions. Together they contribute 482 NTSC-U C placements.

Paired front-end remnants

  • func_003C4598 in frontbin and func_003C4950 in boot_elf are a stack restore and alignment nop after the preceding return, with no incoming branch, jump, or pointer. The inventory already counts their containing regions as remnants.

Native level timing routines

  • func_L01_0033E068 for movement timing, func_L01_0037B2C8 for Holo Shield sparks, func_L01_00476258 for the bolt multiplier pulse, and func_L01_00497448 for model preview controls. Each links at all 34 placements.

Native level actor and effect timing

The Level 10 steering call uses a caller-specific symbol for its native target.

Function Bytes Placements
func_L01_0039F150 11,044 7
func_L01_00409448 1,268 34
func_L01_0044F5E8 1,428 26
func_L05_00355090 12,008 4
func_L05_00358B60 1,560 4
func_L05_0035A2B8 6,676 2
func_L10_00359C48 1,352 1
func_L10_003B3B38 2,336 1
func_L10_003B4458 8,336 1
func_L22_003B1A48 11,360 2

Native multiplayer reticle and explosion routines

NTSC-U source PAL counterpart Bytes Placements
func_L39_0052B850 func_L39_0052BDB8 3,284 17
func_L39_0052CF88 func_L39_0052D4E8 1,228 17
func_L39_005B69C0 func_L39_005B8978 3,012 17

The reticle routines use NTSC-U frame timing and the retail halfword timer. The explosion routine uses the NTSC-U particle lifetimes and frame steps. The reticle, damage-event, smoke, and dome calls follow their matched PAL callers' argument order and preserve the values retail passes in the integer and floating-point registers. The native declarations describe the vector, camera, sound-slot and particle storage used by the callees.

Shared Level 39 HTTP status parser

  • func_L39_004B9720 links at 39:004B9520 on NTSC-U. The parser's character-class tables contain the same 256 bytes at different addresses. Its existing-style data alias selects each copy through the linker. Three regression tests cover the address rules and strict instruction and register comparisons.

Shared multiplayer carries

PAL source NTSC-U counterpart Placements
func_L39_005872D8 func_L39_00586568 17
func_L39_00597058 func_L39_00595DA8 17
func_L39_00597230 func_L39_00595F80 17
func_L39_005C14A0 func_L39_005BF458 17
func_L39_005C1700 func_L39_005BF6B8 17
func_L39_005E2E30 func_L39_005E08C8 17
  • The six bodies differ between discs through relocations. Each pair has two unique equal-fingerprint anchors at the same displacements across 15 PAL and 17 NTSC-U placements. The added NTSC-U layouts use the same PAL source.
  • Shifted data in the first four functions uses level-owned symbols. func_L39_005E2E30 is a metadata-only carry with its inherited PAL source and .extern hint.

Shared multiplayer menu and resource routines

PAL source NTSC-U counterpart Placements
func_L39_0068C718 func_L39_0068A028 1
func_L39_0068C918 func_L39_0068A228 1
func_L39_005A4058 func_L39_005A23F0 17

Level-owned names resolve the relocated display data and callback in the menu routines. The resource routine's five overlay callees move by 0xF0 at every NTSC-U placement. Each pair has two unique equal-fingerprint anchors at consistent offsets on both discs, including the two additional NTSC-U resource layouts. The format string in func_L39_0068C918 uses a caller-specific alias for its NTSC-U copy at 0x00247C80. The earlier caller of D_L39_00247B20 keeps its existing binding. The menu owner retains its existing callback call forms and Ps2EeAs .extern size hint. A callback declaration cleanup changed five PAL instruction words and stayed in scratch.

Multiplayer and museum shared carries

PAL source NTSC-U counterpart New placements
func_L39_00508690 func_L39_00508490 1
func_L39_0059A638 func_L39_00599368 1
func_L39_0059A660 func_L39_00599390 1
func_L39_005EC4C0 func_L39_005E9F50 17
func_L39_005F05E8 func_L39_005EE078 17
func_L39_005F0790 func_L39_005EE220 17
func_L39_0066ACA8 func_L39_006683A0 17
func_L03_0034B440 func_L03_0034A880 1
func_L39_00595248 func_L39_00593F98 16

The boundary records isolate the 200-byte Level 39 routine after a stack-restore remnant and recover the complete 40-byte wrapper reached by two US callers. Two further cuts separate stack restores and nops from the museum easing routine and multiplayer string decoder. The corrected code joins the existing shared US catalogue rows.

The normal map check and object builder both recover func_L39_0066ACA8 from its complete PAL compilation unit using the owning flags. The 248-byte slice retains seven relocations and exports only the selected function. The checker verifies its instructions and bindings at each US placement. The slice path rejects allocated data, out-of-slice relocation targets, and existing native ownership. The resolved 0066ACA8 map exception was removed.

Shared allocator and worker routines

PAL source NTSC-U counterpart Placements
func_L39_004B5BE8 func_L39_004B59E8 1
func_L39_004B6108 func_L39_004B5F08 1
func_L39_004D5BE8 func_L39_004D59E8 1

Sony's compiler needs the earlier definitions from the original PAL build run to reproduce the delay slots and branches. The checker generates that run with the owning flags and carries only the selected C function. It verifies the original and isolated objects against both discs, including existing DNAS protection, the independently paired sibling calls, and the worker's complete 14-entry switch table. The resolved exceptions for func_L39_004B5BE8 and func_L39_004D5BE8 were removed.

Verification

  • The native reticle and explosion batch passed all three PAL core MATCH checks and both stock NTSC-U carry runs with all 54 targets matching. The final stock and strict diagnostic objects agree with the reviewed objects. The linked ELF audit checked all 51 new code placements, 3,281 instruction relocations and 17 switch tables totaling 544 bytes against retail. The resulting bindings agree with the 104-object cross-PR audit.

  • All 54 prior C manifests retain every entry. The new batch adds exactly 51 C placements and preserves the earlier 431 PR placements. The ledger has zero placement-count losses against 37a1665d and origin/master. The final version map, repository checks and staged whitespace check passed. The unit suite ran 337 tests with 7 skips.

  • python3 tools/build.py --target all -j 4 printed the three PAL core MATCH lines. python3 tools/build_levels.py matched the ELFs and disc overlays for all affected PAL levels 39–53 for the shared multiplayer batch. The three menu and resource carries passed a combined rebuild of all 15 affected PAL overlays.

  • python3 tools/check.py --version us --native printed MATCH for all ten actor and effect timing additions with stock flags and again with implicit declarations treated as errors. All 82 of those placements passed relocation-aware comparisons, including switch tables where present. The 82 placements also passed against the symbol mappings for 19 published native routines across the three coordinated PRs.

  • JOBS=4 sh tools/carry_us.sh matched all 54 NTSC-U programs. The final version-map check passed after the resolved slice exception was removed. The final link manifests contain all 88 added sites in this batch and all 340 prior PR placements. All 54 prior C manifests retained their entries, and the ledger had zero placement count losses against 8e2e9c06 and upstream.

  • The stock checker passed all 102 prior shared multiplayer placements and all 19 new sites. The three new carried objects passed strict text, relocation and table comparisons at all 17 PAL and 19 NTSC-U sites. Their symbols agree with all 70 published objects and 1,424 placements in the cross-PR audit. The linked ELF symbol tables confirm those bindings. The shared parser also passed on both discs with @ee296 @eeas -O2 -G0.

  • The multiplayer and museum carry batch passed strict instruction and relocation checks, including tables, and was verified at the actual linked US addresses. The ordinary checker was run with explicit retail placement context.

  • python3 tests/check_repository.py passed in the toolchain venv and in a clean tree without game data, pyelftools or Capstone. The full unit suite ran 325 tests in each environment, with 7 and 35 skips respectively. All nine focused slice tests passed in the toolchain venv. The clean run still exercises whole-owner fallback routing. The test fix preserves the build inputs and all 54 verified C manifests. git diff --cached --check passed.

  • The Level 39 allocator and worker batch passed all three PAL core builds and the PAL Level 39 ELF and disc comparisons. Stock JOBS=4 sh tools/carry_us.sh matched all 54 NTSC-U targets. The linked manifests add exactly three Level 39 C placements and retain all prior entries. The ledger records zero placement losses against 1d442fa3 and upstream. The three stock objects and final ELF bindings agree with the 91-routine cross-PR audit.

  • The Sony compiler-context batch ran 337 tests in each environment, with 7 skips in the toolchain venv and 46 skips in a clean tree without game data, pyelftools or Capstone. Repository checks passed in both environments, and all 109 Python files compiled in the clean tree.

Mark func_003C4598 and its boot_elf twin func_003C4950 as linker
remnants. Each is a stack restore followed by an alignment nop, with
no incoming branch, jump, or pointer. The preceding code returns before
the existing remnant run that the inventory already counts.

Refresh the NTSC-U map for the two source files.

Verified python3 tools/build.py --target all -j 4 printed MATCH for
frontbin (5a7ff1fe9c73a63c6ce6fe7b5f80cd7cab3aa553), boot_elf
(e0a4e82e9a363a64db5a555db8c8f927ef58c3d8), and i5bootn
(c1166658edad1b6b04b7671af77fff53f2560e71). tools/check.py on the
four adjacent C objects printed MATCH. JOBS=8 sh tools/carry_us.sh
printed "54 of 54 targets match" and verified the map. Both target
pr_check.py runs printed OK, tests/check_repository.py passed, and
unittest discover -s tests reported OK (311 run, 8 skipped).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T06:09:23.557115Z 6a088b9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bytematchdev

bytematchdev Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

ByteMatch progress report

SCES_524.56

Code matched 97.47% · 7.34 MB of 7.53 MB
Fuzzy match 97.47%
Functions 16,487 / 16,592
Units complete 589 / 605

No function changes.

SCUS_973.53

Code matched 93.63% (+1.17%) · 7.01 MB of 7.48 MB
Fuzzy match 94.29% (+1.04%)
Functions 16,363 (+41) / 16,590
Units complete 564 (+1) / 594
✅ Newly matched (41)
  • func_L05_00355090 (12,008 bytes)
  • func_L22_003B1A48 (11,360 bytes)
  • func_L01_0039F150 (11,044 bytes)
  • func_L10_003B4458 (8,336 bytes)
  • func_L05_0035A2B8 (6,676 bytes)
  • func_L39_0052B850 (3,284 bytes)
  • func_L39_00595F80 (3,048 bytes)
  • func_L39_005B69C0 (3,012 bytes)
  • func_L10_003B3B38 (2,336 bytes)
  • func_L39_004D59E8 (2,208 bytes)
  • func_L39_00586568 (1,876 bytes)
  • func_L39_004B5F08 (1,792 bytes)
  • func_L05_00358B60 (1,560 bytes)
  • func_L01_0044F5E8 (1,428 bytes)
  • func_L39_004B9520 (1,368 bytes)
  • func_L01_0033E068 (1,364 bytes)
  • func_L10_00359C48 (1,352 bytes)
  • func_L01_00409448 (1,268 bytes)
  • func_L39_0052CF88 (1,228 bytes)
  • func_L01_00476258 (1,120 bytes)
  • func_L39_004B59E8 (892 bytes)
  • func_L01_00497448 (864 bytes)
  • func_L39_005E9F50 (856 bytes)
  • func_L01_0037B2C8 (792 bytes)
  • func_L39_0068A228 (720 bytes)
  • func_L39_005BF458 (604 bytes)
  • func_L39_005A23F0 (568 bytes)
  • func_L39_0068A028 (512 bytes)
  • func_L39_00595DA8 (468 bytes)
  • func_L39_005BF6B8 (452 bytes)
  • …and 11 more
⚠️ No longer matching (1)
  • func_L39_00593F98 100.00% → 0.00%

Commit 1b00dc3 · Ratchet & Clank: Up Your Arsenal on ByteMatch

@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 6a088b90927c26ed0c5bc0132d06841c22308de7: the final diff contains the two source-marker corrections and the expected NTSC-U map hash refresh/removal of redundant marker rows. The assembly fragments and encompassing inventory entries support the remnant classification. An independent rerun of tools/build.py --target all -j 4 printed all three expected PAL MATCH lines, and tests/check_repository.py passed. The worker's recorded NTSC-U carry completed all 54 targets; adjacent function checks and the unit suite also passed. This change adds zero C matches. No correctness findings in the current diff.

Match func_L01_0033E068, func_L01_0037B2C8, func_L01_00476258,
and func_L01_00497448 using the PAL files' compiler flags. The NTSC-U
bodies use the disc's timer values for motion, Holo Shield sparks, the
bolt multiplier pulse, and model preview controls. Record the retail
division padding and the native menu callback's per-function alias.

python3 tools/check.py --version us --native printed MATCH for all four
functions. JOBS=8 sh tools/carry_us.sh matched all 54 NTSC-U targets.
The linker manifests include each function at all 34 placements and
the built ledger preserves every existing C placement count.

python3 tools/build.py --target all -j 4 printed the three PAL MATCH
lines. python3 tools/build_levels.py 1 -P 1 -j 4 matched the Veldin ELF
and disc overlay. tests/check_repository.py passed, and python3 -m
unittest discover -s tests reported OK (311 run, 7 skipped).
@ImBaedin ImBaedin changed the title Classify two PAL front-end linker remnants Match four NTSC-U level counterparts and classify two front-end remnants Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review at 659e7d696ca0bec16d5aada41ccbfd293341013c: I reviewed the four native C sources, inherited flags, aliases and retail division padding. The particle routine uses the existing VU0 helpers; its committed source is identical to the parent correction that passed strict compilation and all 34 relocation-aware placements. The other three parent diagnostic objects also matched at every placement.

The final worker logs report all three PAL core SHA-1 matches, all 54 NTSC-U targets matching and the map in step, repository checks passing, and 311 unit tests passing with seven skips. My independent final ledger/manifest audit confirms all 136 new C placements at their expected addresses with zero prior placement-count losses against master or 6a088b9. The two earlier remnant marker corrections remain justified and add zero C matches. No correctness findings in this reviewed head.

Port the regional animation, movement, state transition and particle
timing for func_L01_0039F150, func_L01_00409448, func_L01_0044F5E8,
func_L05_00355090, func_L05_00358B60, func_L05_0035A2B8,
func_L10_00359C48, func_L10_003B3B38, func_L10_003B4458 and
func_L22_003B1A48. Inherit the corresponding PAL file flags and record
the padding observed in the native division sequences. Give the Level 10
steering call a caller-specific symbol for its native target.

tools/check.py --version us --native printed MATCH for all ten functions
with stock flags and with implicit declarations treated as errors.
Relocation-aware comparisons passed for all 82 placements, including
switch tables. JOBS=4 sh tools/carry_us.sh matched all 54 NTSC-U targets
and passed the version-map check. The linker manifests contain every
new C placement and the build ledger preserves all prior counts against
origin/master and 659e7d6.

python3 tools/build.py --target all -j 4 printed all three PAL core
MATCH lines. python3 tests/check_repository.py passed and python3 -m
unittest discover -s tests reported OK (311 run, 7 skipped).
@ImBaedin ImBaedin changed the title Match four NTSC-U level counterparts and classify two front-end remnants Match 14 NTSC-U level counterparts and classify two front-end remnants Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 6356dbce74eefc932279011f653ed664aca995ce: compared the ten native bodies with their PAL counterparts, reviewed the regional timing, field and declaration changes, and checked the allowed VU0 usage. All ten flag rows exactly inherit the owning PAL files. The three native padding entries do not collide with PAL catalogue names. The Level 10 steering alias resolves to the US catalogue's exact 0x00427EA0 target, avoiding the existing PAL-symbol collision.

Independent manifest and ledger checks confirm all 218 PR C addresses with zero older count losses against 659e7d69 and origin/master. The final logs contain twenty stock/strict canonical MATCH results, all 82 new placement checks, three PAL core hashes, 54/54 NTSC-U matches, version map in step, passing repository checks and 311 unit tests (7 skipped). The final objects equal the objects checked against the other published symbol contracts. Both CI jobs are green on this head. No correctness findings in this reviewed commit.

Use the existing caller-specific data alias for the character-class
table read by func_L39_004B9720. The tables have the same 256 bytes at
0x001B3331 on PAL and 0x001B34B1 on NTSC-U. Read the aliased address from
retail when resolving the object's relocations.

Add regression cases for the table alias, fixed resident names, and
program-specific small-data slots. Check that instruction and register
mismatches still fail relocation-aware verification.

tools/check.py printed MATCH for the shared parser on both discs with
@ee296 @eeas -O2 -G0. tools/build.py --target all -j 4 matched all three
PAL core programs. tools/build_levels.py 39 -P 1 -j 1 matched both the
PAL Level 39 ELF and disc overlay. JOBS=4 sh tools/carry_us.sh matched
all 54 NTSC-U targets and linked the shared parser at 39:004B9520.
The coverage audit retained all 218 prior PR sites and found zero lost
C placement counts against origin/master and 6356dbc.

python3 tests/check_repository.py passed. python3 -m unittest discover
-s tests reported OK (314 tests, 7 skipped).
@ImBaedin ImBaedin changed the title Match 14 NTSC-U level counterparts and classify two front-end remnants Match 14 NTSC-U counterparts and carry the Level 39 parser Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 2490364594b4f9dee1065e0504fc8bb3a3aef701: reviewed the parser's data-alias-only source change, the narrow shared-name resolver correction, documentation and all three regression tests. Plain resident names, resident function aliases and the per-program small-data rules remain constrained. I independently confirmed the moved-data regression fails with the previous resolver and all three tests pass with the committed correction; wrong registers, load opcodes and non-relocated instructions remain rejected.

Independent coverage checks confirm all 218 previous native C addresses plus the shared parser at US 39:004B9520, with zero older ledger losses against 6356dbce and origin/master. The recorded builds contain all three PAL core hashes, both PAL Level 39 retail hashes and 54 individual US binary matches. The carried parser object equals the checked object's text, relocations and alignment. Repository checks and the 314-test unit suite passed (7 skipped). No correctness findings. Report CI passed; the checks job was pending at the final-head read.

Document the relocation-only pairs for func_L39_005872D8,
func_L39_00597058, func_L39_00597230, func_L39_005C14A0,
func_L39_005C1700 and func_L39_005E2E30. Resolve the shifted globals
with level-owned labels and use the existing PAL source on both discs.

Validate explicitly recorded anchors by unique equal fingerprints
and the same displacements in every placement of each catalogue.
The linked functions still undergo exact byte, relocation and table
comparisons. The metadata-only carry of func_L39_005E2E30 uses its
inherited PAL source and its original .extern hint.

tools/build.py --target all -j 4 matched all three PAL cores.
tools/build_levels.py matched all 15 PAL ELFs and disc overlays
from levels 39 through 53. JOBS=4 sh tools/carry_us.sh matched all
54 NTSC-U binaries and linked 102 additional shared C placements.
The stock checker and strict relocation audit passed for all 102.
The placement audit retained all 51 prior level manifests and all
219 previous PR sites, with zero lost counts against origin/master
and 2490364.

python3 tests/check_repository.py passed. python3 -m unittest discover
-s tests reported OK (316 tests, 7 skipped).
@ImBaedin ImBaedin changed the title Match 14 NTSC-U counterparts and carry the Level 39 parser Match 14 native NTSC-U routines and carry seven shared routines Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 5f6bc86c2a90de604b7cb7abb606bf29a9b683cd: the committed source, resolver, metadata, docs and test hashes equal the parent-reviewed snapshots. The optional anchors require two unique equal-fingerprint functions with consistent nonzero relative displacements at every applicable PAL/US site. Existing equal-size shared-C, ownership and supplemental-pair guards remain in place. Parent execution of all five relocated-pair test cases passed. The sixth PAL source remains byte-for-byte unchanged.

Independent checks confirm all 321 PR US C addresses, including the 102 new shared placements, with zero older ledger losses against 24903645 and origin/master. Final logs contain three PAL core matches, all 15 affected PAL overlays matching both ELF and disc hashes, 54 individual US binary matches, all 51 previous level manifests preserved, repository checks and 316 passing unit tests (7 skipped). All 102 new placements also pass the stock checker and exact text/relocation/table/contract audit. Both CI jobs are green. No correctness findings.

Use level-owned names for relocated display data and overlay callees
in func_L39_0068C718, func_L39_0068C918 and func_L39_005A4058.
Give the relocated format string a caller-specific alias so the
existing Level 39 binding can still serve its earlier caller.
Record two unique catalogue anchors per pair to establish the shared
twins at each placement. Preserve the PAL flags and one C source per
routine.

tools/build.py --target all -j 4 printed all three PAL MATCH lines.
tools/build_levels.py matched the ELFs and disc overlays for levels
39 through 53. JOBS=4 sh tools/carry_us.sh matched all 54 NTSC-U
targets. The stock checker and strict relocation and table comparison
verified all 19 new NTSC-U placements. The stock checker also
matched all 17 PAL placements. The original and carried
objects derive exact code at 17 PAL and 19 NTSC-U placements.

All 54 prior C manifests and 321 prior PR placements were
retained, with zero count losses against origin/master and 5f6bc86.
The repository check and 316 unit tests with 7 skips passed.
@ImBaedin ImBaedin changed the title Match 14 native NTSC-U routines and carry seven shared routines Match 14 native NTSC-U routines and carry ten shared routines Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 8e2e9c063345ae04871ce855802326085aada42f: independently verified that both complete PAL owners retain their original bytes apart from the approved identifier renames. The existing callback call forms, size hint and assembly marker remain untouched; the attempted declaration cleanup is excluded as a near miss. The three pairing rows use the previously reviewed strict anchor rules. The precise menu data alias allows both distinct addresses to coexist with the older C routine.

Independent checks confirm all 340 PR US C addresses, every previous entry across all 54 manifest snapshots retained, exactly 19 additions, and zero ledger losses against 5f6bc86c and origin/master. All three published source/metadata hashes and stock objects agree with the reviewed snapshots. Final logs contain three PAL core matches, all 15 affected PAL overlay ELF/disc matches, 54 US binary matches, passing repository checks and 316 tests (7 skipped). The expanded cross-PR audit reproduces all 19 new placements with no symbol conflicts. No correctness findings in this narrow carry change. CI was pending at the final-head read.

Recover the complete Level 39 wrapper and separate linker remnants
from three function bodies. Carry the shared code using verified
catalogue pairs and level-owned data names. Compile the complete PAL
owner when a level function needs it, keep its guarded text slice,
and verify that slice at each NTSC-U placement. Retire the resolved
0066ACA8 version-map exception.

tools/build.py --target all -j 4 matched all three PAL core programs.
tools/build_levels.py matched the ELFs and disc overlays for PAL levels
39 through 53. JOBS=4 sh tools/carry_us.sh matched all 54 US targets.
The C manifests include 88 added placements and retain all 340
earlier PR placements. All 54 prior manifests retained their entries
and the built ledger had no losses against 8e2e9c0 or origin/master.

The ordinary checker verified the code at the actual placements.
tools/version_map.py --check passed after removal of the resolved
exception. Repository checks and the 325-test unit suite with seven skips passed.
@ImBaedin ImBaedin changed the title Match 14 native NTSC-U routines and carry ten shared routines Match 14 native NTSC-U routines and carry 17 shared routines Dec 5, 2026
Import the slicer only in tests that have pyelftools. The native ownership
check also needs Capstone. Keep the mocked carry routing test runnable
without either package, with checks for the returned object and the
whole-owner invocation.

In a clean tree without game data or optional packages, unittest
discovery failed on the check.py import before this change. Afterward,
python3 -m unittest discover -s tests ran 325 tests with 35 skips.
The toolchain venv ran all nine focused cases and 325 tests with 7
skips. python3 tests/check_repository.py passed in both environments.

The A8 build inputs and all 54 linked C manifests retain their verified
contents.
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 1d442fa36ef680ab896e0f6fa9c6fa92f4a1626a, including A8: reviewed the guarded whole-owner slice, real source/flag/ownership checks, common map and C-object fallback, strict relocation/local-address validation and negative regressions. The four PAL owner changes are identifier renames; the original context and instructions remain intact. The boundary changes preserve the proven remnant prefixes and recover the existing C bodies. All published production-input hashes equal the reviewed final manifest.

Independent checks confirm all 428 PR C placements plus nine earlier sites in the extended cohorts, exactly 88 additions, every previous entry in all 54 manifest snapshots retained and zero ledger losses against 8e2e9c06 and origin/master. All nine final stock objects reproduce their 97 US sites, including tables and relocation targets. The expanded audit covers 91 objects at 1,619 US placements with no conflicting symbol bindings. Recorded builds contain PAL core3, all15 affected PAL ELF/disc matches and US54. Removing the obsolete slice exception only resumed the final validation step against those same binaries.

CI exposed an optional-dependency import during test discovery. The follow-up changes only the test file and equals the approved patch. I independently ran all9 focused tests with dependencies, and discovery without dependencies (one routing case passes; eight dependency-specific cases skip). Clean Python runs325tests/35skips; the toolchain venv runs325/7skips, with repository checks passing in both. Both new CI jobs are green. No unresolved correctness findings; A9's regional near miss remains excluded.

Compile the canonical PAL runs that contain the DNAS allocators and worker.
Check each original function and its isolated relocations against both discs.
Resolve sibling calls through their catalogue twins and keep the worker's
complete switch table based on the compiled table references.

Carry func_L39_004B5BE8, func_L39_004B6108 and func_L39_004D5BE8 in
NTSC-U Level 39. Remove the two obsolete map exceptions and refresh the
coverage ledger and report.

python3 tools/build.py --target all -j 4 printed all three PAL MATCH
lines. The PAL Level 39 build matched its ELF and disc hashes. The
stock carry_us.sh with JOBS=4 matched all 54 NTSC-U targets. All prior
manifests and placement counts were preserved, and the three new sites
and their final linked bindings matched.

python3 tests/check_repository.py passed in the toolchain venv and in
the clean CI archive. Both unit suites ran 337 tests with 7 and 46
skips respectively. The clean archive compiled all 109 Python files.
@ImBaedin ImBaedin changed the title Match 14 native NTSC-U routines and carry 17 shared routines Match 14 native NTSC-U routines and carry 20 shared routines Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Management review of 37a1665d20d614854859abfaf7ffafc768775460: all eight production tool/test/doc files equal the reviewed snapshots. The mixed Sony path compiles the real canonical PAL run with its original flags and per-disc protection, checks the original object against retail, and isolates only the selected function. Changes to instruction words are confined to existing relocation addends; both original and isolated instructions, known targets and the complete owned switch table must agree with retail. The default A8 path remains unchanged. Parent review found and fixed table-edge, foreign-owner dependency and unsupported named-reference cases; all12 focused tests, three production-style CLI checks and six real PAL/US linker proofs passed.

Independent final checks confirm all431 PR C placements plus nine older cohort sites, every prior entry across54 manifest snapshots retained, exactly the three expected Level39 additions and zero ledger losses against 1d442fa3 and origin/master. Actual final stock objects reproduce all text, relocations and14 switch entries; the expanded published-object audit has no symbol conflicts. All12 committed files are expected, and only the two obsolete exceptions were removed. All9,203 frozen input hashes still match.

Final logs contain PAL core3, PAL39 ELF/disc matches, US54, passing repository checks in both environments,337 normal tests (7 skipped) and337 clean CI tests (46 skipped). Both CI jobs are green. No unresolved correctness findings in this batch.

@ImBaedin

ImBaedin commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Checked the refreshed report on 37a1665d20d614854859abfaf7ffafc768775460. The “No longer matching” entry for func_L39_00593F98 is a unit-movement artifact: the same 400-byte body at retail address 0x00593F98 is 100% in both reports. It moves from Level 39: Multiplayer Menu to Shared level code after the boundary correction identifies its 16 additional copies.

The actual manifests retain 0x00593F98 and link all 17 placements from the existing PAL source func_L39_00595248. The final independent audit preserves every prior manifest entry and ledger count. Both CI jobs pass on the current reviewed head; the notification’s 5f6bc86 is an older commit. No source or report-generator change is needed.

Port the regional reticle timing and explosion particle behavior in
func_L39_0052B850, func_L39_0052CF88 and func_L39_005B69C0. Follow the
matched PAL callers' argument order and keep the values observed in the
NTSC-U argument registers. Use the storage extents read by the native
callees. Inherit each counterpart's compiler flags and record the
native division and return-address save padding.

The native checker with -Werror-implicit-function-declaration reported
all three MATCH and produced the stock carry objects byte for byte.
The linked ELFs reproduce 51 code placements, 3,281 relocations and
17 switch tables. All 54 prior manifests and ledger counts are preserved
against 37a1665 and origin/master.

python3 tools/build.py --target all -j 4 printed all three PAL core
MATCH lines. JOBS=4 sh tools/carry_us.sh matched all 54 NTSC-U targets
and passed the version-map check. python3 tests/check_repository.py
passed, and python3 -m unittest discover -s tests ran 337 tests with
7 skips and no failures.
@ImBaedin ImBaedin changed the title Match 14 native NTSC-U routines and carry 20 shared routines Match 17 native NTSC-U routines and carry 20 shared routines Dec 5, 2026
@ImBaedin

ImBaedin commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Management review of 57c472bdc4c93df96cc2c359fd7d0791a07f70f4: all three published sources and stock objects equal the final parent-reviewed snapshots, including the one-byte EOF cleanup. The complete joint states, camera record, Moby transform, particle descriptor and sound-slot array are modeled with verified storage extents. Original matched PAL caller forms retain the observed inputs within each register bank. The direct callback preserves the two inputs actually passed by retail. PAL source owners and their flags are unchanged.

Final ELF checks reproduce all 51 code placements, 3,281 relocations, 17 switch tables totaling 544 bytes and 1,530 referenced symbol values. All 54 previous manifests retain every entry; exactly 51 new sites link from C. All 431 earlier PR placements survive, for 482 PR placements and 491 sites including the pre-PR cohort. Both prior-head and master ledger comparisons have zero count losses.

The final 9,160-input checksum manifest is intact. The repeated PAL core build printed all three expected hashes, and NTSC-U matched all 54 targets with the map in step. Repository checks, 337 tests with seven skips and committed whitespace checks pass. The nine-file commit contains only the reviewed source/metadata batch. Both CI jobs pass on this head. No correctness findings.

Checked the refreshed ByteMatch report on this head. Its “No longer matching” row for func_L39_00593F98 is the known move from a single-level unit to the shared cohort. Both local reports still record the same 400-byte function at virtual address 0x00593F98 with 100% match. I independently rechecked the final ELF text, relocations, tables and C manifests at all 17 sites: they remain linked from func_L39_00595248, including Level 39 at 0x00593F98. No C coverage loss or source change is required.

Merge master at 6cca897. Keep both
branches' division-padding entries and regenerate the map, linked C
ledger and progress reports. Existing PR sources are unchanged; the
camera owner is identical to master. No new matching work is included.

PAL core builds printed 3 MATCH lines; PAL overlays matched all 49
ELFs and disc payloads. The stock JOBS=4 NTSC-U carry printed 54 of
54 targets matching and the final map-in-step check. Its supervising
tool timed out, so the child wait status was unavailable; independent
version-map, repository, coverage and linked-object validators passed.

All previous entries across 54 manifests and both ledgers survive.
The 482 PR placements and 9 older sites remain, and the inherited
camera links at all 49 PAL and 51 US placements. An initial hung-compiler
timing test failed; its focused rerun and unchanged full rerun passed
(337 tests, 7 skips). Frozen input and staged whitespace 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