Skip to content

Match 50 PAL engine and menu functions - #95

Open
Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-codex-parallel-01
Open

Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-codex-parallel-01

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Adds matching C implementations for 50 previously undecompiled PAL resident functions (11,856 bytes). Cross-game comparison identified public RAC3 implementations useful for 10 of these reconstructions. Immutable donor commits, paths and functions are credited in config/pal/crossgame_parallel01.tsv, source comments and THIRD_PARTY_NOTICES.md. Fingerprints were used to find references; acceptance uses this game's PAL retail code.

The batch covers packet generation, font metrics, particle setup, cursor parsing, object copying, resource dispatch and menu/list state updates. Interfaces were checked against actual callers and callees, including full 64-bit color forwarding, text and buffer pointers, callback argument types, output initialization and object extents. Candidates needing register pins, assembly barriers, unsupported padding or unproven shift bounds were excluded.

Adds 50 PAL match rows and corresponding US other rows while preserving all existing entries and their order. PAL matched code increases from 497,616 to 509,472 bytes (8.560511% to 8.764470%), and matched functions from 6,032 to 6,082. The US progress report is unchanged.

Validation:

  • Rebuilt all 50 final translation units through the unchanged tools/cc.sh pipeline and compared them at their direct PAL catalogue addresses: 50/50 MATCH.
  • Independently resolved all 610 text relocation entries against PAL retail, including call targets, function pointers, HI16/LO16 addresses and GP-relative references. Checked locally defined small-data initializers against retail; PAL GP was derived from startup code.
  • Both versions' progress/source-map checks pass. Verified the exact PAL function/byte increase, unchanged US report, preservation of existing map rows, and that staged C source hashes equal the audited sources.

This validation covers the added translation units and their matching metadata. A full repository rebuild, US disc audit, linked game build and runtime test were not run. No compiler-pipeline changes, disc data, extracted binaries or assembly listings are included.

@bytematchdev

bytematchdev Bot commented Nov 4, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_974.65

Code matched 7.17% · 414.34 KB of 5.78 MB
Fuzzy match 7.73%
Functions 5,435 / 18,085
Units complete 2,839 / 2,899

No function changes.

SCES_532.85

Code matched 8.76% (+0.20%) · 509.47 KB of 5.81 MB
Fuzzy match 9.26% (+0.20%)
Functions 6,082 (+50) / 18,113
Units complete 3,320 (+50) / 3,379
✅ Newly matched (50)
  • func_00454C38 (468 bytes)
  • func_004A66E8 (412 bytes)
  • func_004A55F8 (348 bytes)
  • func_004D2E08 (320 bytes)
  • func_00502E90 (312 bytes)
  • func_004CD188 (308 bytes)
  • func_00489550 (304 bytes)
  • func_004C4D20 (288 bytes)
  • func_00459FD0 (284 bytes)
  • func_004F16C8 (276 bytes)
  • func_00493D48 (268 bytes)
  • func_004E3C48 (268 bytes)
  • func_004B64A0 (260 bytes)
  • func_0053EA90 (260 bytes)
  • func_004BA498 (256 bytes)
  • func_004A0560 (252 bytes)
  • func_004A0398 (244 bytes)
  • func_00506978 (244 bytes)
  • func_0046BC78 (240 bytes)
  • func_004D07F0 (240 bytes)
  • func_004A9BF0 (236 bytes)
  • func_004D2928 (232 bytes)
  • func_0050B488 (232 bytes)
  • func_0050C250 (232 bytes)
  • func_0048C5F0 (228 bytes)
  • func_004AE7A8 (228 bytes)
  • func_0046F2C8 (224 bytes)
  • func_00466940 (220 bytes)
  • func_004AE058 (220 bytes)
  • func_004C9EB8 (216 bytes)
  • …and 20 more

Commit d2f3c6c · Ratchet: Deadlocked on ByteMatch

@Sumaiter
Sumaiter marked this pull request as draft November 4, 2026 11:56
@Sumaiter
Sumaiter marked this pull request as ready for review November 4, 2026 15:53
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