Skip to content

Match two PAL drawing wrappers - #57

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

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

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Add matching C for two previously unmatched functions in the SCES_532.85 main image:

  • func_0044BD28 (48 bytes): supplies four identical colors to func_0044B920 and preserves the incoming texture argument.
  • func_00474968 (48 bytes): forwards the packed 128-bit position to func_004748C0 with 0.5f, 32.0f, 32 and 0 as the remaining arguments.

Both use the existing compiler pipeline with no additional flags. PAL progress increases by 2 functions and 96 bytes: 5,138 -> 5,140 matched functions and 396,888 -> 396,984 matched bytes. The existing map rows are retained; two verified PAL rows and two US other rows are added. The PAL report and README were regenerated using tools/progress.py; the US report is unchanged.

Validation:

  • Compiled both final source files directly through tools/cc.sh (SN GCC 2.95.3 and the existing assembler passes).
  • Compared each 48-byte function against the PAL disc using the repository's relocation masks: MATCH for both.
  • Independently resolved every R_MIPS_26 relocation and checked it against the original instruction: func_0044B920 and func_004748C0 are the correct targets; neither function has any other relocations.
  • Reviewed the callees to retain the incoming texture argument and the full packed position rather than relying only on a masked byte match.
  • tools/progress.py --version us --check and --version pal --check passed; git diff --check passed.

This is targeted PAL validation. A full project rebuild, the global function/relocation audits and US-disc comparisons were not run; the US disc is not available in this workspace. No retail binaries, disassembly or assets are included.

Reconstruct func_0044BD28 and func_00474968 from the PAL main image.
Preserve the texture argument and packed 128-bit position, respectively.
Both 48-byte functions match through tools/cc.sh and their call targets
were checked against the retail instructions.

Update the PAL/US source maps and regenerate the progress reports.

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