Skip to content

Convert dScMgTrampoline2_c's last four bodies to real members - #2115

Merged
andrewboudreau merged 1 commit into
mainfrom
cpp/minigame-methods-2
Sep 1, 2026
Merged

Convert dScMgTrampoline2_c's last four bodies to real members#2115
andrewboudreau merged 1 commit into
mainfrom
cpp/minigame-methods-2

Conversation

@andrewboudreau

Copy link
Copy Markdown
Collaborator

Tail of the 79-body batch in #2114. These four were not refused by the converter — they simply were not in the applied set, which left dScMgTrampoline2_c split across two spellings while its sibling dScMgTrampoline_c was fully converted.

body slot change
OnYoshiTryEat(int) 18 already .cpp; definition rewritten
OnKicked() 24 .c.cpp
OnPushed() 23 .c.cpp
Virtual88(int,int,int,int) 34 .c.cpp

OnYoshiTryEat's body took no argument beyond this. The class declares void OnYoshiTryEat(int) — measured from the ROM's vtables during the slots-18-35 campaign — so the header wins and the unread parameter is now spelled. It costs no instruction, which is why the body could disagree indefinitely without anything noticing.

Three delinks.txt keys repointed. decl_common.h is already #ifdef __cplusplus-guarded, so only the file-local declarations needed extern "C" wrapping: data_020a0dbc, data_0209d45c, data_ov006_02142f78, and Virtual88's five function declarations.

Verified: rombuild.py -j 16 --no-rom → 11,088/11,088 reproducing, 0 mismatching, 106/106 exact, 100.000000%. Nine static gates green. Re-run after line-ending normalization, not before.

Stacked on #2114. attribution-override per the standing instruction.

The 79-body batch left these four behind. Nothing was wrong with them --
they simply were not in the applied set -- and their siblings on
dScMgTrampoline_c are already real members, so the class was split across
two spellings.

  OnYoshiTryEat(int)  slot 18   .cpp already, definition rewritten
  OnKicked()          slot 24   .c -> .cpp
  OnPushed()          slot 23   .c -> .cpp
  Virtual88(int,int,int,int)  slot 34   .c -> .cpp

OnYoshiTryEat's body took no arguments beyond `this`; the class declares
`void OnYoshiTryEat(int)`, measured from the ROM's vtables during the
slots-18-35 campaign, so the header wins and the unread parameter is now
spelled. It costs no instruction, which is exactly why the body could
disagree for so long without anything noticing.

Three delinks keys repointed in config/arm9/overlays/ov006/delinks.txt.
Missing that step does not fail the compile -- the function falls back to
ROM bytes and only layout-check notices.

Three file-scope declaration runs needed extern "C" wrapping. decl_common.h
is already guarded with `#ifdef __cplusplus`, so only the file-local ones
were exposed: data_020a0dbc, data_0209d45c, data_ov006_02142f78, and
Virtual88's five function declarations.

VERIFIED: python tools/rombuild.py -j 16 --no-rom
  11,088 / 11,088 functions reproducing, 0 mismatching
  106/106 modules exact, 100.000000% of compared bytes
Nine static gates green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhhAeJwXBnfPp7B5DNjCwh
@andrewboudreau andrewboudreau added the attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings label Aug 31, 2026
@tangos-validator

tangos-validator Bot commented Aug 31, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

Committed merge introduces no reconstruction or attribution regression.

Full merge validation

Check Result
Committed test merge yes
Byte-verified functions 10,781 / 11,347 (95.01%, +0)
Byte-verified code bytes 2,004,460 / 2,211,124 (90.65%, +0)
Claimed, not byte-verified 436 functions, 101,220 bytes (+0)
Perfect source moves 0 R100
Enrolled ranges (delinks complete) 11,059 functions, 2,053,148 bytes (92.86%, +0) -- differs from byte-verified by +278
Contributor credit 0 added, 0 changed, 0 lost
Relocation check 4 checked; 4 VERIFIED
Port reference check 405 checked; 0 stale
Module fidelity 106/106 exact; 100.000000% compared bytes
Code linked from verified source 11,088 functions, 2,067,148 bytes (93.49%)
Module bytes from source 2,067,148 / 3,049,600 (67.8%); 811,492 (26.6%) are data no delink entry reaches
ROM data reproduced from source 496 symbol(s) exact, 223 partial, 5 differ

Byte-verified means the range carries complete in a delinks.txt, so the ROM build compiled it and compared it to the cartridge. The 436 claimed functions have a src/ file named after the symbol with no NONMATCHING banner, and nothing compiles them -- dsd fills their addresses with the ROM's own bytes. Both together are the 11,217 this project calls matched.

Per-file link-check detail

All 4 changed file(s) compile to the ROM byte-for-byte with correct relocation targets.

File Symbol Result Slots checked
src/_ZN18dScMgTrampoline2_c13OnYoshiTryEatEi.cpp _ZN18dScMgTrampoline2_c13OnYoshiTryEatEi ✅ verified 1
src/_ZN18dScMgTrampoline2_c8OnKickedEv.cpp _ZN18dScMgTrampoline2_c8OnKickedEv ✅ verified 1
src/_ZN18dScMgTrampoline2_c8OnPushedEv.cpp _ZN18dScMgTrampoline2_c8OnPushedEv ✅ verified 1
src/_ZN18dScMgTrampoline2_c9Virtual88Eiiii.cpp _ZN18dScMgTrampoline2_c9Virtual88Eiiii ✅ verified 1

The private worker commits a test merge, builds the stock ROM profile, compares every executable module, measures matched and source-built code, checks contributor lineage, and verifies affected relocations. The mod profile is opt-in and is not part of this merge gate.

Base automatically changed from cpp/minigame-methods-1 to main September 1, 2026 07:23
@andrewboudreau
andrewboudreau merged commit adc00fb into main Sep 1, 2026
7 of 8 checks passed
@andrewboudreau
andrewboudreau deleted the cpp/minigame-methods-2 branch September 1, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant