Skip to content

Fix the Reset button / Ctrl+Cmd-R: register the missing reset command - #253

Merged
JRickey merged 3 commits into
JRickey:mainfrom
quarrel07:reset-command
Jul 13, 2026
Merged

Fix the Reset button / Ctrl+Cmd-R: register the missing reset command#253
JRickey merged 3 commits into
JRickey:mainfrom
quarrel07:reset-command

Conversation

@quarrel07

Copy link
Copy Markdown

Depends on JRickey/ssb-decomp-re#12 — this PR bumps the decomp submodule to that branch's commit. Note on merge mechanics: if #12 is merged with a regular merge, the submodule SHA here (dbc69f44d) stays reachable from port-patches and this PR works as-is; if you squash-merge it, the SHA changes and I'll repoint the submodule here — just say the word.

The bug

The ESC-menu Reset button (red ↺) and Ctrl+R / Cmd-R both Dispatch("reset") at the LUS console, but no reset command 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 found and silently did nothing, in every scene.

The fix

port/port.cpp registers reset at console init; the handler calls portSCManagerRequestReset() (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, so scManagerRunLoop'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 in CMakeLists.txt) and mirroring SCCommonData's layout in the port would invite the layout-drift class docs/debug_ido_bitfield_layout.md warns 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 ftManagerSetupFilesAllKind on mid-1P-match reset), and VS battles reading the abort as a tie → Sudden Death (fixed by setting the game's native is_reset — the A+B+R+Z combo flag the battle-end flows already honor).

Includes a docs/bugs/reset_command_unregistered_2026-07-12.md write-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.log throughout.

🤖 Generated with Claude Code

siliconports and others added 3 commits July 12, 2026 19:17
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
@JRickey
JRickey merged commit 65c3caf into JRickey:main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants