Skip to content

decomp(pal): match five lookup and state-write functions - #74

Merged
Lynder063 merged 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-recomp-matches
Nov 1, 2026
Merged

Lynder063 merged 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-recomp-matches

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Adds five matching PAL (SCES_532.85) game functions reconstructed from retail code with PS2Recomp's translated output as an additional reference: three indexed table reads, a three-word state write with an OR-combined middle word, and a float parameter write scaled by 5/6.

Function Bytes
func_004985D0 28
func_00499AE8 24
func_0049BE58 28
func_00504BF0 20
func_0050FF90 28

Total: 5 canonical functions / 128 matched bytes. Updates both mapping tables and the PAL progress report; the US progress report is unchanged. The C uses the existing compiler pipeline and no new flags or assembler/matching changes. 00499AE8.c uses a GNU zero-length array to describe the externally stored variable-length tail.

Validation:

  • Recompiled all five final source files through tools/cc.sh; sizes and non-relocated instruction bits match the direct PAL catalogue addresses.
  • Independently resolved all six HI16/LO16 relocations in the table reads to the globals encoded in retail. The two other functions have no relocations and match all bytes directly.
  • Both versions' mapping/progress checks pass. Existing map rows are retained.
  • Read-only PAL map comparison: 6,751 matching places, zero byte mismatches, zero unavailable source objects. This is the masked-byte map comparison, not a global relocation audit.
  • The five additions were compiled separately; a full source rebuild was not rerun for this batch. A complete US retail audit was not run because the US input is unavailable. No frontend relocation checks or playable native-port claims are made.

Related findings and source-hash/relocation evidence: #73. The unmatched drafts and translation index remain in that issue's research branch; this PR contains only the five matched functions and required maps/reports. No disc data, extracted binaries, generated instruction listings, or SDK material is included.

Verify 128 bytes through the original compiler pipeline and resolve the six global-address relocations independently. Keep the US progress report unchanged.

Co-Authored-By: Codex <noreply@openai.com>
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.

2 participants