Skip to content

Match thirteen PAL resident, menu and overlay functions - #196

Draft
Adrian1845 wants to merge 5 commits into
OpenRAC:mainfrom
Adrian1845:match/pal-next-batch-2026-11-23
Draft

Adrian1845 wants to merge 5 commits into
OpenRAC:mainfrom
Adrian1845:match/pal-next-batch-2026-11-23

Conversation

@Adrian1845

@Adrian1845 Adrian1845 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This draft adds thirteen exact PAL matches across five commits.

373c712

Adds five exact C matches for the PAL release (SCES_532.85). The three level 00 functions are part of the multiplayer menu, and the other two are in the resident program.

  • Resident program: func_0046F3A8, func_00479920
  • Multiplayer menu: func_L00_0070D1A8, func_L00_0070D2C0, func_L00_0070DEB0

The PAL report gains five distinct functions and 1,080 matched bytes. The US map records the five PAL sources as regional variants.

d20f858

  • func_L01_0055B760 checks whether any entry in a list has a clear flag byte. All 68 bytes match in 46 PAL program images.
  • func_L01_00575700 updates a buffer pointer and two 16-bit fields. All 40 bytes match in 24 PAL program images.

This commit adds 108 matched bytes to the PAL report. It also retains the two unfinished 128-bit zeroing routines in nonmatching/.

5daf6a8

  • func_00540A00 checks a live interface payload and two object flags. All 176 bytes match in 49 PAL program images after resolving the call and data references in each image.
  • func_L41_003BDF18 compares two floating-point fields. All 56 bytes match in 22 PAL program images.

This commit adds 232 matched bytes to the PAL report and removes the two superseded PAL drafts from nonmatching/.

e713d64

  • func_00499650 looks up a packed color by row and column, with a default for negative indices. All 56 bytes match in 49 PAL program images after resolving the table reference in each image.
  • func_004FD000 searches a table by two keys and returns its first record on a miss. All 64 bytes match in 49 PAL program images after resolving the table references in each image.

This commit adds 120 matched bytes and aligns the packed-color return type in three existing callers. Their compiled code, allocated data and relocations are identical before and after the declaration update.

6525f86

  • func_L00_006FAC10 writes a field into a byte buffer at a bit cursor. All 300 bytes match in 47 PAL level program images with no relocations. The matching C in the RAC3 bit writer informed the reconstruction.
  • func_L41_004475C0 checks the mask enable state and the object's mode. All 72 bytes match in 22 PAL level program images after verifying both relocation targets in each image.

This commit adds 372 matched bytes and removes both superseded PAL drafts.

Verification

For 373c712c

  • Compiled all 10,603 C translation units in the final source set with the repository toolchain and the flags declared in each file.
  • Compared all 19 catalogue placements for these functions against PAL and verified 122 relocation targets. There were no mismatches or unresolved references.
  • Verified that both regional maps and progress reports are current.

For d20f858c

  • Compiled both new sources with the repository toolchain.
  • Compared the emitted bytes at every PAL placement, including the duplicate level images. The relocation audit reported zero mismatches and zero unresolved references.
  • Rechecked the PAL and US maps and progress reports. The PAL report now counts 9,856 exact functions.

For 5daf6a87

  • Compiled both new sources with the repository toolchain and compared all bytes at every PAL placement.
  • Checked both resident relocation targets. Verified the equivalent call targets and data bindings independently in the other PAL program images.
  • Rechecked the PAL and US maps and progress reports. PAL now counts 9,858 exact functions.
  • Compared the optional PAL signature check against the previous source set. Both runs reported the same 54 existing declaration mismatches.

For e713d649

  • Verified the new sources and rebuilt callers with the repository toolchain. Each PAL image contains a unique copy of the corresponding table at the address expected by its relocations.

  • The three PAL relocation checks passed. Both regional maps and progress reports are current. PAL now counts 9,860 exact functions.

  • The optional PAL signature check reported the same 54 existing declaration mismatches as the baseline.
    For 6525f86e

  • Compiled both new sources with the repository toolchain. Compared both functions against every PAL copy. The PAL relocation audit reported zero mismatches and zero unresolved references.

  • Rechecked the PAL and US maps and progress reports. PAL now counts 9,862 exact functions.

Co-authored-by: Codex <codex@openai.com>
@bytematchdev

bytematchdev Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

ByteMatch progress report

SCES_532.85

Code matched 20.12% (+0.03%) · 1.17 MB of 5.81 MB
Fuzzy match 21.05% (+0.02%)
Functions 9,862 (+13) / 18,136
Units complete 5,306 (+5) / 5,364
✅ Newly matched (13)
  • func_L00_006FAC10 (300 bytes)
  • func_L00_0070D1A8 (276 bytes)
  • func_0046F3A8 (260 bytes)
  • func_L00_0070D2C0 (236 bytes)
  • func_00479920 (200 bytes)
  • func_00540A00 (176 bytes)
  • func_L00_0070DEB0 (108 bytes)
  • func_L41_004475C0 (72 bytes)
  • func_L01_0055B760 (68 bytes)
  • func_004FD000 (64 bytes)
  • func_00499650 (56 bytes)
  • func_L41_003BDF18 (56 bytes)
  • func_L01_00575700 (40 bytes)
📉 Worse (2)
  • func_0046F3A8 94.23% → 0.00%
  • func_00540A00 98.30% → 0.00%

SCUS_974.65

Code matched 18.78% · 1.09 MB of 5.78 MB
Fuzzy match 19.78%
Functions 9,511 / 18,172
Units complete 5,278 / 5,337

No function changes.

Commit 6525f86 · Ratchet: Deadlocked on ByteMatch

Match func_L01_0055B760 and func_L01_00575700 byte for byte. Preserve the two 128-bit zeroing near misses and refresh the regional maps and PAL report.

Co-authored-by: Codex <codex@openai.com>
@Adrian1845 Adrian1845 changed the title Match five PAL resident and multiplayer menu functions Match seven PAL resident, menu and shared overlay functions Dec 2, 2026
Match func_00540A00 and func_L41_003BDF18 exactly, verify their PAL program placements, and update the maps and PAL report.

Co-authored-by: Codex <codex@openai.com>
@Adrian1845 Adrian1845 changed the title Match seven PAL resident, menu and shared overlay functions Match nine PAL resident, menu and overlay functions Dec 2, 2026
Match func_00499650 and func_004FD000 on every PAL program placement. Align the packed-color return declarations without changing caller objects.

Co-authored-by: Codex <codex@openai.com>
@Adrian1845 Adrian1845 changed the title Match nine PAL resident, menu and overlay functions Match eleven PAL resident, menu and overlay functions Dec 3, 2026
Match the shared bit writer and Battledome Tower mask selector. Verify 47 raw bit-writer copies and the two selector relocations in all 22 copies.

Co-authored-by: Codex <codex@openai.com>
@Adrian1845 Adrian1845 changed the title Match eleven PAL resident, menu and overlay functions Match thirteen PAL resident, menu and overlay functions Dec 3, 2026
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