Skip to content

Match 273 PAL-only functions (28 with @divpad, depends on #204) - #205

Merged
llesieur99 merged 24 commits into
OpenRAC:mainfrom
JeremyL71:pal/jeremyl71-batch1
Dec 4, 2026
Merged

llesieur99 merged 24 commits into
OpenRAC:mainfrom
JeremyL71:pal/jeremyl71-batch1

Conversation

@JeremyL71

@JeremyL71 JeremyL71 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

273 PAL-only functions (SCES_532.85), all reserved in #112 (my comment there). Nineteen commits of C by family, then one commit with the regenerated maps and reports.

Depends on #204 (first commit here, @divpad): the functions marked @divpad (28) need it. Review that one first; once it is merged I will rebase this branch onto main.

Commit Functions
Shared overlay (14) L00_005CABB0, L00_00601990, L00_00670E18, L00_006EFD70, L01_003CC778, L01_003D0960, L01_0043B970, L01_00441A08, L01_00473F98, L01_00654E98, L01_00658558, L02_004C73C0, L02_004CDEF8, L06_004C9A80
Menu (4) 0054B140, L00_00713F30, L00_00757C28, L00_00776C80
Menu and shared overlay (11) 0045CEE0, 00465650, 004BFCC8, 004CBF90, 004F9690, 004FAB48, 005120D8, L00_00670D68, L01_00442518, L01_00572AD8, L01_00653FD8
ps2eeas's nops before div.s, @divpad (4) 00502B10, L00_006D57A0, L00_0077FA58, L01_004C3660
20 more, 8 of them @divpad (16 main, 3 shared overlay, 1 control level) 0043AD58, 0045E2D8, 004645B0, 00465C98, 00466388, 004659C0, 00469620, 0046B918, 0046BA30, 0046BBF0, 0048B280, 0049A410, 004ABDF8, 004E3818, 00548190, 0054C6B8, L00_0060D1B8, L01_004CA068, L01_00405040, L15_004A24B0
21 more (10 shared overlay, 6 menu, 5 main) L00_00571068, L00_00598C18, L00_0059ACB0, L00_006ACB58, L00_00702B60, L01_00479E68, L01_004A9188, L01_004D4C58, L01_004DA820, L01_0052E988, L00_0070ECB0, L00_00734F80, L00_00741338, L00_0074C950, L00_0076A0C8, L00_0077F880, 00439CE8, 0044D690, 00463150, 004A5EE0, 00535E60
13 more (10 shared overlay, 1 menu, 2 main) L00_00612E20, L00_00614A00, L00_00618378, L01_0040B708, L01_0045B7F8, L01_0046F540, L01_004A9670, L01_004CB058, L01_0056F8A0, L11_00408E58, L00_00713B40, 00421E38, 0043D988
26 more (8 shared overlay, 17 level, 1 main) L01_0045BC88, L04_00499228, L02_004CDD50, L00_007572A0, L00_0077BE90, L00_0077C0E0, L00_0076A4A8, L00_0076AA78, L00_0076BA88, L01_00456868, L02_004C9D20, L00_00707320, L00_0076BC30, L00_00770FB0, L00_00776538, L00_007766E8, 004795A8, L02_004CB1D8, L00_0077FF78, L00_0075AAC8, L01_00531460, L00_0071C5B0, L00_0074F038, L05_004DF408, L00_00777490, L01_003E80B0
25 more (14 shared overlay, 10 level, 1 main) L01_004EB098, L02_004007F8, L01_003D7540, L01_004A8DF8, L01_00474C98, L00_0071E7A8, L01_004A92C8, L00_00612338, L15_004DDF70, 0044A8E0, L00_00725FF8, L00_0074A0C8, L00_007825E8, L01_003EC5A0, L01_00457CC0, L01_004A8FB0, L02_004C9038, L41_003BE160, L01_004340D0, L01_004A9B80, L00_005AC050, L01_0046B100, L01_004A9490, L05_003E5CA8, L00_00718A30
12 more 00469B80, 004EFEF8, L00_00713CB0, 0048B778, L00_00614E70, L01_00654C20, 004222C8, 0044AC70, L01_004DDCD8, L15_005053A0, 005482D8, L00_00758EB8
29 more L00_005B1A78, 004AE2D8, L00_006BA3F0, L00_00760000, L01_004ED760, L01_00531970, L15_00503B60, L01_004A8BB8, L01_004146B0, L00_00757CB0, L01_004DB208, L00_00720B48, L01_004A97E0, L01_004EE648, L01_005102E0, L04_004E84C0, L01_00531700, L01_00441040, L41_00445270, 0044AE78, L00_00780A00, L00_0074D4C0, L00_0077EF00, L01_0050C010, L01_00523220, L01_00588568, L05_003E26F8, 0050DF08, L00_0075BCB0
17 more (7 of them earlier near misses) 004532C0, L01_004B8520, L01_004EF6D8, L01_004E7850, L01_0062B6C0, 00458F10, L00_00726B70, L00_0072B3F8, 004E3548, L00_00721C50, L00_00743098, L41_006240A0, L01_0047E848, L01_004B3F88, L01_005086B0, L00_0073DEC8, L00_0073FCF0
18 more (3 of them earlier near misses) L01_00406688, L01_0049C140, L01_004D4F30, 004BE808, L00_00745008, L01_004B0310, 005430B0, L01_004EAD78, L05_0046A328, L15_004EDC50, L00_005D6558, L00_0072BF68, L01_00421C08, L02_004C1168, L00_00735618, L00_0077F218, L00_005ABA70, L15_004EE3C0
11 more L00_0073BE18, 004D3290, 004AA2E0, L01_00446DA0, L00_00754C90, L00_0074F918, 004E7F28, L00_00768C60, L05_00698D48, L15_006907E0, L00_00760CC0
12 more (L00_0068F6A8 added to the existing L00_00691168.c) 00528078, L01_004B7F00, L01_0043C578, L00_00727EB8, L01_00453578, L01_004A6770, L41_003DF1A8, L00_00594AC8, L00_00777640, L00_0071EE50, L00_005AB038, L00_0068F6A8
14 more (L00_007581D8 added to the existing L00_00757590.c) L00_0075ACB0, L01_0056FE58, L00_0074D7A8, L00_0075AC70, L00_00764088, L00_0072ACF0, L00_00736E50, L01_0050BA38, L08_003E7750, 004EF280, 004F5AF8, L01_00516F88, L00_00780598, L00_007581D8
10 more L00_005C66E8, 005412B0, L01_003D0660, L00_00734790, 004F7428, L41_003D7218, L00_0075BF90, L00_00738F38, 0051B270, L02_004CDFA0
6 more L41_004420F8, L01_004D1DF0, L00_00774210, L01_004A9D60, L00_0075DB30, L00_006B8A38
6 more (2 with -fmove-all-movables, 1 @divpad) L00_0072E3F8, L00_00758010, L00_0072AFB0, L00_00757748, L01_004DA240, L00_0058B868

"PAL-only" here means the function's fingerprint in config/pal/functions.tsv has no twin in config/us/functions.tsv, so these should not overlap with US work.

Checks

  • Every new file compiles with tools/cc.sh in the container and its function is match (100.00) in config/pal/map.tsv after tools/match_map.py --version pal --update-native ... --check.
  • tools/audit_pal_relocs.py on the 273 functions: 4067 relocations, 0 mismatches, 0 unresolved (this caught and fixed a swapped pair of byte globals in L01_003CC778 and a sign error in a %lo in 0046B918 and two swapped $gp globals in L00_0070ECB0, four more swapped neighbouring globals in the 17-function commit, and one more pair in the 18-function commit).
  • tools/progress.py --check passes for US and PAL. The US map records the new sources as other, so the US report does not change. PAL: 9849 → 10118 matched functions.
  • func_L00_00601990 (from the first commit) now takes the third argument func_L00_0074C950 passes (0x400, unused there); its code is unchanged.
  • func_00476D30 reads only $f12–$f15, so L00_00614A00 and L00_00618378 declare it with four floats; L00_00611390.c (an m2c-style file) still declares a leading void *. L00_00713B40 stores D_00220BE8 as a byte through $gp and defines it as a u8, while 0050D870.c defines it as a u32 (commented in the file).
  • Declarations that differ from other files (each file compiles on its own): L00_007572A0 passes func_L00_0071FD20's fifth argument as u32 (retail builds -1 with lui/ori), L00_0074AE60.c declares it s32; L00_0076BC30 reads D_00221890 as extern u16[] (lhu of element 0), another file declares an s32.
  • L00_00713CB0 defines D_00220BD8 as a one-element array (needed to keep a store above a pointer load); L00_00713B40 defines it as a scalar. 004F55C0.c declares func_00469B80 as void (s32, s32); it reads only $a0 and returns a value, as 00469B80.c defines it.
  • func_L00_00777490 now returns func_0015BA30's result (its callers L00_00780A00 and the near miss L00_007803D0 use it); same code.
  • Plain C: no volatile, asm, #define aliases or hardcoded addresses. One file uses /* cflags: -mno-split-addresses */ (L01_00473F98); 0045CEE0 uses __builtin_memcpy as L00_00519AB8.c does.
  • Full build: tools/build.sh on an x86 machine (about 7 minutes) compiles every file of the main SN 1.36 profile; the files of the isolated profiles (@ee296, @ee32-040921, @ee29-01) were not set up there. With this branch's tools and no file using @divpad, all 9358 objects have the same .text as with main's tools.

Notes

  1. Store and read order. Several functions only matched with stores written in retail's order (often ascending address), or with a global read placed before a store (L00_00776C80, sibling of L00_0077DAB8.c).
  2. Global array fields. When retail builds lui/addiu %lo then a separate addiu 4, plain D_x[i].f4 matches; a pointer local folds the +4 into %lo (L00_005CABB0).
  3. Argument types. Byte arguments compared with lbu fields are s32 (L00_00670E18); an s16 that is only sign-extended on the call path is an s32 parameter narrowed by the prototype (L00_005CABB0).
  4. Pointer field reads vs scalar stores. GCC 2.95 may schedule p->fAC above a store to a scalar global; *(T *)((u8 *)p + 0xAC) keeps retail's order (L06_004C9A80).
  5. extern T D_x[] read as D_x[0] where retail reaches a scalar with lui into another register (L00_00601990, L00_00757C28, 004F9690).
  6. Small fixed copies. lw %lo / lhu 4 move-by-pieces needs 8-byte alignment: both buffers s64 and __builtin_memcpy (0045CEE0).
  7. A division on its own line. With @divpad, source lines matter: L01_004C3660 matches with its division on its own line, where retail's two nops place a line label.
  8. Globals defined in several files. 00466388 and 00465C98 define D_0021F1EC like 00466458.c does: each needs the definition for its $gp access, as D_00220E7C is already defined in three files.

Held back / released

  • Inventory splits found in config/pal (the C of the real function matches, the catalogue entry does not): func_L00_0065E8D0 and func_L41_00623FA8 each lose their jr $ra delay slot to a 4-byte "function" (func_L00_0065EA08, func_L01_005DB758); func_L00_005174D8 starts mid-function (real start 0x005174C0, 0xC8 bytes); func_L00_00530910 is part of a function starting at 0x00530760; func_0045D370's entry includes 16 bytes of the previous function (real start 0x0045D380); func_L00_00620AB0 really starts at 0x00620AA8, on the two nops ps2eeas put before its leading div.s (L00_00614A00 calls it there as func_L00_00620AA8). Released.

  • func_L01_004A9A30 matches only by reading D_0021DE40 through a neighbouring struct symbol (to keep a reload GCC would merge), so I left it out. Released.

  • Exact but not in this PR: L01_00572A68 (its name resolves to the US file src/overlays/shared/L01_00572A68.c, which is PAL L01_00575660), L00_00773A50 (only matches if func_L00_00774290 takes two pass-through arguments, which conflicts with its (void) definition) and L00_007381A0 (string literals land at the wrong addresses). Still reserved in Function reservations and contributor coordination #112.

  • Several reserved "functions" turned out to be fragments of a neighbouring function (they start mid-body, use unsaved $s registers or contain inline data): L00_0052FF68, L00_00518950, L00_004F0CC0, L00_006D6238, L00_005320DC, L00_005318AC (body of L00_005318A0), L00_00516E18, L00_00571190, L00_005332B0, L00_004F82B4, L00_00518E1C, L00_004F0BE0. They probably need a re-split in config/pal. 00415788 has 12 bytes of code after its jr $ra in its catalogue size. Released.

🤖 Generated with Claude Code

JeremyL71 and others added 2 commits December 1, 2026 17:51
Retail's nops before div.s come from ps2eeas's divide-unit erratum padding,
measured on ps2eeas 1.9.25 with -Wdivbug-on: div.s, sqrt.s, rsqrt.s, vdiv,
vsqrt and vrsqrt 0 or 1 instruction after a label or after a B-type
branch's delay slot get 2 minus that distance nops. The labels are mostly
-g's line labels: retail was compiled with -g there and stripped, so a
div.s that starts a source line has two nops.

- ps2eeas_nops.py: rule 4 (--div), measured in the first-pass object, whose
  labels cc.sh now keeps with -Wa,-L; stabs lines no longer hide an mtc1
  hazard from rule 3.
- ps2eeas_stabs.py: drops -g's stabs directives and keeps its labels.
- cc.sh: the @divpad cflags token compiles with -g and runs rule 4.
  Opt-in: some retail objects have no such nops (func_L00_00590698).

-g leaves the code unchanged: a full build has the same .text in all 8687
compared objects. With these tools and no file using @divpad, the 9358
objects of a full build have the same .text as with the old tools.
With @divpad, func_00502B10, func_L00_006D57A0, func_L00_0077FA58 and
func_L01_004C3660 (division moved to its own line) match on PAL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ps2eeas measures the distance to the barrier after its own padding:
retail has `nop nop div.s div.s` 20 times and `nop nop div.s nop div.s`
never, and on ps2eeas a label followed by two div.s pads only the first.
Rule 4 now adds the nops it gave earlier ops between the barrier and the
current one to the distance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 3e7f2fb to 166fc40 Compare December 1, 2026 17:31
@JeremyL71 JeremyL71 changed the title Match 33 PAL-only functions (4 with @divpad, depends on #204) Match 53 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 166fc40 to 316b6e4 Compare December 1, 2026 17:54
@JeremyL71 JeremyL71 changed the title Match 53 PAL-only functions (12 with @divpad, depends on #204) Match 74 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 316b6e4 to 3c843da Compare December 1, 2026 19:03
@JeremyL71 JeremyL71 changed the title Match 74 PAL-only functions (12 with @divpad, depends on #204) Match 87 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71 JeremyL71 changed the title Match 87 PAL-only functions (12 with @divpad, depends on #204) Match 113 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 3c843da to 3178f2d Compare December 1, 2026 19:21
move_sites() dropped the pending mtc1/li.s register at any directive, so
`li.s; .p2align 3; $Lloop: <reader>` -- a form retail has -- counted one
site fewer in the source than in the object and the tool refused the file.
Alignment emits nothing there; when it does pad, the object has no adjacent
pair and the counts still disagree, so the tool keeps refusing rather than
guessing. A full build gives the same .text in all 9471 objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 3178f2d to 35c00e9 Compare December 1, 2026 19:46
@JeremyL71 JeremyL71 changed the title Match 113 PAL-only functions (12 with @divpad, depends on #204) Match 138 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 35c00e9 to ca50a58 Compare December 1, 2026 20:16
@JeremyL71 JeremyL71 changed the title Match 138 PAL-only functions (12 with @divpad, depends on #204) Match 150 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from ca50a58 to ab8b806 Compare December 1, 2026 20:45
@JeremyL71 JeremyL71 changed the title Match 150 PAL-only functions (12 with @divpad, depends on #204) Match 179 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from ab8b806 to f08e05c Compare December 1, 2026 21:12
@JeremyL71 JeremyL71 changed the title Match 179 PAL-only functions (12 with @divpad, depends on #204) Match 196 PAL-only functions (12 with @divpad, depends on #204) Dec 1, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from f08e05c to dea6265 Compare December 2, 2026 08:18
@JeremyL71 JeremyL71 changed the title Match 196 PAL-only functions (12 with @divpad, depends on #204) Match 214 PAL-only functions (12 with @divpad, depends on #204) Dec 2, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from dea6265 to 6e09fd9 Compare December 2, 2026 09:04
@JeremyL71 JeremyL71 changed the title Match 214 PAL-only functions (12 with @divpad, depends on #204) Match 225 PAL-only functions (12 with @divpad, depends on #204) Dec 2, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 6e09fd9 to 0f52359 Compare December 2, 2026 09:35
@JeremyL71 JeremyL71 changed the title Match 225 PAL-only functions (12 with @divpad, depends on #204) Match 237 PAL-only functions (12 with @divpad, depends on #204) Dec 2, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 0f52359 to 0e9c13b Compare December 2, 2026 19:37
@JeremyL71 JeremyL71 changed the title Match 237 PAL-only functions (12 with @divpad, depends on #204) Match 251 PAL-only functions (12 with @divpad, depends on #204) Dec 2, 2026
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 0e9c13b to 7745b49 Compare December 2, 2026 22:13
@JeremyL71 JeremyL71 changed the title Match 251 PAL-only functions (12 with @divpad, depends on #204) Match 261 PAL-only functions (12 with @divpad, depends on #204) Dec 2, 2026
JeremyL71 and others added 18 commits December 3, 2026 07:51
rabbitizer's R5900 table has no sqrt.s: it decodes a word such as
0x46000104 (sqrt.s $f4,$f0) as a bare `c1`. The object side of rule 4 then
saw one DIV op fewer than the source and refused the file ("object has 1 DIV
ops, source has 2"). Such a word is now decoded again with the plain MIPS
table. A test covers a sqrt.s after a label; it fails without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
func_L00_005CABB0, func_L00_00601990, func_L00_00670E18, func_L00_006EFD70,
func_L01_003CC778, func_L01_003D0960, func_L01_0043B970, func_L01_00441A08,
func_L01_00473F98, func_L01_00654E98, func_L01_00658558, func_L02_004C73C0,
func_L02_004CDEF8, func_L06_004C9A80

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
func_0054B140, func_L00_00713F30, func_L00_00757C28, func_L00_00776C80

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Menu: func_0045CEE0, func_00465650, func_004BFCC8, func_004CBF90,
func_004F9690, func_004FAB48, func_005120D8
Shared overlay: func_L00_00670D68, func_L01_00442518, func_L01_00572AD8,
func_L01_00653FD8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main: func_00502B10
Shared overlay: func_L00_006D57A0, func_L01_004C3660
Menu: func_L00_0077FA58

Each has the nops ps2eeas put before a div.s that starts a source line
(retail built with -g); the files opt in with /* cflags: @divpad */.
func_L01_004C3660 has its division on its own line, where retail's two
nops say its line label was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main: func_0043AD58, func_0045E2D8, func_004645B0, func_00465C98,
func_00466388, func_004659C0, func_00469620, func_0046B918, func_0046BA30,
func_0046BBF0, func_0048B280, func_0049A410, func_004ABDF8, func_004E3818,
func_00548190, func_0054C6B8
Shared overlay: func_L00_0060D1B8, func_L01_004CA068, func_L01_00405040
Control level: func_L15_004A24B0

@divpad (ps2eeas's nops before div.s): func_0043AD58, func_0046B918,
func_0046BA30, func_00548190, func_0054C6B8, func_L00_0060D1B8,
func_L01_004CA068, func_L01_00405040.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_00571068, func_L00_00598C18, func_L00_0059ACB0,
func_L00_006ACB58, func_L00_00702B60, func_L01_00479E68, func_L01_004A9188,
func_L01_004D4C58, func_L01_004DA820, func_L01_0052E988
Menu: func_L00_0070ECB0, func_L00_00734F80, func_L00_00741338,
func_L00_0074C950, func_L00_0076A0C8, func_L00_0077F880
Main: func_00439CE8, func_0044D690, func_00463150, func_004A5EE0,
func_00535E60

func_L00_0074C950 passes 0x400 as a third argument to func_L00_00601990,
whose definition now takes it (unused there; same code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_00612E20, func_L00_00614A00, func_L00_00618378,
func_L01_0040B708, func_L01_0045B7F8, func_L01_0046F540, func_L01_004A9670,
func_L01_004CB058, func_L01_0056F8A0, func_L11_00408E58
Menu: func_L00_00713B40
Main: func_00421E38, func_0043D988

func_L00_00614A00 calls func_L00_00620AA8: the catalogue's func_L00_00620AB0
really starts 8 bytes earlier, at the two nops ps2eeas put before its
leading div.s. func_L00_00713B40 stores D_00220BE8 as a byte through $gp;
0050D870.c defines it as a u32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_0045BC88, func_L04_00499228, func_L02_004CDD50,
func_L02_004C9D20, func_L00_00707320, func_L02_004CB1D8, func_L05_004DF408,
func_L01_003E80B0
Level: func_L00_007572A0, func_L00_0077BE90, func_L00_0077C0E0,
func_L00_0076A4A8, func_L00_0076AA78, func_L00_0076BA88, func_L01_00456868,
func_L00_0076BC30, func_L00_00770FB0, func_L00_00776538, func_L00_007766E8,
func_L00_0077FF78, func_L00_0075AAC8, func_L01_00531460, func_L00_0071C5B0,
func_L00_0074F038, func_L00_00777490
Main: func_004795A8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004EB098, func_L01_003D7540, func_L01_004A8DF8,
func_L01_00474C98, func_L01_004A92C8, func_L00_00612338, func_L01_003EC5A0,
func_L01_004A8FB0, func_L02_004C9038, func_L01_004340D0, func_L01_004A9B80,
func_L00_005AC050, func_L01_0046B100, func_L01_004A9490
Level: func_L02_004007F8, func_L00_0071E7A8, func_L15_004DDF70,
func_L00_00725FF8, func_L00_0074A0C8, func_L00_007825E8, func_L01_00457CC0,
func_L41_003BE160, func_L05_003E5CA8, func_L00_00718A30
Main: func_0044A8E0

func_L41_003BE160 declares func_00476678 with its int argument last, as
0051CCC0.c does (ints and floats take separate EE argument registers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_00614E70, func_L01_00654C20, func_L01_004DDCD8
Level: func_L00_00713CB0, func_L15_005053A0, func_L00_00758EB8
Main: func_00469B80, func_004EFEF8, func_0048B778, func_004222C8,
func_0044AC70, func_005482D8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L00_005B1A78, func_L00_006BA3F0, func_L01_004ED760,
func_L01_004A8BB8, func_L01_004146B0, func_L01_004DB208, func_L01_004A97E0,
func_L01_004EE648, func_L04_004E84C0, func_L01_00441040, func_L01_00523220,
func_L01_00588568
Level: func_L00_00760000, func_L01_00531970, func_L15_00503B60,
func_L00_00757CB0, func_L00_00720B48, func_L01_005102E0, func_L01_00531700,
func_L41_00445270, func_L00_00780A00, func_L00_0074D4C0, func_L00_0077EF00,
func_L01_0050C010, func_L05_003E26F8, func_L00_0075BCB0
Main: func_004AE2D8, func_0044AE78, func_0050DF08

func_L00_00777490 (from an earlier commit) now returns func_0015BA30's
result, which func_L00_00780A00 uses; its code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004B8520, func_L01_004EF6D8, func_L01_0062B6C0,
func_L01_0047E848, func_L01_004B3F88
Level: func_L01_004E7850, func_L00_00726B70, func_L00_0072B3F8,
func_L00_00721C50, func_L00_00743098, func_L41_006240A0, func_L01_005086B0,
func_L00_0073DEC8, func_L00_0073FCF0
Main: func_004532C0, func_00458F10, func_004E3548

Seven were near misses of earlier batches, closed with levers found since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_00406688, func_L01_0049C140, func_L01_004D4F30,
func_L01_004B0310, func_L01_004EAD78, func_L05_0046A328, func_L00_005D6558,
func_L01_00421C08, func_L00_005ABA70
Level: func_L00_00745008, func_L15_004EDC50, func_L00_0072BF68,
func_L02_004C1168, func_L00_00735618, func_L00_0077F218, func_L15_004EE3C0
Main: func_004BE808, func_005430B0

Three were near misses of earlier batches, closed with levers found since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_00446DA0
Level: func_L00_0073BE18, func_L00_00754C90, func_L00_0074F918,
func_L00_00768C60, func_L05_00698D48, func_L15_006907E0, func_L00_00760CC0
Main: func_004D3290, func_004AA2E0, func_004E7F28

func_L05_00698D48 and func_L15_006907E0 call func_L00_0065BA18 and
func_L00_0065BB60 with one argument, which those wrappers pass on to
func_004D0ED8; the shared definitions are written as void(void), as
L01_004ABE88.c already calls func_L00_0065BB60 with two arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared overlay: func_L01_004B7F00, func_L01_0043C578, func_L01_00453578,
func_L01_004A6770, func_L00_00594AC8, func_L00_005AB038, func_L00_0068F6A8
Level: func_L00_00727EB8, func_L41_003DF1A8, func_L00_00777640,
func_L00_0071EE50
Main: func_00528078

func_L00_0068F6A8 goes into L00_00691168.c. Both functions read D_002203B4
through $gp, which needs the variable defined in the same file. The new
function indexes the bytes of the u16 at +0x68 that func_L00_00691168
tests, so Obj.x68 becomes a union of both views; func_L00_00691168 still
matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Level: func_L00_0075ACB0, func_L00_0074D7A8, func_L00_0075AC70,
func_L00_00764088, func_L00_0072ACF0, func_L00_00736E50, func_L01_0050BA38,
func_L08_003E7750, func_L01_00516F88, func_L00_00780598, func_L00_007581D8
Shared overlay: func_L01_0056FE58
Main: func_004EF280, func_004F5AF8

func_L00_007581D8 goes into L00_00757590.c: both use D_00221478, which is
defined there and reached through $gp, so it must be defined in the file of
each user. func_L00_00757590 still matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Level: func_L00_00734790, func_L41_003D7218, func_L00_0075BF90,
func_L00_00738F38
Shared overlay: func_L00_005C66E8, func_L01_003D0660, func_L02_004CDFA0
Main: func_005412B0, func_004F7428, func_0051B270

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 7745b49 to 01c8dc7 Compare December 3, 2026 06:52
Level: func_L41_004420F8, func_L00_00774210, func_L00_0075DB30
Shared overlay: func_L01_004D1DF0, func_L01_004A9D60, func_L00_006B8A38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 01c8dc7 to 4ecde9d Compare December 3, 2026 07:23
@JeremyL71 JeremyL71 changed the title Match 261 PAL-only functions (12 with @divpad, depends on #204) Match 267 PAL-only functions (12 with @divpad, depends on #204) Dec 3, 2026
JeremyL71 and others added 2 commits December 3, 2026 08:47
Level: func_L00_0072E3F8, func_L00_00758010, func_L00_0072AFB0,
func_L00_00757748
Shared overlay: func_L01_004DA240, func_L00_0058B868

func_L00_0072E3F8 and func_L00_0072AFB0 use -fmove-all-movables: without it
loop.c hoists one invariant only in its second pass, after the
strength-reduction inits, and the loop preheader comes out in a different
order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremyL71
JeremyL71 force-pushed the pal/jeremyl71-batch1 branch from 4ecde9d to 0ad38eb Compare December 3, 2026 07:47
@JeremyL71 JeremyL71 changed the title Match 267 PAL-only functions (12 with @divpad, depends on #204) Match 273 PAL-only functions (28 with @divpad, depends on #204) Dec 3, 2026
@bytematchdev

bytematchdev Bot commented Dec 4, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_974.65

Code matched 18.78% (−2.80%) · 1.09 MB of 5.78 MB
Fuzzy match 19.78% (−3.03%)
Functions 9,511 (−556) / 18,172
Units complete 5,278 (−264) / 5,337
⚠️ No longer matching (556)
  • func_L00_005276B0 100.00% → 0.00%
  • func_0015E848 100.00% → 0.00%
  • func_01EDD5C8 100.00% → 0.00%
  • func_L00_00744530 100.00% → 0.00%
  • func_00540B40 100.00% → 0.00%
  • func_004CAA50 100.00% → 0.00%
  • func_01EE10F0 100.00% → 0.00%
  • func_0051A998 100.00% → 0.00%
  • func_0048D330 100.00% → 0.00%
  • func_01ECCEC8 100.00% → 0.00%
  • func_L41_0040E680 100.00% → 0.00%
  • func_01ED9CA0 100.00% → 0.00%
  • func_0046AC80 100.00% → 0.00%
  • func_L01_004E3F60 100.00% → 0.00%
  • func_L00_005D41D8 100.00% → 0.00%
  • func_L00_0075BD20 100.00% → 0.00%
  • func_01EA13B8 100.00% → 0.00%
  • func_01EC1670 100.00% → 0.00%
  • func_L00_00729DD8 100.00% → 0.00%
  • func_01EFB8A8 100.00% → 0.00%
  • func_004D6F40 100.00% → 0.00%
  • func_01EE2CE0 100.00% → 0.00%
  • func_L00_00778CF8 100.00% → 0.00%
  • func_L00_00720060 100.00% → 0.00%
  • func_L00_0051C498 100.00% → 97.73%
  • func_L00_00749FB8 100.00% → 0.00%
  • func_L00_00756DB8 100.00% → 0.00%
  • func_01EF989C 100.00% → 0.00%
  • func_0012BF10 100.00% → 0.00%
  • func_01EE0980 100.00% → 0.00%
  • …and 526 more
📈 Improved (13)
  • func_L00_005472D0 0.00% → 97.12%
  • func_L00_00535680 0.00% → 97.20%
  • func_L00_00538DE0 0.00% → 92.12%
  • func_01F06188 0.00% → 98.96%
  • func_01EABCE0 0.00% → 97.87%
  • func_01F0B7E4 0.00% → 96.11%
  • func_01F0B3D0 0.00% → 75.60%
  • func_01EEF358 0.00% → 87.50%
  • func_01EF7140 0.00% → 90.00%
  • func_01EF33D4 0.00% → 96.79%
  • func_L01_006B3FE8 0.00% → 82.86%
  • func_01F051D8 0.00% → 89.39%
  • func_01EE992C 0.00% → 98.28%
📉 Worse (99)
  • func_01EC3028 93.69% → 0.00%
  • func_01EFEBA8 32.77% → 0.00%
  • func_00476F88 79.90% → 0.00%
  • func_001623A8 43.38% → 0.00%
  • func_01EFA604 29.75% → 0.00%
  • func_01E9C4A0 91.84% → 0.00%
  • func_001521D0 93.28% → 0.00%
  • func_01EA37F0 41.40% → 0.00%
  • func_01EBC2E8 97.53% → 0.00%
  • func_01EB87A0 97.75% → 0.00%
  • func_01F0682C 35.92% → 0.00%
  • func_01EC90E0 77.91% → 0.00%
  • func_01EA4F68 62.35% → 0.00%
  • func_L00_00709AC8 54.46% → 0.00%
  • func_01EB5C40 47.29% → 0.00%
  • func_004D5678 97.81% → 0.00%
  • func_00153AF0 70.00% → 0.00%
  • func_00155FE0 68.35% → 0.00%
  • func_01ED9820 98.10% → 0.00%
  • func_01EBA498 80.77% → 0.00%
  • func_L00_0072EC88 96.10% → 0.00%
  • func_01EE74F0 99.34% → 0.00%
  • func_01ECE8F8 96.67% → 0.00%
  • func_01ECC1C0 99.66% → 0.00%
  • func_0013C2E8 95.89% → 0.00%
  • func_01EE5BD0 79.51% → 0.00%
  • func_01ED1C78 95.77% → 0.00%
  • func_L00_00528948 30.00% → 0.00%
  • func_01EA6EC0 95.59% → 0.00%
  • func_01EB5EA0 99.63% → 0.00%
  • …and 69 more

SCES_532.85

Code matched 22.43% (−0.02%) · 1.30 MB of 5.81 MB
Fuzzy match 23.35% (−0.25%)
Functions 10,118 (−193) / 18,136
Units complete 5,354 (−201) / 5,412
✅ Newly matched (261)
  • func_L00_0072E3F8 (2,052 bytes)
  • func_L00_006B8A38 (1,652 bytes)
  • func_L00_0075DB30 (1,544 bytes)
  • func_L01_004DA240 (1,500 bytes)
  • func_L01_004A9D60 (1,492 bytes)
  • func_L02_004CDFA0 (1,424 bytes)
  • func_0051B270 (1,348 bytes)
  • func_L00_0075BF90 (1,336 bytes)
  • func_L00_00738F38 (1,332 bytes)
  • func_L01_0050BA38 (1,204 bytes)
  • func_L00_00736E50 (1,148 bytes)
  • func_L00_00780598 (1,124 bytes)
  • func_L00_007581D8 (1,104 bytes)
  • func_L41_003D7218 (1,104 bytes)
  • func_L00_0072AFB0 (1,092 bytes)
  • func_L08_003E7750 (1,040 bytes)
  • func_L01_00516F88 (1,016 bytes)
  • func_L00_005AB038 (1,008 bytes)
  • func_L00_0071EE50 (992 bytes)
  • func_L00_00777640 (960 bytes)
  • func_L00_00594AC8 (952 bytes)
  • func_L41_003DF1A8 (944 bytes)
  • func_L01_004A6770 (940 bytes)
  • func_L01_00453578 (932 bytes)
  • func_L00_00727EB8 (924 bytes)
  • func_L01_0043C578 (920 bytes)
  • func_L00_0068F6A8 (916 bytes)
  • func_L01_004B7F00 (912 bytes)
  • func_L05_00698D48 (896 bytes)
  • func_L15_006907E0 (896 bytes)
  • …and 231 more
⚠️ No longer matching (454)
  • func_L00_00527BB0 100.00% → 0.00%
  • func_0015E858 100.00% → 0.00%
  • func_01EDD5C8 100.00% → 0.00%
  • func_L00_00749018 100.00% → 0.00%
  • func_01EE10F0 100.00% → 0.00%
  • func_0048DDE8 100.00% → 0.00%
  • func_01ECCEC8 100.00% → 0.00%
  • func_L41_0040F1A0 100.00% → 0.00%
  • func_01ED9CA0 100.00% → 0.00%
  • func_0046B540 100.00% → 0.00%
  • func_L01_004E5F00 100.00% → 0.00%
  • func_01EA13B8 100.00% → 0.00%
  • func_01EC1670 100.00% → 0.00%
  • func_01EFB8A8 100.00% → 0.00%
  • func_004D7E58 100.00% → 0.00%
  • func_01EE2CE0 100.00% → 0.00%
  • func_L00_0077E0D0 100.00% → 0.00%
  • func_L00_00724020 100.00% → 0.00%
  • func_L00_0051C998 100.00% → 97.73%
  • func_L00_0074EBE8 100.00% → 0.00%
  • func_01EF989C 100.00% → 0.00%
  • func_0012BF10 100.00% → 0.00%
  • func_01EE0980 100.00% → 0.00%
  • func_01EE0E50 100.00% → 0.00%
  • func_L00_00716D28 100.00% → 0.00%
  • func_01E9AE48 100.00% → 0.00%
  • func_L00_00537360 100.00% → 0.00%
  • func_004C3578 100.00% → 0.00%
  • func_01EBD068 100.00% → 0.00%
  • func_004AE2D8 100.00% → 0.00%
  • …and 424 more
📈 Improved (13)
  • func_L00_005477D0 0.00% → 97.12%
  • func_L00_00535B80 0.00% → 97.20%
  • func_L00_005392E0 0.00% → 92.12%
  • func_01F06188 0.00% → 98.96%
  • func_01EABCE0 0.00% → 97.87%
  • func_01F0B7E4 0.00% → 96.11%
  • func_01F0B3D0 0.00% → 75.60%
  • func_01EEF358 0.00% → 87.50%
  • func_01EF7140 0.00% → 90.00%
  • func_01EF33D4 0.00% → 96.79%
  • func_L01_006B95B0 0.00% → 82.86%
  • func_01F051D8 0.00% → 89.39%
  • func_01EE992C 0.00% → 98.28%
📉 Worse (97)
  • func_01EC3028 93.69% → 0.00%
  • func_01EFEBA8 32.77% → 0.00%
  • func_001623B0 43.38% → 0.00%
  • func_01EFA604 29.75% → 0.00%
  • func_01E9C4A0 91.84% → 0.00%
  • func_001521D0 93.28% → 0.00%
  • func_01EA37F0 41.40% → 0.00%
  • func_01EBC2E8 97.53% → 0.00%
  • func_01EB87A0 97.75% → 0.00%
  • func_01F0682C 35.92% → 0.00%
  • func_01EC90E0 77.91% → 0.00%
  • func_01EA4F68 62.35% → 0.00%
  • func_L00_0070D8B0 54.46% → 0.00%
  • func_01EB5C40 47.29% → 0.00%
  • func_004D6590 97.81% → 0.00%
  • func_00153AF0 70.00% → 0.00%
  • func_00155FE0 68.35% → 0.00%
  • func_01ED9820 98.10% → 0.00%
  • func_01EBA498 80.77% → 0.00%
  • func_L00_00733200 96.10% → 0.00%
  • func_01EE74F0 99.34% → 0.00%
  • func_01ECE8F8 96.67% → 0.00%
  • func_01ECC1C0 99.66% → 0.00%
  • func_0013C2E8 95.89% → 0.00%
  • func_01EE5BD0 79.51% → 0.00%
  • func_01ED1C78 95.77% → 0.00%
  • func_L00_00528E48 30.00% → 0.00%
  • func_01EA6EC0 95.59% → 0.00%
  • func_01EB5EA0 99.63% → 0.00%
  • func_01F0BCC8 97.69% → 0.00%
  • …and 67 more

Commit 0ad38eb · Ratchet: Deadlocked on ByteMatch

@llesieur99
llesieur99 merged commit 9af6fdc into OpenRAC:main Dec 4, 2026
1 check passed
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