Skip to content

overlay: exact wave 8, fourteen functions - #176

Merged
mateuszklysz merged 17 commits into
mainfrom
decomp/exact-wave-8
Oct 14, 2026
Merged

mateuszklysz merged 17 commits into
mainfrom
decomp/exact-wave-8

Conversation

@mateuszklysz

@mateuszklysz mateuszklysz commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Before

Fourteen overlay functions were plain asm or NON_MATCHING drafts, several with offset casts, gotos or volatile.

After

They are C_EXACT, written as clean C with typed pvars structs and names by use:

  • FUN_L15_0029a570, FUN_L15_002aa280
  • FUN_L08_002f44c0
  • FUN_L11_003094f8
  • FUN_L07_00317910, FUN_L07_00319040
  • FUN_L06_00303160
  • FUN_L00_002d5de8
  • FUN_L05_002d7920
  • FUN_L04_002923b8
  • FUN_L12_00303370, FUN_L12_00304e00
  • FUN_L14_002dfd10, FUN_L14_002de670

The branch is merged with the latest main (#175). Where #175 edited the old drafts of these functions, the exact C replaces them, because it uses typed structs where the drafts used raw offsets. The descriptive local names from those drafts were carried over (for example first_path, third_index and third_fraction in FUN_L06_00303160). The other draft changes from #175 are kept.

Verification

  • make elf ends with PASS: reconstructed boot ELF matches retail
  • make overlays ends with PASS (2809 overlay functions)
  • make check passes

@mateuszklysz mateuszklysz added the enhancement New feature or request label Oct 14, 2026 — with Claude
@github-actions

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 87.70 % +0.56 pp 3,110,044 / 3,546,268 B (+19,884 B) 3,964 / 4,233 (+14) 89.03 %
Boot executable 84.77 % — 299,116 / 352,840 B (—) 1,160 / 1,219 (—) 98.11 %
Game 84.26 % — 229,892 / 272,844 B (—) 865 / 905 (—) 98.40 %
SDK 86.53 % — 69,224 / 79,996 B (—) 295 / 314 (—) 97.12 %
Level overlays 88.02 % +0.62 pp 2,810,928 / 3,193,428 B (+19,884 B) 2,804 / 3,014 (+14) 88.02 %
Shared level code 79.95 % +0.78 pp 903,868 / 1,130,492 B (+8,840 B) 1,438 / 1,583 (+5) 79.95 %
Per-level code 92.44 % +0.54 pp 1,907,060 / 2,062,936 B (+11,044 B) 1,366 / 1,431 (+9) 92.44 %
14 newly matched functions (19,884 B)
Function Address Size Unit
FUN_L00_002d5de8 0x002d5de8 3,588 B shared/gameplay/entities/002cfcb8
FUN_L15_002aa280 0x002aa280 1,736 B level_15/gameplay/entities/0029aff0
FUN_L12_00304e00 0x00304e00 1,708 B level_12/gameplay/vendor/003028c8
FUN_L07_00319040 0x00319040 1,624 B level_07/gameplay/entities/00312948
FUN_L15_0029a570 0x0029a570 1,588 B shared/gameplay/entities/00278fd8
FUN_L06_00303160 0x00303160 1,512 B level_06/gameplay/entities/002fd1a0
FUN_L11_003094f8 0x003094f8 1,480 B shared/gameplay/entities/002c8830
FUN_L08_002f44c0 0x002f44c0 1,420 B level_08/gameplay/entities/002e9b70
FUN_L14_002dfd10 0x002dfd10 1,120 B shared/gameplay/entities/002b17d8
FUN_L14_002de670 0x002de670 1,064 B shared/gameplay/entities/002b17d8
FUN_L05_002d7920 0x002d7920 960 B level_05/gameplay/entities/002d1688
FUN_L07_00317910 0x00317910 904 B level_07/gameplay/entities/00312948
FUN_L04_002923b8 0x002923b8 716 B level_04/runtime/dma/002922d0
FUN_L12_00303370 0x00303370 464 B level_12/gameplay/vendor/003028c8

Compared with main (297ffaf). C_FUZZY uses main's last measurement.

@decomp-dev

decomp-dev Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Report for SCUS_971.99 (297ffaf - 47c4d5b)

📈 Matched code: 87.70% (+0.56%, +19884 bytes)
📈 Linked code: 87.70% (+0.56%, +19884 bytes)

✅ 14 new matches
Unit Item Bytes Before After
shared/gameplay/entities/002cfcb8 FUN_L00_002d5de8 +3588 0.00% 100.00%
level_15/gameplay/entities/0029aff0 FUN_L15_002aa280 +1736 0.00% 100.00%
level_12/gameplay/vendor/003028c8 FUN_L12_00304e00 +1708 0.00% 100.00%
level_07/gameplay/entities/00312948 FUN_L07_00319040 +1624 0.00% 100.00%
shared/gameplay/entities/00278fd8 FUN_L15_0029a570 +1588 0.00% 100.00%
level_06/gameplay/entities/002fd1a0 FUN_L06_00303160 +1512 0.00% 100.00%
shared/gameplay/entities/002c8830 FUN_L11_003094f8 +1480 0.00% 100.00%
level_08/gameplay/entities/002e9b70 FUN_L08_002f44c0 +1420 0.00% 100.00%
shared/gameplay/entities/002b17d8 FUN_L14_002dfd10 +1120 0.00% 100.00%
shared/gameplay/entities/002b17d8 FUN_L14_002de670 +1064 0.00% 100.00%
level_05/gameplay/entities/002d1688 FUN_L05_002d7920 +960 0.00% 100.00%
level_07/gameplay/entities/00312948 FUN_L07_00317910 +904 0.00% 100.00%
level_04/runtime/dma/002922d0 FUN_L04_002923b8 +716 0.00% 100.00%
level_12/gameplay/vendor/003028c8 FUN_L12_00303370 +464 0.00% 100.00%

@mateuszklysz
mateuszklysz merged commit 34fd269 into main Oct 14, 2026
3 checks passed
@mateuszklysz
mateuszklysz deleted the decomp/exact-wave-8 branch October 14, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant