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 bin/padto.sh 512 build/PREFS.CONF
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/TITLE" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/TITLE" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/COVER" >>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/PREFS.CONF" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/GAMES.CONF" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/GAMES.CONF" >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/ATTRACT.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 !byte 7
!raw "CREDITS" !raw "CREDITS"
kHelpFile
!byte 4
!raw "HELP"
kTitleFile kTitleFile
!byte 5 !byte 5
!raw "TITLE" !raw "TITLE"

View File

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

View File

@ -23,3 +23,24 @@ Credits
jsr ShowOtherPage ; back to previous page jsr ShowOtherPage ; back to previous page
clc ; if called from search mode, tell caller not to refresh clc ; if called from search mode, tell caller not to refresh
rts 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 ; - GetOffscreenAddress
; - LoadTitleOffscreen ; - LoadTitleOffscreen
; - LoadCoverOffscreen ; - LoadCoverOffscreen
; - LoadHelpOffscreen
; - LoadGameTitleOffscreen ; - LoadGameTitleOffscreen
; - ShowOtherPage ; - ShowOtherPage
; - ToggleOffscreenPage ; - ToggleOffscreenPage
@ -55,6 +56,17 @@ LoadTitleOffscreen
;; ; last with the high byte of the address, ;; ; last with the high byte of the address,
;; ; which is never 0. I miss my 65c02. ;; ; 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 ; LoadCoverOffscreen
; load cover screen in the HGR page that is currently not showing ; load cover screen in the HGR page that is currently not showing
@ -63,9 +75,8 @@ LoadTitleOffscreen
; out: all flags and registers clobbered ; out: all flags and registers clobbered
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
LoadCoverOffscreen LoadCoverOffscreen
; clobbers all
+LDADDR kCoverFile +LDADDR kCoverFile
+ LoadOffscreenFromAY
+STAY @fname +STAY @fname
jsr GetOffscreenAddress jsr GetOffscreenAddress
sta + sta +

View File

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

View File

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