Fix the Reset button / Ctrl+Cmd-R: register the missing reset command - #253
Merged
Conversation
Both the ESC-menu Reset button and the keyboard shortcut Dispatch a "reset" console command that was never registered, so they printed "[LUS] Command not found" and did nothing. Register it and have it perform an in-game reset to the boot scene (VS CSS under Boot-to-CSS) via portSCManagerRequestReset() in the decomp's scene manager. Bump decomp: sticky reset target (the 1P sub-scene manager rewrites scene_curr between its chained sub-scenes; a mid-match reset crashed in ftManagerSetupFilesAllKind before the per-sub-scene bail guards) and the native is_reset abort flag (without it a mid-VS-match reset was read as "time up, tied score" and chained into Sudden Death). Full write-up in docs/bugs/reset_command_unregistered_2026-07-12.md. Playtested: reset from title, menus, mid-VS-match, mid-1P-match, and a 1P bonus stage — all land at the opening scene, no crashes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # docs/bugs/README.md # port/port.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
The ESC-menu Reset button (red ↺) and Ctrl+R / Cmd-R both
Dispatch("reset")at the LUS console, but noresetcommand was ever registered — the only commands are LUS's built-ins (set/get/help/clear/unbind/bind/bind-toggle), so both fell through to[LUS] Command not foundand silently did nothing, in every scene.The fix
port/port.cppregistersresetat console init; the handler callsportSCManagerRequestReset()(decomp-side, from #12), which performs an in-game reset to the boot scene — opening movie, or the VS character select when Boot-to-CSS is enabled, exactly mirroring boot — through the scene manager's normal transition path, soscManagerRunLoop's existing scene-boundary cleanup runs as for any regular transition. The command lives decomp-side because the port layer can't include decomp headers (the C shim stdlib shadows libc++, per the note inCMakeLists.txt) and mirroringSCCommonData's layout in the port would invite the layout-drift classdocs/debug_ido_bitfield_layout.mdwarns about.Two failure modes found in playtesting and fixed in #12 (details there): the 1P sub-scene manager clobbering the reset target mid-chain (crashed in
ftManagerSetupFilesAllKindon mid-1P-match reset), and VS battles reading the abort as a tie → Sudden Death (fixed by setting the game's nativeis_reset— the A+B+R+Z combo flag the battle-end flows already honor).Includes a
docs/bugs/reset_command_unregistered_2026-07-12.mdwrite-up with the full three-layer root cause, indexed in the README.Testing
Built and playtested on Apple Silicon (macOS 26), verified US ROM: reset via both the button and Cmd-R from the title screen, menus, mid-VS-match (straight to opening, no Sudden Death), mid-1P-Game match (no crash), and a 1P bonus stage, across repeated cycles in one session — all land at the opening scene with audio stopped, clean
ssb64.logthroughout.🤖 Generated with Claude Code