Repository navigation
Boss Rush: add X3 Mavericks, starting with Tunnel Rhino - #123
KamiSquadX wants to merge 12 commits into
Conversation
Static trace of the X3 USA controller, drill projectiles, shared helpers, art, palette and sound sources for porting Rhino into Boss Rush. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Define NOMINMAX before windows.h, supply S_ISDIR for MSVC, and rename a test parameter that collides with the Windows 'small' macro. No behavior change on MinGW, Linux or macOS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Roster ids cover X1, X2 and X3 Mavericks by native weapon order. A new roster state holds the shuffle queue and the run's available set, saved in game chunk v23; v18-v22 snapshots import their X1 queue unchanged and the original Rush state layout is untouched. Add the experimental megaman-x.boss-rush.x3-bosses package. Its plugin validates the user's X3 ROM and keeps it in memory only; a boss is offered only once its body is implemented, so runs stay X1-only for now. Netplay refuses to start if an enabled Maverick pack failed to load. Document the foundation and the relocated-code plan for X2/X3 bodies, and update the snapshot-format fixture for v22/v23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grow X1's padded 2 MB LoROM image to 4 MB at runtime, mirroring the original so every existing read is unchanged, and allow built code in banks $F0-$FD. A pre-opcode hook at the enemy class dispatch ($80:D544) enters a registered controller for a non-X1 roster seat with a JSL frame returning to a native RTS, matching the stock JSL/RTS stubs. The MMX_BOSS_RUSH_FOREIGN_SPIKE_TEST fixture runs a bank-$F0 controller in seat 1 beside a native Penguin: once per frame, native X1 helper calls return correctly, and snapshot replay is byte-exact. The full 28-pair Rush suite still passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/relocate_boss.py traces Rhino's body, drill projectile and the X3 helpers they need, and emits an address-only descriptor: X3 helpers map to X1 equivalents, relocated copies or shims; X3 RAM maps to X1 RAM or a zero/sink area. Unclassified calls or RAM fail generation. src/mmx_boss_rush_relocate.c rebuilds Rhino from the user's X3 ROM when the pack loads: code banks go to X1's unused $30-$3F padding, his $86 tables and shims to the $FF tail of X1's bank $86 (X1's enemy loop uses the same data bank), and every rewritten operand is verified first. Hooks at the enemy and enemy-projectile class dispatches run registered controllers for a foreign seat; foreign bodies report their own combat and death states. The ROM-backed Rhino fixture covers his intro, charges, drill volley, replay determinism, defeat and cleanup beside a native Penguin. He stays out of normal runs (MMX_BOSS_RUSH_PREVIEW=1 opts in) until his art, sound and weaknesses are done. The full 28-pair suite still passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decode a relocated body's compressed OBJ resource, palette and pose layouts from the in-memory source ROM and rasterize poses once. The renderer replaces the pieces X1's sprite builder makes for foreign-owned objects and draws each body and projectile whole from its +$16 set and +$17 pose, with +$11 facing, priority and palette-zero hit flash. Fix the projectile redirect: X1's enemy-projectile actor dispatches at $80:D4E7 (not $D48A) and has a compiled body, so route $D4D3/$D4DD through the interpreter during Rush. Rhino's drills previously ran X1's own class $26. The Rhino fixture checks his body and drills draw in his own palette, that drills run the relocated controller, and saves private captures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
X3's SPC driver shares X1's upload table and boot protocol, so the isolated Rush SPC renderer now takes a per-game bank list. Relocated bodies load their source ROM's banks 0-2 plus their own sound bank ($5D for Rhino) and pre-render the effects their code requests. The relocation tool finds both from the traced code, and turns the X3 sound routines into hooked shims that queue the boss's cached clip, panned like X3's positional call. Cues name the roster id in their spare field, so the snapshot layout is unchanged. The Rhino fixture checks all six effects render audibly and that his fill, wall crash, spread, stop and drill grind cues fire. The X1 native audio, 28-pair, spike and state-format fixtures still pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Map Rhino's X3 damage profiles to X1 rows during relocation: normal to Kuwanger's row, drill charge to the deflect row, flinch to the no-damage row. His weakness test reads X1's reaction class ($1F1D) and compares against the Torpedo reaction classes. Boss Rush hooks X1's damage helper for relocated bodies: X3 Acid Burst takes the row's weakness column and reaction, so his own code flinches; X1 Homing Torpedo is moved to an ordinary column. The X2/X3 weapon pack no longer applies its X1-class table to relocated bodies and defers to their native row. Extra X1/X2 weaknesses are left for the owner to assign once all 24 bosses exist. The Rhino fixture fires the buster, Homing Torpedo and a real X3 Acid Burst from the pack built from the same ROM, and checks the deflect row. Full, native hit, audio, spike and format fixtures pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinning: X1 shares X3's player-state numbers (hurt $0E, death $0C, scripted lock $1E). Rhino's X3 lock/release become shims around X1's entrance lock ($84:9FEB) and release ($84:A003, only from $1E); Rush still skips the lock during entrances. X3's caught state $12 has no X1 counterpart, so his pin test compares the hurt state the drill leaves. Palette: his relocated rotate/fade helpers run on the seat's private colors (shared with Chameleon's snapshotted state); the fade reports carry while colors differ, and the renderer draws foreign bodies with them. Frame counters: X3's $09CB/$09CC have the same NMI and scene-loop increment sites as X1's $0B9B/$0B9C, confirming the mapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tunnel Rhino now appears in normal Boss Rush runs once the X3 Mavericks pack has loaded the X3 ROM. - Move the relocated zero/sink area to $86:FD80-$FF7F and stop the $86 patch window at $FF7F. The old $FE00-$FFFF area overlapped the weapon, Zero and saber collision tables at $86:FF80-$FFFF: Saber Zero's slash did 0 damage, and as X the weapon code's $FF fill froze Rhino. - Register mod plugins in MSVC builds (mmx_mod_constructor.h keeps the .CRT$XCU pointer), so the launcher can commit plans. - Launcher-driven character matrix for X, Zero, Modern Zero and Saber Zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Zero's air and dash slashes: the relocated zero/sink area overlapped the air-saber collision window at $86:FF40, so the saber disabled it. The sink moves to $86:FD40-$FF3F and the patch window ends at $FF3F. - Rhino stopped taking damage after his first hit flash: the flash restores his profile from X3 $1F57, which read 0 (X1's deflect row) from the sink. It now maps to X1 $1FD5, swapped per Rush seat. - Rhino slid through the right wall: X3 rooms start on 256-pixel boundaries and his stop-and-fire charge stops at that midline without a wall check. His four midline reads are answered relative to the arena. - Rhino stopped firing drills and never did his stop-and-fire spread: the delete shim cleared only byte 0, so dead drills kept their projectile slots; and spawns that fail when the other boss fills the shared pool are now taken back out of his live-drill count. - The player became invulnerable after a native boss died: its death scene sets the hurt latches $0BD8/$0C32. A boss killed during its own update now leaves them as it found them. - Regression checks: a long Rhino fight (damage, volleys, spreads, arena bounds, slot reuse, saber windows) and MMX_BOSS_RUSH_DEATH_LATCH_TEST. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by replaying the playtest capture frame by frame. - Stuck invulnerability: X3's caught state $12 maps to X1's ordinary hurt, so Rhino's pin locked the player after any hit during his recoil. The lock skipped the end of X1's hurt state, which starts the countdown ($0C13) that clears the hurt latches $0BD8/$0C32, so nothing could hurt the player again. The pin now requires his live pin carrier, and the release shim starts that countdown when it frees a latched player. - Leftover drill graphics: his drill charge spawned a pin carrier on every frame it overlapped the player (X3's caught player stops overlapping), filling the projectile pool. It now spawns one while none is alive. - Spread drills: their start offsets ($86:EFE7 + 4*index) ran past the copied table, so the shoulder drills started in the wrong places or off screen. The copy now covers $86:EFB8-$EFF6. - Developer aids: MMX_REPLAY_WATCH prints chosen WRAM bytes during replay playback; MMX_REPLAY_SCAN prints the state at each segment's checkpoint. - Checks: one carrier per catch, no pin without it, latches clear after a pin, and the spread's hand and shoulder drills at X3's offsets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review of this work as included in PR #128, combined head Confirmed damage defect: Tunnel Rhino's original X3 damage directory Please import the actual used source damage profiles rather than treating a superficially similar X1 row as equivalent. Preserve damage separately from reaction classes, and include alternate projectile phases, immunity/reflection and child profiles. This is also the cause of several Wire Sponge discrepancies in #128; I have posted the detailed findings and a proposed per-boss workflow there. Expectations should come independently from the verified source ROM, with exact normal/charged HP assertions and real projectile tests. Validation completed so far on Windows MinGW/SDL3 with the exact pinned framework/UI:
Keep the X3 toggle inside the existing Boss Rush package ( The reported desperation-charge graphics gap and native visual fidelity still need complete review. No two-peer netplay qualification is claimed. These results are not a merge or final gameplay approval. Final review artifacts and implementation are available in commit ab6aa9f, on "integrate/boss-rush-x2-x3". See the full review and reproduction commands and independent fixture. Completed checks additionally confirm a real buster killing one-HP Rhino with one defeat/replacement, and natural fatal contact with each import reaching Game Over. All 28 native X1 boss pairs and the separate pause, state-format, audio, death-latch, hit-visual and drop regressions pass. The initially skipped Saber render/wave checks also pass when supplied their private source fixtures. The independent source-fidelity fixture still reports 21 failing assertions (including overlapping live/focused reproductions); these are retained as regressions for the fixes. Other-game contacts without an assigned source expectation are explicitly recorded as unverified, not passes. Lightning-controller captures confirm the missing Sponge background darkening; natural anger entry, the reported intermittent Rhino visual remnant, and two-peer netplay remain unverified. Final owner QA handoff is withheld pending corrections; neither PR has been merged or approved. |
|
Superseded by #128, which includes all changes from this PR. Follow-up work continues there. |
Summary
Boss Rush can now include Mavericks from Mega Man X3, starting with Tunnel Rhino. He runs on his original X3 code, art and sound effects, all read at runtime from the player's own X3 ROM. The roster grows from 8 to 24 slots (X1 + X2 + X3). X2 slots and the other X3 slots stay unavailable until those bosses are ported.
Enable Boss Rush plus the new X3 Mavericks in Boss Rush package (
megaman-x.boss-rush.x3-bosses), and give it an X3 USA ROM. Rhino then joins normal runs.How it works
tools/relocate_boss.pytraces Rhino's controller, drill projectile and the X3 engine helpers he calls. It emitssrc/mmx_boss_rush_x3_rhino.inc, which holds addresses and the original operand values only: no code, graphics or audio bytes. At activation,mmx_boss_rush_relocate.cchecks those values against the user's ROM, then copies the code into X1's unused LoROM padding banks$30-$3Fand his$86tables into bank$86's padding.docs/x3-bosses/tunnel-rhino.mdis the source trace.docs/x3-bosses/foundation.mdcovers the memory layout and each X3-to-X1 adaptation.Fixes found along the way
These affect existing Boss Rush and Zero play, not only Rhino:
$0BD8/$0C32until the stage ends. A boss killed during its own update now leaves them as it found them. Test:MMX_BOSS_RUSH_DEATH_LATCH_TEST..CRT$XCUpointer.src/mods/mmx_mod_constructor.hkeeps an external pointer plus a/includedirective. The proper home for this fix is snesrecomp'smod_runtime.h.NOMINMAX,S_ISDIR, and thesmallmacro.Developer aids
MMX_REPLAY_WATCH=<addr,range,...>prints chosen WRAM bytes whenever they change during--replay-diagnosticplayback. It is documented in the README, and it found the pin and invulnerability bugs from a playtest capture.MMX_REPLAY_SCANis a state-test mode that prints the player's hurt state and both Rush bosses at each segment's checkpoint.Testing
State-test fixtures (
MMX_STATE_TESTS=ON), all passing on Windows / MSVC Release:MMX_BOSS_RUSH_TEST(28-pair suite).MMX_BOSS_RUSH_DEATH_LATCH_TEST.MMX_BOSS_RUSH_RHINO_TESTwithMMX_BOSS_RUSH_X3_ROM:MMX_BOSS_RUSH_RHINO_CHARACTERset tox,zero,modernandsaber.Known gaps
$86space is laid out for one relocated boss. A second boss needs its own region.🤖 Generated with Claude Code