Skip to content

feat(pal): carry 20 more functions from their v1.01 C - #426

Open
cadelass wants to merge 1 commit into
OpenRAC:masterfrom
cadelass:match/pal-twenty-20261105
Open

cadelass wants to merge 1 commit into
OpenRAC:masterfrom
cadelass:match/pal-twenty-20261105

Conversation

@cadelass

@cadelass cadelass commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What

20 PAL-only functions (func_PAL_…) in C, each matching every place it has on PAL.

Each unit is the C of a matched v1.01 function, changed only where PAL's bytes differ (50 Hz constants, ids, callee func_PAL_ names). Its header names the v1.01 twin and lists every change.

PAL function v1.01 C
func_PAL_L01_003C00F0 func_L01_003BC540
func_PAL_L02_00402940 func_L02_003F9B70
func_PAL_L03_00421E20 func_L03_0041CA78
func_PAL_L00_002A4788 func_L00_002A4928
func_PAL_L00_002B1248 func_L00_002B1350
func_PAL_L00_00362A88 func_L00_003603C0
func_PAL_L00_00376A18 func_L00_00373F48
func_PAL_L00_00394148 func_L00_00390FF8
func_PAL_L00_003E3968 func_L00_003DF710
func_PAL_L00_0040E9F0 func_L00_00409E48
func_PAL_L00_004169B0 func_L00_00411B30
func_PAL_L00_0042B1E8 func_L00_00425CD0
func_PAL_L01_002AE010 func_L01_002AE128
func_PAL_L01_0031C9C0 func_L01_0031AB20
func_PAL_L01_0039A7B0 func_L01_003973A0
func_PAL_L01_0039BF70 func_L01_00398B50
func_PAL_L01_0039C970 func_L01_00399510
func_PAL_L02_00415BD0 func_L02_00410F68
func_PAL_L04_00408A58 func_L04_004045E0
func_PAL_L05_0039A9A8 func_L05_00397B30

func_PAL_L02_00402940 reads its jump table through ref_L02_00402940_00: PAL's table is at 0x2A5440, v1.01's at 0x2A5560.

Unit flags are the twin's. They are added to config/cflags.txt, with -Wa,-G64 or the SN mask profile where the twin has them.

Checks

With the compiler rebuilt from this tree (#423 changed its transformers):

  • tools/build.py all --strict --version pal: 28/28 programs OK;
  • tools/build.py all --strict: 28/28 USA v1.01 programs OK;
  • python -m unittest discover -s tests: 415 tests OK;
  • tests/check_repository.py passes; tools/progress.py --check --version pal agrees with the reports (the PAL report predates these units, so a maintainer regenerates it).

USA v2.00 was not built; none of these functions exist in it.

The 22 menu accessors stay out until the catalogue shift in #421 is repaired.

🤖 Generated with Claude Code

Each unit is the C of a matched v1.01 function, changed only where PAL's bytes differ
(50 Hz constants, ids, callee PAL names). Every unit matches all of its places on PAL, and
its header names the v1.01 twin and lists the changes. func_PAL_L02_00402940 reads its
jump table through ref_L02_00402940_00, because PAL's table is at 0x2A5440, not v1.01's
0x2A5560.

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

bytematchdev Bot commented Nov 5, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_972.68_v2

Code matched 86.02% · 4.80 MB of 5.58 MB
Fuzzy match 86.02%
Functions 7,932 / 8,639
Data matched 0.00%
Units complete 1,017 / 1,190

No function changes.

SCES_516.07

Code matched 56.58% · 3.23 MB of 5.70 MB
Fuzzy match 56.58%
Functions 7,242 / 8,677
Data matched 0.00%
Units complete 990 / 1,217

No function changes.

SCUS_972.68

Code matched 91.80% · 5.07 MB of 5.53 MB
Fuzzy match 91.80%
Functions 8,173 / 8,584
Data matched 0.00%
Units complete 983 / 1,069

No function changes.

Commit 94fcfb2 · 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