Skip to content

minigames: convert dScMgBSC_c, dScMgCard_c, dScMgMCarlo_c to real C++ members - #2122

Closed
andrewboudreau wants to merge 1 commit into
mainfrom
constitution-lane
Closed

minigames: convert dScMgBSC_c, dScMgCard_c, dScMgMCarlo_c to real C++ members#2122
andrewboudreau wants to merge 1 commit into
mainfrom
constitution-lane

Conversation

@andrewboudreau

@andrewboudreau andrewboudreau commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Re-cut on current main as one source-only commit. The old draft's tools, CI, notes, claims, and match-ledger changes are no longer in this PR.

Conversions

  • dScMgBSC_c: 19-function promoted TU; 17 real members and no extern "C" definitions.
  • dScMgCard_c: 34-function promoted TU; 30 real members plus the two byte/order-required element D1 destroy stubs.
  • dScMgMCarlo_c: 23-function promoted TU; 20 real members plus the byte/order-required element D1 destroy stub.
  • Carries current main's family declarations: slot 18 is void, and slot 21 OnGroundPounded is a void virtual override.

The renamed state/helper methods whose ROM symbols were address-only remain explicitly marked as coined in symbols/actor_renames.tsv and the TU manifests.

Verification on the recut head

  • Full stock ROM build: 11,088/11,088 source functions reproduce, 8/8 source-data claims reproduce, 106/106 modules exact, zero mismatches.
  • TU text: BSC 19/19; Card 34/34 byte matches and MCarlo 23/23 byte matches. The older single-member isolation precheck still reports the three addend-0 vtable stores, while the current production deadstrip path accepts that ROM-symbol convention and the linked ROM proves all three destinations exact.
  • Targeted ROM data: 19 VERIFIED, 9 PARTIAL exact prefixes, 0 DIFFERS, 0 UNNAMED.
  • Converted ratchet: 2637/2637; name round-trip: no new failures; port references: 405/405.
  • Pre-push attribution: 0 changed, 0 lost. Merge-result static gates: all green.

This remains draft until the refreshed private ROM validation finishes on this exact head.

@tangos-validator

tangos-validator Bot commented Sep 1, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

Committed merge passes; 33 contributor credit reassignment(s) noted, not a blocker.

Full merge validation

Check Result
Committed test merge yes
Byte-verified functions 10,719 / 11,347 (94.47%, +0)
Byte-verified code bytes 1,995,008 / 2,211,124 (90.23%, +0)
Claimed, not byte-verified 498 functions, 110,672 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 +340
Contributor credit 0 added, 33 changed, 0 lost
Relocation check 82 checked; 82 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 580 symbol(s) exact, 163 partial, 5 differ

Contributor credit moved (33)

Function Source Before After
ov006:0x020d96e0 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d96f0 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d970c src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d978c src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d9998 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d99a4 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d99ec src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d9a14 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d9bd0 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d9bdc src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020d9c5c src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da00c src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da0ac src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da154 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da174 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da420 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da4ac src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da5e8 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da834 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da860 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da88c src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da8b8 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da8e4 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020da974 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]
ov006:0x020dac34 src/actors/dScMgCard_c.cpp andrewboudreau github-actions[bot]

+8 more; the full list is in the JSON report's attribution section.

Byte-verified means the range carries complete in a delinks.txt, so the ROM build compiled it and compared it to the cartridge. The 498 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.

Warnings: contributor attribution changed, not a blocker (33 changed, 0 lost -- src/actors/dScMgCard_c.cpp: andrewboudreau -> github-actions[bot]; src/actors/dScMgCard_c.cpp: andrewboudreau -> github-actions[bot]; src/actors/dScMgCard_c.cpp: andrewboudreau -> github-actions[bot]; +30 more).

Per-file link-check detail

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

