accelerate during search and browse modes if possible

This commit is contained in:
4am 2019-10-05 16:40:19 -04:00
parent 1615e444a4
commit 686539f8b3
4 changed files with 24 additions and 5 deletions

View File

@ -6,17 +6,17 @@
; YE OLDE GRAND UNIFIED MEMORY MAP
;
; LC RAM BANK 1
; D000..E5F4 - persistent data structures (per-game cheat categories,
; D000..E611 - persistent data structures (per-game cheat categories,
; gGlobalPrefsStore, gGamesListStore)
; ...unused...
; ECA0..FFF9 - main program code
; EBE4..FFF9 - main program code
; FFFA..FFFF - NMI, reset, IRQ vectors
;
; LC RAM BANK 2
; D000..D3FF - ProRWTS data
; D400..D5F7 - ProRWTS code
; D5F8..DB52 - HGR font code & ProRWTS glue code
; DB53..DB62 - backup of stack (during gameplay and self-running demos)
; DB53..DB6E - backup of stack (during gameplay and self-running demos)
; ...unused...
; DBB6..DBFF - (de)acceleration function
; DC00..DFFF - HGR font data

View File

@ -654,3 +654,11 @@ LaunchInternal
dey
bne -
jmp $106 ; jump to pre-launch code
EnableAcceleratorAndSwitchToBank1
jsr EnableAccelerator
jmp SwitchToBank1
DisableAcceleratorAndSwitchToBank1
jsr DisableAccelerator
jmp SwitchToBank1

View File

@ -106,12 +106,16 @@ OnBrowseTab
; execution falls through here
ForceBrowseChanged
bit CLEARKBD
ldx gGameToLaunch
; execution falls through here
OnBrowseChanged
; in: X = game index
; in: gGameToLaunch = game index
jsr SwitchToBank2
jsr EnableAcceleratorAndSwitchToBank1
ldx gGameToLaunch
jsr LoadGameTitleOffscreen
jsr DrawUIWithoutDots
jsr SwitchToBank2
jsr DisableAcceleratorAndSwitchToBank1
jmp MaybeAnimateTitle
;------------------------------------------------------------------------------

View File

@ -124,6 +124,9 @@ OnInputChanged
rts
@findMatchingTitle
jsr SwitchToBank2
jsr EnableAcceleratorAndSwitchToBank1
jsr ResetTextRank
jsr okvs_iter_values ; iterate through all game titles
@ -136,6 +139,8 @@ OnInputChanged
dec InputLength ; ignore the last key typed
OnError
jsr SwitchToBank2
jsr DisableAcceleratorAndSwitchToBank1
jmp SoftBell ; Beep on invalid input and start over.
+
@ -149,6 +154,8 @@ OnError
bpl @noload ; (always branches)
+ jsr LoadGameTitleOffscreen
@noload jsr DrawUI
jsr SwitchToBank2
jsr DisableAcceleratorAndSwitchToBank1
jsr MaybeAnimateTitle
clc
rts