Repository navigation
feat(pal): carry 59 functions from their v1.01 C - #418
Merged
Merged
Conversation
Each is a PAL-only function whose code has the same instructions as a matched v1.01 function. The C is v1.01's, with PAL's 50 Hz values (frame counts, per-frame steps, (60/50)^2 accelerations), its own callees and its text ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ByteMatch progress reportSCES_516.07
No function changes. SCUS_972.68
No function changes. SCUS_972.68_v2
No function changes. Commit 07bf086 · Ratchet & Clank: Going Commando on ByteMatch |
bigbeno37
pushed a commit
to bigbeno37/rac2-decomp
that referenced
this pull request
Nov 4, 2026
Match func_L01_00390A50 (528 bytes) and func_002CD3C0 (284 bytes), adding 812 distinct USA v1.01 bytes and 46 carrying C placements. Group the real forced-trigger arm, use canonical point/volume calls, and separate the UI coordinate from its later owner pointer. Restore the caller-supplied owner in two existing setup helpers and explicitly forward all four FP bounds through the three regional rectangle wrappers. Their complete objects remain unchanged. A native 32-bit C regression covers the context, flags, bounds and null path in all regions; its prior- source control detects the missing FP arguments. Retain fourteen bounded near misses with their new allocation, alignment, copy and ABI constraints. Remove obsolete matching/functional drafts and their index entries rather than leaving parallel implementations. Validation: 84 loaded images equal retail with zero C fallbacks; strict USA/US2 builds preserved under an equivalent-input guard, PAL rebuilt after upstream OpenRAC#418; all 46 new C placements verified, 168 owner-hook and 84 forwarder placements controlled; 383 unit tests; repository and three progress checks. README/report bytes unchanged.
bigbeno37
added a commit
that referenced
this pull request
Nov 5, 2026
tools/build.py all --strict on master 236cfdf (after #416, #417, #418, #420, 4b786ab, 4d6e47b and 236cfdf): 28 programs OK in each of us, pal and us2. tools/progress.py for each release; --check --strict passes for all three. US 8,173 of 8,584 (91.80%), PAL 7,242 of 8,677 (56.58%), US2 7,932 of 8,639 (86.02%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
59 PAL-only functions (
func_PAL_…) in C: 48,232 bytes over 294 places in the 27 levels. All match PAL (SCES_516.07), every place.Each one has the same instructions as a v1.01 function that already has matched C. Its unit in
src/pal/is that C, changed only where PAL's bytes differ:func_PAL_names.0x27BE→0x1310infunc_PAL_L03_003CAA68).Several PAL constants are one ulp off the exact quotient (
0x3CA3D70Bfor 1/50,0x3E4CCCCEfor 1/5). They are written as the shortest decimal that gives those bits (0.020000001f,0.20000002f). Each unit's header names its v1.01 twin and lists what changed.The unit's flags are its v1.01 file's: the F7 copies keep
-malign-loops=2, for example. One reference needed PAL's catalogue name: the 8-byte callback thatfunc_PAL_L10_00423AA0passes isfunc_L00_00410D18in PAL.Pairing: I compared opcode sequences of PAL's remaining functions with the matched v1.01 ones, and kept only same-size pairs at 97% or more. 158 such pairs exist. These 59 are the ones whose differences map onto the C and that then match every place with no compiler warnings. The others stay
INCLUDE_ASM, for example:func_PAL_L00_0030F*, each passing its own address constant;No
nonmatching/notes are added.The 59 functions
func_PAL_L00_002AB0C0func_L00_002AB1D8func_PAL_L00_002B3E90func_L00_002B3F68func_PAL_L00_002D5380func_L00_002D4E58func_PAL_L00_003B1D70func_L00_003AE550func_PAL_L00_003BFBD8func_L00_003BBF48func_PAL_L00_003F9B90func_L00_003F5750func_PAL_L00_004033A8func_L00_003FEAC8func_PAL_L00_00430308func_L00_0042AD98func_PAL_L02_00335678func_L02_00333480func_PAL_L02_0038CE70func_L02_00389F70func_PAL_L01_002A8B30func_L01_002A8C48func_PAL_L06_003E8240func_L06_003E4BE0func_PAL_L05_0037C968func_L05_0037A218func_PAL_L05_00447F28func_L05_00441D40func_PAL_L12_0040CBA0func_L12_00408050func_PAL_L05_00432530func_L05_0042C928func_PAL_L18_003FDE80func_L18_003F9DA0func_PAL_L02_00405E88func_L02_00401530func_PAL_L03_003DDB50func_L03_003D9820func_PAL_L04_0033EB40func_L04_0033CC00func_PAL_L04_0040B8B8func_L04_004073E8func_PAL_L13_003F0F10func_L13_003ECD48func_PAL_L00_004138A0func_L00_0040EAA0func_PAL_L01_003D5C30func_L01_003D1A48func_PAL_L01_00414828func_L01_0040F5A8func_PAL_L01_00415E78func_L00_0040EAA0func_PAL_L01_00432438func_L01_0042C8D8func_PAL_L02_003D62B8func_L02_003D2248func_PAL_L02_00402030func_L02_003FD8B8func_PAL_L02_0043F638func_L00_0040EAA0func_PAL_L03_003CAA68func_L03_003C6A28func_PAL_L03_003CBB00func_L03_003C7AC0func_PAL_L03_00423F28func_L03_0041EAE0func_PAL_L04_003F16D8func_L04_003ED740func_PAL_L05_00419C60func_L00_0040EAA0func_PAL_L06_00405FA8func_L06_00402230func_PAL_L06_0045ACC8func_L00_0040EAA0func_PAL_L07_003FC8D0func_L07_003F80B8func_PAL_L08_003DD458func_L08_003D92D8func_PAL_L09_00408290func_L09_00403398func_PAL_L10_0041A730func_L00_0040EAA0func_PAL_L10_00423AA0func_L10_0041EC10func_PAL_L11_003E0D58func_L11_003DCEB0func_PAL_L11_0043C288func_L11_00436D08func_PAL_L11_0043D438func_L11_00437EA8func_PAL_L11_00445BB8func_L11_00440360func_PAL_L11_004460C0func_L11_00440868func_PAL_L11_0044BC30func_L11_004461E8func_PAL_L11_00458020func_L11_00452450func_PAL_L11_00467118func_L11_00461308func_PAL_L11_00473908func_L00_0040EAA0func_PAL_L11_004791F0func_L11_00472E10func_PAL_L12_0041C930func_L00_0040EAA0func_PAL_L13_00421C68func_L00_0040EAA0func_PAL_L17_003D0B70func_L17_003CC850func_PAL_L19_00425AE0func_L19_004203F0func_PAL_L20_003A1940func_L20_0039E9F8func_PAL_L20_00449750func_L20_00443CF0func_PAL_L20_00449870func_L20_00443DF0Checked
On
origin/master21cf0111, with the compiler rebuilt from it:python3 tools/build.py all --strict --version pal: 28 programs OK.python3 tools/build.py all --strict: 28 programs OK. The v1.01 build is unchanged; the branch only addssrc/pal/files and theirconfig/cflags.txtlines.python3 tools/check.py <function> --version pal: every place matches, for each of the 59.python3 -m unittest discover -s tests: 382 tests OK.python3 tests/check_repository.py: passed.python3 tools/progress.py --check: passed.USA v2.00 was not run: I don't have its dump. These are PAL-only functions, so v2.00 doesn't have them.
progress/reports and the README table are not touched.🤖 Generated with Claude Code