Skip to content

Match 69 US near misses and drafts (50 net, 4 game, 3 core, 12 overlay) - #135

Merged
Veradictus merged 1 commit into
OpenRAC:mainfrom
farfeduc:decomp/night-near-misses
Nov 9, 2026
Merged

Veradictus merged 1 commit into
OpenRAC:mainfrom
farfeduc:decomp/night-near-misses

Conversation

@farfeduc

@farfeduc farfeduc commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Matches 69 US functions (50 in net.text, 4 in game, 3 in core, 12 in level overlays): near misses from my earlier batches and drafts that are now exact, plus a few from a fresh batch.

How they were matched

Most were a few instructions off. What closed them:

  • Comparison operand order: retail loads the right-hand field first in a->x < a->y; written a->y > a->x it matches. This closed a family of net.text assert getters at once (func_01F056C8, func_01F0574C, func_01F060F4, func_01F06248, func_01F0B0EC, func_01F0B150, func_01F0B478, func_01F0B6D8, func_01F0B778, ...).
  • -fno-optimize-sibling-calls where retail calls with jal and returns instead of tail-calling (several net.text functions, under @ee296).
  • Field and argument types: u8/s8/s16/u16/f32 fields where retail uses lbu/lb/lh/lhu/lwc1; callees with the argument count retail sets up (an assert taking two arguments, a fifth argument in $t0, memset(arg0, 0, n) where m2c dropped arg0).
  • Pointer steps and indexing m2c scaled by the element size (s32 *p; p -= 4 that is 4 bytes, arr[i] for i * 4 + &arr).
  • Store order, solved by inverting the scheduler's permutation (compile, see where each store lands, write the stores in the order that lands them where retail has them).
  • Profiles: the file's own cflags line, picked among the ones docs/TOOLCHAIN.md documents (@ee296, @ee29, @ee32-040921, -G0, -mno-split-addresses, -fno-optimize-sibling-calls).
  • a few rewrites of control flow (early returns, a single result variable, goto loops where a for adds an alignment nop).

No #define aliases, volatile, inline asm or hard-coded addresses: m2c's #define D_x (D_x_[0]) aliases are replaced with extern T D_x[] indexed [0].

func_01EEE33C had a draft in nonmatching/; the draft and its README row are removed.

Functions

func_00140D20, func_00140F18, func_00157728, func_00490954, func_00498950, func_004E2554, func_004F6288, func_01EA57F8, func_01EA70B0, func_01EA96A8, func_01EC34B8, func_01EC3DE0, func_01ED5D30, func_01EDA870, func_01EDC318, func_01EDD4D0, func_01EE00A0, func_01EE94B4, func_01EED5B8, func_01EEE19C, func_01EEE1FC, func_01EEE27C, func_01EEE2DC, func_01EEE33C, func_01EEE39C, func_01EEE3FC, func_01EEE45C, func_01EEED4C, func_01EEEDD0, func_01EF0C54, func_01EF6E5C, func_01EFC4E8, func_01EFDC88, func_01EFE4DC, func_01F00074, func_01F002FC, func_01F03864, func_01F03B10, func_01F056C8, func_01F0574C, func_01F060F4, func_01F06248, func_01F06308, func_01F07170, func_01F07DC8, func_01F07E8C, func_01F07F50, func_01F09ADC, func_01F09D00, func_01F0A2A0, func_01F0B0EC, func_01F0B150, func_01F0B478, func_01F0B6D8, func_01F0B778, func_01F0C4EC, func_01F0C7D4, func_L00_005134B0, func_L00_00520A68, func_L00_00538038, func_L00_00538220, func_L00_00548040, func_L00_00566BF0, func_L00_00710F30, func_L00_00719F68, func_L00_00764CF0, func_L00_0076DED0, func_L01_0047ECC8, func_L01_004B7770

Verification

On main at 4a7372f:

  • full tools/build.sh, build_libgcc.sh, build_libm.sh;
  • tools/audit_matches.py and tools/audit_relocs.py: no line names any of these functions;
  • config/{us,pal}/map.tsv changed only on these rows (match_map --write with and without the new files, applied as a delta), then match_map --check;
  • progress.py --check for US and PAL: US 7,163 → 7,231 and PAL 7,644 → 7,709 (counts are per distinct function).

Independent of #128, #130 and #132 (no file in common).

