Skip to content

Match two PAL interpolation helpers - #62

Open
Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-interpolation
Open

Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-interpolation

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Adds matching C for two PAL interpolation helpers: func_00474558 evaluates (1 - func_00454140(value * pi)) * 0.5 (64 bytes), and func_00501D18 performs two-component weighted interpolation (64 bytes). The weighted helper preserves the original order of loads, calculations and stores, including aliasing behavior when the output overlaps either input.

Validation:

  • Compiled both final sources through the repository's SN compiler and tools/cc.sh: 128 bytes match PAL retail at the catalogue addresses.
  • The weighted helper matches with no relocation masking. Independently resolved the easing helper's call relocation, including its object addend, to retail address 0x00454140; all float constants match.
  • Added only the two verified PAL map rows and corresponding US other rows, preserving all prior rows. Regenerated the reports/README; the US report is semantically unchanged.
  • Both versions of tools/progress.py --check and git diff --check pass.

The existing repository sources were compiled in the preceding contribution's full compilation run; these two final sources were compiled and verified separately. No US retail image is available locally, so global US match/relocation audits were not run. No retail data, disassembly or toolchain files are included.

Based directly on upstream main, independently of the other open contributions. This PR adds two functions / 128 bytes to the PAL baseline of 5,138 / 396,888; its report records 5,140 / 397,016.

Recover the scalar angle-helper easing expression and the two-component
weighted interpolation with the original floating-point operation order.

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.

1 participant