add help screen with global hotkey, move credits hotkey to ampersand

This commit is contained in:
4am 2019-09-26 13:46:13 -04:00
parent 0807fb1377
commit 6f40caf411
8 changed files with 74 additions and 25 deletions

View File

@ -35,6 +35,7 @@ dsk: md asm
bin/padto.sh 512 build/PREFS.CONF
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/TITLE" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/COVER" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/HELP" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/PREFS.CONF" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/GAMES.CONF" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/ATTRACT.CONF" >>build/log

BIN
res/attic/transfer.dsk Executable file → Normal file

Binary file not shown.

View File

@ -80,6 +80,10 @@ kCreditsFile
!byte 7
!raw "CREDITS"
kHelpFile
!byte 4
!raw "HELP"
kTitleFile
!byte 5
!raw "TITLE"

View File

@ -30,9 +30,10 @@ kBrowseNext = 2
kBrowseExitToSearch = 3
kBrowseTab = 4
kBrowseLaunch = 5
kBrowseCredits = 6
kBrowseCheat = 7
kSoftBell = 8
kBrowseHelp = 6
kBrowseCredits = 7
kBrowseCheat = 8
kSoftBell = 9
ldy #kNumBrowseKeys
- dey
@ -121,6 +122,7 @@ BrowseDispatchTableLo
!byte <SearchMode
!byte <OnBrowseTab
!byte <OnBrowseLaunch
!byte <Help
!byte <Credits
!byte <OnBrowseCheat
!byte <SoftBell
@ -131,15 +133,17 @@ BrowseDispatchTableHi
!byte >SearchMode
!byte >OnBrowseTab
!byte >OnBrowseLaunch
!byte >Help
!byte >Credits
!byte >OnBrowseCheat
!byte >SoftBell
kNumBrowseKeys = 11 ; number of entries in next 2 tables (each)
kNumBrowseKeys = 12 ; number of entries in next 2 tables (each)
BrowseKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $AF ; '/' = credits
!byte $BF ; '?' = credits
!byte $A6 ; '&' = credits
!byte $AF ; '/' = help
!byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode
!byte $89 ; TAB = mini attract mode
!byte $8D ; ENTER = launch current game
@ -151,7 +155,8 @@ BrowseKeys
BrowseKeyDispatch
!byte kBrowseCheat
!byte kBrowseCredits
!byte kBrowseCredits
!byte kBrowseHelp
!byte kBrowseHelp
!byte kBrowseTab
!byte kBrowseTab
!byte kBrowseLaunch

View File

@ -23,3 +23,24 @@ Credits
jsr ShowOtherPage ; back to previous page
clc ; if called from search mode, tell caller not to refresh
rts
Help
; clobbers all
jsr LoadHelpOffscreen
jsr ShowOtherPage
jsr WaitForKeyFor30Seconds
cmp #$83
beq @exitWithoutShowingOtherPage
jsr IsUpDownOrRightArrow
beq @exitWithoutShowingOtherPage
cmp #$88
beq @exitViaBrowse
jsr IsSearchKey
beq @exitWithoutShowingOtherPage
bit CLEARKBD
jsr ShowOtherPage
@exitWithoutShowingOtherPage
clc
rts
@exitViaBrowse
jmp BrowseMode

View File

@ -6,6 +6,7 @@
; - GetOffscreenAddress
; - LoadTitleOffscreen
; - LoadCoverOffscreen
; - LoadHelpOffscreen
; - LoadGameTitleOffscreen
; - ShowOtherPage
; - ToggleOffscreenPage
@ -55,6 +56,17 @@ LoadTitleOffscreen
;; ; last with the high byte of the address,
;; ; which is never 0. I miss my 65c02.
;;}
;------------------------------------------------------------------------------
; LoadHelpOffscreen
; load help screen in the HGR page that is currently not showing
;
; in: none
; out: all flags and registers clobbered
;------------------------------------------------------------------------------
LoadHelpOffscreen
+LDADDR kHelpFile
bne LoadOffscreenFromAY ; always branches
;------------------------------------------------------------------------------
; LoadCoverOffscreen
; load cover screen in the HGR page that is currently not showing
@ -63,9 +75,8 @@ LoadTitleOffscreen
; out: all flags and registers clobbered
;------------------------------------------------------------------------------
LoadCoverOffscreen
; clobbers all
+LDADDR kCoverFile
+
LoadOffscreenFromAY
+STAY @fname
jsr GetOffscreenAddress
sta +

View File

@ -13,9 +13,7 @@
;
Instructions
!text "[Type to search, "
!byte $15 ; right arrow character
!text " to browse] "
!text "[Type to search, ? for help ] "
VisibleGameCount
!text "000 games"
ReturnToPlay

View File

@ -51,13 +51,9 @@ SearchMode
; we want to switch to Browse Mode with the keyboard still hot so
; that mode finds and dispatches the arrow key.
cmp #$8B ; up arrow switches to browse mode
beq @arrow
cmp #$95 ; also right arrow
beq @arrow
cmp #$8A ; also down arrow
jsr IsUpDownOrRightArrow
bne @notArrow
@arrow ldx #kInputBrowse
ldx #kInputBrowse
bne .InputDispatch ; always branches
@notArrow
bit CLEARKBD
@ -187,6 +183,14 @@ IsSearchKey
ldx #1
rts
IsUpDownOrRightArrow
cmp #$8B ; up arrow
beq @done
cmp #$95 ; right arrow
beq @done
cmp #$8A ; down arrow
@done rts
; indices into InputDispatchTable
kInputSearch = 0
kInputClear = 1
@ -194,9 +198,10 @@ kInputBack = 2
kInputBrowse = 3
kInputTab = 4
kInputLaunch = 5
kInputCredits = 6
kInputCheat = 7
kInputError = 8
kInputHelp = 6
kInputCredits = 7
kInputCheat = 8
kInputError = 9
InputDispatchTableLo
!byte <OnSearch
@ -205,6 +210,7 @@ InputDispatchTableLo
!byte <BrowseMode
!byte <OnTab
!byte <OnLaunch
!byte <Help
!byte <Credits
!byte <OnCheat
!byte <OnError
@ -215,15 +221,17 @@ InputDispatchTableHi
!byte >BrowseMode
!byte >OnTab
!byte >OnLaunch
!byte >Help
!byte >Credits
!byte >OnCheat
!byte >OnError
kNumInputKeys = 9 ; number of entries in next 2 tables (each)
kNumInputKeys = 10 ; number of entries in next 2 tables (each)
InputKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $AF ; '/' = credits
!byte $BF ; '?' = credits
!byte $A6 ; '&' = credits
!byte $AF ; '/' = help
!byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode
!byte $89 ; TAB = mini attract mode
!byte $88 ; left arrow = delete (may as well, since
@ -235,7 +243,8 @@ InputKeys
InputKeyDispatch
!byte kInputCheat
!byte kInputCredits
!byte kInputCredits
!byte kInputHelp
!byte kInputHelp
!byte kInputTab
!byte kInputTab
!byte kInputBack