Skip to content

feat(pal,us2): port func_L00_002D5EB8 to both releases, retain one near-miss pair - #442

Open
nominalsan wants to merge 1 commit into
OpenRAC:masterfrom
nominalsan:match/pal-us2-l00
Open

nominalsan wants to merge 1 commit into
OpenRAC:masterfrom
nominalsan:match/pal-us2-l00

Conversation

@nominalsan

Copy link
Copy Markdown
Contributor

What

The PAL and USA v2.00 copies of the matched USA v1.01 func_L00_002D5EB8 (src/levels/shared/L00_002D3798-g8.c), ported as C, and one near-miss pair retained in nonmatching/.

Function Bytes Places From
func_PAL_L00_002D6408 1376 27 levels func_L00_002D5EB8 with the 50 Hz duration 0x12C (300 frames) where v1.01 passes 0x168 (360), and PAL's own callees func_PAL_00288E20, func_PAL_L00_0030E648, func_PAL_002B1588. New src/pal/levels/shared/L00_002D6408-g8.c
func_US2_L00_002D6258 1376 27 levels func_L00_002D5EB8 with v2.00's own callees func_US2_00288F30, func_US2_L00_0030D9F8, func_US2_002B1880. New src/us2/levels/shared/L00_002D6258-g8.c

Both use the -g8 default profile, like their original, so config/cflags.txt is unchanged. The per-level externals are ref_PAL_L00_002D6408_00 and ref_US2_L00_002D6258_00.

Retained near miss (markers kept): func_PAL_002CCAC8 and func_US2_002CCC18 (2100 bytes, boot + 27 levels), the PAL and v2.00 copies of func_002CBC58. Both are exact (28/28) only with volatile on D_001AB910, the qualifier the merged USA C (src/game/002C7748-panels-g8.c) uses, which no known code writes. Without it they are 2068/2100 bytes: the empty arm else if (page == D_0025A058 && !D_001AB910) { } loses retail's dead read (beql with lw D_001AB910 in its slot). Three lawful forms were measured. The notes in nonmatching/game/ record why they cannot close: flow's (use (const_int 0)) after a block-ending call stops cross-jumping. This needs a maintainer's ruling on D_001AB910, which also covers func_002CBAE0, func_002CBC58 and the PAL/v2.00 copies of both.

Checked

  • tools/check.py: func_PAL_L00_002D6408 27 of 27, func_US2_L00_002D6258 27 of 27.
  • tools/build.py all --strict: 28 programs OK.
  • tools/build.py all --version pal --strict: 28 programs OK.
  • tools/build.py all --version us2 --strict: 28 programs OK.
  • placed.json: each function is placed in all 27 carrying programs; none fell back.
  • python3 -m unittest discover -s tests: 540 tests, OK (1 skipped).
  • python3 tests/check_repository.py: repository checks passed.
  • python3 tools/progress.py --check: passes (the reports of us, pal, us2 agree).
  • git ls-files --eol: all 7 changed files i/lf w/lf.

tools/progress.py was not run; progress/report.json and the README are not touched.

Adds 1 PAL and 1 USA v2.00 function (C); no USA v1.01 functions. Independent of #441.

🤖 Generated with Claude Code

…ar-miss pair

C ports of the matched USA v1.01 func_L00_002D5EB8
(src/levels/shared/L00_002D3798-g8.c), each its own -g8.c unit:
- func_PAL_L00_002D6408 (27 levels): the 50 Hz duration 0x12C (300 frames)
  where v1.01 passes 0x168 (360), and PAL's own callees
  func_PAL_00288E20, func_PAL_L00_0030E648 and func_PAL_002B1588.
- func_US2_L00_002D6258 (27 levels): the same C with v2.00's own callees
  func_US2_00288F30, func_US2_L00_0030D9F8 and func_US2_002B1880.

Near misses (markers kept): func_PAL_002CCAC8 and func_US2_002CCC18, the
PAL and v2.00 copies of func_002CBC58, are exact (28/28) only with the
volatile qualifier on D_001AB910 that the merged USA C uses. Without it they
are 2068/2100 bytes: an empty else-if arm loses its dead read. Three lawful
forms were measured; the notes in nonmatching/game/ record why they cannot
close and that the qualifier needs a maintainer's ruling.

Checks:
- tools/check.py: func_PAL_L00_002D6408 27 of 27, func_US2_L00_002D6258
  27 of 27.
- tools/build.py all --strict: 28 programs OK in each of USA v1.01, PAL
  and USA v2.00; both functions are in all 27 carrying placed.json.
- python3 -m unittest discover -s tests: 540 tests OK (1 skipped);
  tests/check_repository.py: passed; tools/progress.py --check: passed.
Report not regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bytematchdev

bytematchdev Bot commented Nov 10, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_972.68_v2

Code matched 97.53% · 5.44 MB of 5.58 MB
Fuzzy match 97.53%
Functions 8,515 / 8,579
Units complete 1,243 / 1,279

No function changes.

SCUS_972.68

Code matched 98.83% · 5.46 MB of 5.52 MB
Fuzzy match 98.83%
Functions 8,491 / 8,527
Units complete 1,090 / 1,111

No function changes.

SCES_516.07

Code matched 96.60% · 5.50 MB of 5.70 MB
Fuzzy match 96.60%
Functions 8,526 / 8,607
Units complete 1,314 / 1,354

No function changes.

Commit a4d6c74 · Ratchet & Clank: Going Commando on ByteMatch

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