Skip to content

Batch 15: promote cmd_sem_init and seven overlay functions - #175

Merged
mateuszklysz merged 251 commits into
lombyte-project:mainfrom
pezzadev:decompilerizer-batch-15
Oct 14, 2026
Merged

mateuszklysz merged 251 commits into
lombyte-project:mainfrom
pezzadev:decompilerizer-batch-15

Conversation

@pezzadev

@pezzadev pezzadev commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Before

The batch begins at upstream main 59fa04961077fffa23445e9ca9ba83bbe0d342b0. The eight units below were assembly-backed, and several overlay functions had only retail stubs or unfinished C bodies.

After

Promote eight exact C units, totalling 8,468 bytes of unique function code:

Unit Retail size
sdk/library/cmd_sem_init 148 B
FUN_L06_002fbfb0 1,664 B
FUN_L08_002dc9a8 1,568 B
FUN_L10_002e8ab0 1,400 B
FUN_L18_002f9eb8 920 B
FUN_L01_002b91c8 1,272 B
FUN_L00_002cbcc0 680 B
FUN_L00_00262030 816 B

Move cmd_sem_init to its SDK owner and update the linker configuration. The overlay promotions retain their existing catalogue ownership.

Add guarded C bodies for 17 overlay functions covering entity state machines, path following, collision handling and effects. Refine existing pending resident and overlay bodies, including SIF command initialization, music transitions, text rendering and graphics setup. These bodies retain their retail oracles and remain pending; successful full-image validation does not establish that their C matches.

Reuse the shared CollisionHit, SwarmPath and VoicePoolWindow layouts. Preserve the established air_accel and register_part_types names with canonical assembly labels, and retain FUN_001f7978 as the canonical draw-frame callee.

Verification

  • Fresh C-body checks report all eight promotions exact/promotable.
  • Before/after C-body measurements for all six review cleanup units preserve the verdict and recorded differences; the collision function remains exact. Five other cleanup units remain pending.
  • make elf ends with PASS: reconstructed boot ELF matches retail; the reconstructed executable also matches the pinned retail SHA-256.
  • make overlays ends with PASS.
  • make check passes.

@decomp-dev

decomp-dev Bot commented Oct 13, 2026

Copy link
Copy Markdown

Report for SCUS_971.99 (59fa049 - 453f2a1)

📈 Matched code: 87.14% (+0.24%, +8468 bytes)
📈 Linked code: 87.14% (+0.24%, +8468 bytes)

✅ 8 new matches
Unit Item Bytes Before After
level_06/gameplay/entities/002b4770 FUN_L06_002fbfb0 +1664 0.00% 100.00%
level_08/gameplay/entities/002b8228 FUN_L08_002dc9a8 +1568 0.00% 100.00%
level_10/gameplay/vendor/002df270 FUN_L10_002e8ab0 +1400 0.00% 100.00%
shared/gameplay/entities/002b8c08 FUN_L01_002b91c8 +1272 0.00% 100.00%
level_18/gameplay/vendor/002f88e8 FUN_L18_002f9eb8 +920 0.00% 100.00%
shared/gameplay/state/00261968 FUN_L00_00262030 +816 0.00% 100.00%
shared/gameplay/entities/002c8440 FUN_L00_002cbcc0 +680 0.00% 100.00%
sdk/library cmd_sem_init +1 99.99% 100.00%

@github-actions

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 87.14 % +0.24 pp 3,090,160 / 3,546,268 B (+8,468 B) 3,950 / 4,233 (+8) 88.47 %
Boot executable 84.77 % +0.04 pp 299,116 / 352,840 B (+148 B) 1,160 / 1,219 (+1) 98.11 %
Game 84.26 % — 229,892 / 272,844 B (—) 865 / 905 (—) 98.40 %
SDK 86.53 % +0.19 pp 69,224 / 79,996 B (+148 B) 295 / 314 (+1) 97.12 %
Level overlays 87.40 % +0.26 pp 2,791,044 / 3,193,428 B (+8,320 B) 2,790 / 3,014 (+7) 87.40 %
Shared level code 79.17 % +0.24 pp 895,028 / 1,130,492 B (+2,768 B) 1,433 / 1,583 (+3) 79.17 %
Per-level code 91.91 % +0.27 pp 1,896,016 / 2,062,936 B (+5,552 B) 1,357 / 1,431 (+4) 91.91 %
8 newly matched functions (8,468 B)
Function Address Size Unit
FUN_L06_002fbfb0 0x002fbfb0 1,664 B level_06/gameplay/entities/002b4770
FUN_L08_002dc9a8 0x002dc9a8 1,568 B level_08/gameplay/entities/002b8228
FUN_L10_002e8ab0 0x002e8ab0 1,400 B level_10/gameplay/vendor/002df270
FUN_L01_002b91c8 0x002b91c8 1,272 B shared/gameplay/entities/002b8c08
FUN_L18_002f9eb8 0x002f9eb8 920 B level_18/gameplay/vendor/002f88e8
FUN_L00_00262030 0x00262030 816 B shared/gameplay/state/00261968
FUN_L00_002cbcc0 0x002cbcc0 680 B shared/gameplay/entities/002c8440
cmd_sem_init 0x000217a8 148 B sdk/library

Compared with main (59fa049). C_FUZZY uses main's last measurement.

@pezzadev pezzadev changed the title decompilerizer batch 15 Batch 15: promote cmd_sem_init and seven overlay functions Oct 13, 2026
@pezzadev
pezzadev marked this pull request as ready for review October 14, 2026 00:01
@mateuszklysz
mateuszklysz merged commit 297ffaf into lombyte-project:main Oct 14, 2026
3 checks 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