diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index 66d646e2e..1209c2848 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -65,7 +65,7 @@ MegaAttractMode ; in: gGameToLaunch = index in gSearchStore (word) ; gSearchStore populated ; out: all flags and registers clobbered -; assume all of main memory has been clobbered +; assume all of main memory has been clobbered (including gSearchStore) ;------------------------------------------------------------------------------ MiniAttractMode jsr GetGameToLaunch diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index 2dda5f69a..dbc31fb21 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.a @@ -96,6 +96,9 @@ OnBrowseCheat OnBrowseTab jsr MiniAttractMode + pha ; must reload search index before calling either + jsr ReloadSearchIndex ; PlayGame or LoadGameTitleOffscreen, because + pla ; mini attract mode may have clobbered all of main memory cmp #$8D beq OnBrowseLaunch ; execution falls through here @@ -104,6 +107,7 @@ ForceBrowseChanged ; execution falls through here OnBrowseChanged ; in: gGameToLaunch = game index (word) +; gSearchStore populated jsr SwitchToBank2 jsr EnableAcceleratorAndSwitchToBank1 jsr LoadGameTitleOffscreen diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index 6c56292cd..5d50b8a69 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -162,7 +162,8 @@ OnTab jsr MiniAttractMode cmp #$8D ; if we exited mini attract mode bne .req_redraw ; by pressing Enter, launch the game - + jsr ReloadSearchIndex ; must reload search index before calling PlayGame + ; /!\ execution falls through here OnLaunch ldx gGameToLaunch+1 inx @@ -170,7 +171,7 @@ OnLaunch jsr PlayGame .req_redraw - sec ; tell caller to redraw UI + sec ; tell caller to reload search index and redraw UI from scratch rts OnCheat