Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function(add_mmx_variant TARGET GEN_DIR CFG_DIR)
src/mmx_00.c src/gen_stubs.c src/mmx_cpu_infra.c src/mmx_rtl.c
src/mmx_spc_player.c src/mmx_replay.c src/mods/mmx_diagnostics_plugin.c
src/mods/mmx_widescreen_plugin.c src/mods/mmx_msu1_plugin.c
src/mods/mmx_hadouken_plugin.c src/mods/mmx_password_plugin.c src/mods/mmx_boss_rush_plugin.c src/mmx_password_save.cpp
src/mods/mmx_hadouken_plugin.c src/mods/mmx_password_plugin.c src/mods/mmx_boss_rush_plugin.c src/mods/mmx_boss_rush_foreign_plugin.c src/mmx_password_save.cpp
src/mods/mmx_zero_plugin.c src/mmx_zero.c src/mmx_weapons.c src/mmx_weapon_combat.c src/mmx_knc_bugfix.c src/mmx_coop.c src/mmx_coop_trace.c src/mmx_coop_view.c
src/mmx_hitbox_overlay.c
src/mmx_boss_rush.c src/mmx_boss_rush_audio.c src/mmx_boss_rush_runtime.c src/mmx_boss_rush_draw.c src/mmx_boss_rush_score.cpp
src/mmx_boss_rush.c src/mmx_boss_rush_foreign.c src/mmx_boss_rush_relocate.c src/mmx_boss_rush_foreign_art.c src/mmx_cart_extension.c src/mmx_boss_rush_audio.c src/mmx_boss_rush_runtime.c src/mmx_boss_rush_draw.c src/mmx_boss_rush_score.cpp
src/mmx_source_assets.cpp "${CMAKE_CURRENT_BINARY_DIR}/mmx_weapon_sources.h")
target_compile_features(${TARGET} PRIVATE cxx_std_17)
target_include_directories(${TARGET} PRIVATE
Expand Down Expand Up @@ -150,7 +150,7 @@ add_mmx_variant(RockmanXSNESRecomp "${CMAKE_CURRENT_SOURCE_DIR}/variants/jp/gen"
include(CTest)
if(BUILD_TESTING)
add_subdirectory(${SNESRECOMP_ROOT}/runner/tests/diagnostics diagnostic-writer-tests)
add_executable(mmx_boss_rush_test tests/mmx_boss_rush_test.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c)
add_executable(mmx_boss_rush_test tests/mmx_boss_rush_test.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c src/mmx_boss_rush_foreign_art.c)
target_include_directories(mmx_boss_rush_test PRIVATE src)
add_test(NAME mmx_boss_rush COMMAND mmx_boss_rush_test)
add_executable(mmx_boss_rush_score_test tests/mmx_boss_rush_score_test.cpp src/mmx_boss_rush_score.cpp)
Expand All @@ -174,10 +174,10 @@ if(BUILD_TESTING)
add_executable(mmx_wide_policy_test tests/mmx_wide_policy_test.c src/mmx_wide_policy.c)
target_include_directories(mmx_wide_policy_test PRIVATE src)
add_test(NAME mmx_wide_policy COMMAND mmx_wide_policy_test)
add_executable(mmx_renderer_test tests/mmx_renderer_test.c src/mmx_renderer.c src/mmx_render_assets.c src/mmx_display.c src/mmx_wide_policy.c src/mmx_zero.c src/mmx_weapons.c src/mmx_weapon_combat.c src/mmx_coop_view.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c)
add_executable(mmx_renderer_test tests/mmx_renderer_test.c src/mmx_renderer.c src/mmx_render_assets.c src/mmx_display.c src/mmx_wide_policy.c src/mmx_zero.c src/mmx_weapons.c src/mmx_weapon_combat.c src/mmx_coop_view.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c src/mmx_boss_rush_foreign_art.c)
target_include_directories(mmx_renderer_test PRIVATE src ${SNESRECOMP_ROOT}/runner/src)
add_test(NAME mmx_custom_renderer COMMAND mmx_renderer_test)
add_executable(mmx_render_capture tools/mmx_render_capture.c src/mmx_renderer.c src/mmx_render_assets.c src/mmx_display.c src/mmx_wide_policy.c src/mmx_zero.c src/mmx_weapons.c src/mmx_weapon_combat.c src/mmx_coop_view.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c)
add_executable(mmx_render_capture tools/mmx_render_capture.c src/mmx_renderer.c src/mmx_render_assets.c src/mmx_display.c src/mmx_wide_policy.c src/mmx_zero.c src/mmx_weapons.c src/mmx_weapon_combat.c src/mmx_coop_view.c src/mmx_boss_rush.c src/mmx_boss_rush_draw.c src/mmx_boss_rush_foreign_art.c)
target_include_directories(mmx_render_capture PRIVATE src ${SNESRECOMP_ROOT}/runner/src)
foreach(mmx_render mmx_renderer_test mmx_render_capture)
target_sources(${mmx_render} PRIVATE src/mmx_boss_rush_score.cpp)
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,15 @@ to watch. A mismatch also saves `replay-divergence.sav` in the reproduction
directory. `--check` inspects the log without starting the game. A final input
without a completed checkpoint identifies an interrupted frame; it is reported
as incomplete, never as a successful replay. Playback executes that final input
so the original hang/crash can recur under a debugger. The format preserves actual
so the original hang/crash can recur under a debugger.

To see *why* a capture misbehaves, set `MMX_REPLAY_WATCH` during playback to
print chosen WRAM bytes whenever they change, after each verified frame:
addresses or inclusive ranges, comma separated, up to 1024 bytes (for example
`MMX_REPLAY_WATCH=0baa,0bd8,0c13,0c32,0ba8-0be7`). Run one segment directly with
`MegaManXSNESRecomp --no-launcher --replay-diagnostic <segment>.replay` and set
`SNESRECOMP_NO_LAUNCHER=1`. Each segment starts from its own checkpoint, so a
long session can be bisected segment by segment. The format preserves actual
rollback executions and restored checkpoints, so do not deduplicate frame
numbers as an input-only CSV route would.

Expand Down
12 changes: 12 additions & 0 deletions docs/boss-rush.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ player HP full to isolate boss behavior. Each pair must create a new boss
generation after cleanup. Additional checks use native Fire Wave and Homing
Torpedo finishing hits against Penguin and Kuwanger (fixtures start at 1 HP),
and cover entrance-to-hurt/death transitions.
`MMX_BOSS_RUSH_DEATH_LATCH_TEST=1` kills Penguin with a real shot, collects
his drop and requires that Chameleon can still hurt the player. A native
boss's death scene sets the player's hurt latches (`$0BD8`, then `$0C32`)
so nothing can hurt X until the stage ends; X1's contact test then skips the
player. Rush does not swap those latches per boss, so a boss killed during its
own update now leaves them as it found them. Before this, the player became
permanently invulnerable after the first native boss death of a run.
`MMX_REPLAY_SCAN=<list file>` (one `.replay` segment path per line) restores
each listed segment's opening checkpoint in the state-test binary and prints the
player's state, HP and hurt latches beside both Rush bosses, which locates a
fault in a long playtest capture before replaying the suspect segment with
`MMX_REPLAY_WATCH` (see the README).
Set `MMX_BOSS_RUSH_DEATH_TEST=1` for a fatal native-contact regression;
`MMX_BOSS_RUSH_DEATH_BOSS=4` selects Kuwanger instead of Penguin. It requires
the actual death animation to reach Game Over and emit exactly one `$0A`
Expand Down
Loading