File Symbol Result Slots checked
src/_ZN11dScMgCoin_c13OnYoshiTryEatEi.cpp _ZN11dScMgCoin_c13OnYoshiTryEatEi ✅ verified 1
src/actors/MgPicturePoker.cpp MgPicturePoker_Spawn + func_ov006_020dbe14 + func_ov006_020dbe30 ✅ verified 3
src/actors/dScMgBSC_c.cpp _ZN10dScMgBSC_cD1Ev + _ZN10dScMgBSC_cD0Ev + _ZN10dScMgBSC_c9StateDoneEv + _ZN10dScMgBSC_c16StateReturnCardsEv + _ZN10dScMgBSC_c14StateWaitTableEv + _ZN10dScMgBSC_c18StateTableReactionEv + _ZN10dScMgBSC_c15StateJudgeCardsEv + _ZN10dScMgBSC_c16StateRevealCardsEv + _ZN10dScMgBSC_c13StateWaitMoveEv + _ZN10dScMgBSC_c14StateMoveCardsEv + _ZN10dScMgBSC_c15StateChooseCardEv + _ZN10dScMgBSC_c13StateWaitDealEv + _ZN10dScMgBSC_c14StateDealCardsEv + _ZN10dScMgBSC_c15OnGroundPoundedEv + _ZN10dScMgBSC_c13OnTurnIntoEggEi + _ZN10dScMgBSC_c13OnYoshiTryEatEi + _ZN10dScMgBSC_c6RenderEv + _ZN10dScMgBSC_c8BehaviorEv + _ZN10dScMgBSC_c13InitResourcesEv ✅ verified 19
src/actors/dScMgCard_c.cpp _ZN11dScMgCard_cD1Ev + _ZN11dScMgCard_cD0Ev + _ZN12dMgCardObj_cD1Ev + _ZN17dMgDilarCardObj_cD1Ev + _ZN17dMgDilarCardObj_c6RenderEv + _ZN17dMgDilarCardObj_c6UpdateEv + _ZN17dMgDilarCardObj_c13GetOffscreenYEv + _ZN12dMgCardObj_c6FlyOffEv + _ZN12dMgCardObj_c7SetHomeEi + _ZN11dScMgCard_c9RenderHudEv + _ZN12dMgCardObj_c13GetOffscreenYEv + _ZN12dMgCardObj_c6RenderEv + _ZN12dMgCardObj_c6UpdateEv + _ZN12dMgCardObj_c6RedealEv + _ZN12dMgCardObj_c6DealInEPKi + _ZN11dScMgCard_c10SettleHandEP12dMgCardObj_c + _ZN11dScMgCard_c11ArrangeHandEP12dMgCardObj_c + _ZN11dScMgCard_c11MarkSinglesEP12dMgCardObj_c + _ZN11dScMgCard_c12EvaluateHandEPK12dMgCardObj_cPs + _ZN11dScMgCard_c12CompareHandsEPK12dMgCardObj_cS2_ + _ZN11dScMgCard_c9AllLiftedEPK12dMgCardObj_c + _ZN11dScMgCard_c10AllInStateEPK12dMgCardObj_ci + _ZN11dScMgCard_c12CountInStateEPK12dMgCardObj_ci + _ZN11dScMgCard_c11FindInStateEPK12dMgCardObj_ci + _ZN11dScMgCard_c13DrawCardValueEv + _ZN11dScMgCard_c11FillWeightsEi + _ZN11dScMgCard_c16CleanupResourcesEv + _ZN11dScMgCard_c6RenderEv + _ZN11dScMgCard_c8BehaviorEv + _ZN11dScMgCard_c11UpdateStateEv + _ZN11dScMgCard_c15OnGroundPoundedEv + _ZN11dScMgCard_c13OnTurnIntoEggEi + _ZN11dScMgCard_c13OnYoshiTryEatEi + _ZN11dScMgCard_c13InitResourcesEv ✅ verified 34
src/actors/dScMgMCarlo_c.cpp _ZN13dScMgMCarlo_cD1Ev + _ZN13dScMgMCarlo_cD0Ev + _ZN18dMgMCarloCardObj_cD1Ev + _ZN13dScMgMCarlo_c11UpdateBoardEv + _ZN13dScMgMCarlo_c14FlipDealtCardsEv + _ZN13dScMgMCarlo_c13DrawCardValueEv + _ZN13dScMgMCarlo_c10BoardReadyEv + _ZN13dScMgMCarlo_c9BoardBusyEv + _ZN13dScMgMCarlo_c16HasRemovablePairEv + _ZN13dScMgMCarlo_c10SetupBoardEP18dMgMCarloCardObj_c + _ZN18dMgMCarloCardObj_c6RenderEv + _ZN18dMgMCarloCardObj_c6UpdateEi + _ZN18dMgMCarloCardObj_c7HitTestEv + _ZN18dMgMCarloCardObj_c10IsPairWithEPS_ + _ZN18dMgMCarloCardObj_c8FlipAwayEi + _ZN18dMgMCarloCardObj_c6DealInEi + _ZN18dMgMCarloCardObj_c4InitEi + _ZN13dScMgMCarlo_c9RenderHudEv + _ZN13dScMgMCarlo_c6RenderEv + _ZN13dScMgMCarlo_c8BehaviorEv + _ZN13dScMgMCarlo_c13OnTurnIntoEggEi + _ZN13dScMgMCarlo_c13OnYoshiTryEatEi + _ZN13dScMgMCarlo_c13InitResourcesEv ✅ verified 23
src/func_ov006_020f8e44.cpp func_ov006_020f8e44 ✅ verified 1
src/func_ov006_020f8ed8.c func_ov006_020f8ed8 ✅ 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.

@andrewboudreau andrewboudreau added the attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings label Sep 1, 2026
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