Reserved in #112.

🤖 Generated with Claude Code

Near misses from earlier batches and nonmatching/ drafts, closed with
comparison operand order, -fno-optimize-sibling-calls, field and
argument types, pointer steps, store order and profiles. Superseded
nonmatching/ drafts and their README rows are removed. The map rows
change only for these functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bytematchdev

bytematchdev Bot commented Nov 9, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_974.65

Code matched 10.32% (+0.11%) · 596.37 KB of 5.78 MB
Fuzzy match 10.78% (+0.11%)
Functions 7,231 (+68) / 18,170
Units complete 3,954 (+56) / 4,013
✅ Newly matched (68)
  • func_01EE00A0 (240 bytes)
  • func_01F09D00 (240 bytes)
  • func_01EDC318 (196 bytes)
  • func_01F03864 (192 bytes)
  • func_01F06248 (192 bytes)
  • func_01F0574C (188 bytes)
  • func_01F0B6D8 (160 bytes)
  • func_01F060F4 (148 bytes)
  • func_01EF6E5C (140 bytes)
  • func_01F06308 (140 bytes)
  • func_01F056C8 (132 bytes)
  • func_01EEE1FC (128 bytes)
  • func_01F0B150 (128 bytes)
  • func_01F09ADC (116 bytes)
  • func_01F0B478 (116 bytes)
  • func_00498950 (112 bytes)
  • func_01EA96A8 (112 bytes)
  • func_01F002FC (112 bytes)
  • func_L00_00719F68 (112 bytes)
  • func_01F0B778 (108 bytes)
  • func_01EFC4E8 (104 bytes)
  • func_01F0B0EC (100 bytes)
  • func_01EEE19C (96 bytes)
  • func_01EEE27C (96 bytes)
  • func_01EEE2DC (96 bytes)
  • func_01EEE33C (96 bytes)
  • func_01EEE39C (96 bytes)
  • func_01EEE3FC (96 bytes)
  • func_01EEE45C (96 bytes)
  • func_01F07DC8 (96 bytes)
  • …and 38 more
📉 Worse (1)
  • func_01EEE33C 81.25% → 0.00%

SCES_532.85

Code matched 12.67% (+0.11%) · 736.38 KB of 5.81 MB
Fuzzy match 13.09% (+0.11%)
Functions 7,709 (+65) / 18,134
Units complete 4,226 (+54) / 4,284
✅ Newly matched (66)
  • func_01EE00A0 (240 bytes)
  • func_01F09D00 (240 bytes)
  • func_01EDC318 (196 bytes)
  • func_01F03864 (192 bytes)
  • func_01F06248 (192 bytes)
  • func_01F0574C (188 bytes)
  • func_01F0B6D8 (160 bytes)
  • func_01F060F4 (148 bytes)
  • func_01EF6E5C (140 bytes)
  • func_01F06308 (140 bytes)
  • func_01F056C8 (132 bytes)
  • func_01EEE1FC (128 bytes)
  • func_01F0B150 (128 bytes)
  • func_01F09ADC (116 bytes)
  • func_01F0B478 (116 bytes)
  • func_00499688 (112 bytes)
  • func_01EA96A8 (112 bytes)
  • func_01F002FC (112 bytes)
  • func_L00_0071DDD0 (112 bytes)
  • func_01F0B778 (108 bytes)
  • func_01EFC4E8 (104 bytes)
  • func_01F0B0EC (100 bytes)
  • func_01EEE19C (96 bytes)
  • func_01EEE27C (96 bytes)
  • func_01EEE2DC (96 bytes)
  • func_01EEE33C (96 bytes)
  • func_01EEE39C (96 bytes)
  • func_01EEE3FC (96 bytes)
  • func_01EEE45C (96 bytes)
  • func_01F07DC8 (96 bytes)
  • …and 36 more
⚠️ No longer matching (1)
  • func_004E34B4 100.00% → 0.00%
📉 Worse (1)
  • func_01EEE33C 81.25% → 0.00%

Commit f5a51eb · Ratchet: Deadlocked on ByteMatch

@Veradictus
Veradictus merged commit f17e771 into OpenRAC:main Nov 9, 2026
1 check passed
Veradictus added a commit that referenced this pull request Nov 9, 2026
; generated files regenerated after the merges)
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