add global hotkey for joystick calibration

This commit is contained in:
4am 2020-06-15 12:44:46 -04:00
parent e0cdbe6323
commit 2272f77789
10 changed files with 49 additions and 19 deletions

View File

@ -31,7 +31,7 @@ dsk: md asm
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
rsync -aP res/PREFS.CONF build/PREFS.CONF >> build/log
bin/padto.sh 512 build/PREFS.CONF >>build/log
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF res/ATTRACT.CONF res/FX.CONF res/DFX.CONF build/PREFS.CONF res/CREDITS res/HELPTEXT res/DECRUNCH res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF res/ATTRACT.CONF res/FX.CONF res/DFX.CONF build/PREFS.CONF res/CREDITS res/HELPTEXT res/DECRUNCH res/JOYSTICK res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000" >>build/log
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000" >>build/log
bin/buildfileinfo.sh res/ACTION.HGR "06" "3FF8" >>build/log

View File

@ -2,20 +2,19 @@
T Y P E to find a game
< and > to browse games
[Return] to play
T Y P E to find a game
[Space] to preview
[Return] to play
[Ctrl-C] to cheat
[Space] to preview
[Esc] to go back
[Esc] to go back
[Ctrl-A] about
[Ctrl-C] to cheat
[Ctrl-P] joystick
[Ctrl-A] credits
[eof]

View File

@ -8,7 +8,7 @@
; LC RAM BANK 1
; D000..E908 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
; ...unused...
; E912..FFF1 - main program code
; E926..FFF1 - main program code
; FFF2..FFF9 - API functions and global constants available for main program
; code, prelaunchers, transition effects, &c.
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
@ -146,7 +146,7 @@ CHEATS_ENABLED = %00001000
iProDOS_enter = $D66E
LoadFileDirect = $DAFB
launchpatch = $D613
iAddToPath = $FECC
iAddToPath = $FEC3
itraverse = $D8D9
namlo = $57
namhi = $58

View File

@ -262,3 +262,16 @@ Launch
lda #$9D
sta launchpatch
jmp LaunchInternal
Joystick
jsr LoadFile
!word kPrelaunchDirectory
!word kStandardPrelaunch
!word $0106
jsr LoadFile
!word kRootDirectory
!word kJoystickFile
!word 0
jmp Launch

View File

@ -39,13 +39,13 @@ kCheat
!raw "# Do not edit by hand.",$0A
!raw "# Or do. I'm a comment, not a cop.",$0A
!byte $0A
!raw "# value=attract mode module listed in ATTRACT.CONF, or empty",$0A
!raw "# value=module listed in ATTRACT.CONF",$0A
.kFluff2 !byte .kFluff3-*-1
!byte $0A
!raw "# value=transition effect listed in FX.CONF, or empty",$0A
!raw "# value=effect listed in FX.CONF",$0A
.kFluff3 !byte .kFluff4-*-1
!byte $0A
!raw "# value=transition effect listed in DFX.CONF, or empty",$0A
!raw "# value=effect listed in DFX.CONF",$0A
.kFluff4 !byte .kEOF-*-1
!byte $0A
!raw "# value=0 or 1",$0A

View File

@ -165,3 +165,7 @@ kSFXFizzleFile
kDecrunchFile
!byte 8
!raw "DECRUNCH"
kJoystickFile
!byte 8
!raw "JOYSTICK"

View File

@ -34,6 +34,7 @@ kBrowseHelp = 6
kBrowseCredits = 7
kBrowseCheat = 8
kSoftBell = 9 ; must match kInputError
kBrowseJoystick = 10
ldy #kNumBrowseKeys
- dey
@ -128,6 +129,7 @@ BrowseDispatchTableLo
!byte <BrowseCreditsWrapper
!byte <OnBrowseCheat
!byte <SoftBell
!byte <Joystick
BrowseDispatchTableHi
!byte >OnBrowseSearch
!byte >OnBrowsePrevious
@ -139,8 +141,9 @@ BrowseDispatchTableHi
!byte >BrowseCreditsWrapper
!byte >OnBrowseCheat
!byte >SoftBell
!byte >Joystick
kNumBrowseKeys = 12 ; number of entries in next 2 tables (each)
kNumBrowseKeys = 13 ; number of entries in next 2 tables (each)
BrowseKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $81 ; Ctrl-A = about
@ -154,6 +157,7 @@ BrowseKeys
!byte $95 ; right arrow = next
!byte $8B ; up arrow = previous
!byte $88 ; left arrow = previous
!byte $90 ; Ctrl-P = launch joystick calibration program
BrowseKeyDispatch
!byte kBrowseCheat
!byte kBrowseCredits
@ -167,6 +171,7 @@ BrowseKeyDispatch
!byte kBrowseNext
!byte kBrowsePrevious
!byte kBrowsePrevious
!byte kBrowseJoystick
GameCount
!word 0

View File

@ -33,7 +33,10 @@ Credits
bit CLEARKBD ; don't care about key
cmp #$81 ; Ctrl-A = about
beq Credits
cmp #$83 ; Ctrl-C = toggle cheat mode
cmp #$90 ; Ctrl-P = launch joystick calibration program
bne +
jmp Joystick
+ cmp #$83 ; Ctrl-C = toggle cheat mode
bne +
jsr ToggleCheat
+ sec ; if called from search mode, tell caller to refresh
@ -64,5 +67,5 @@ Help
lda OffscreenPage
ror ; draw on offscreen page
+LDADDR $8000
ldx #8
ldx #7
bne - ; always branches

View File

@ -19,6 +19,7 @@ kInputHelp = 6
kInputCredits = 7
kInputCheat = 8
kInputError = 9
kInputJoystick = 10
InputDispatchTableLo
!byte <OnSearch
@ -31,6 +32,7 @@ InputDispatchTableLo
!byte <Credits
!byte <OnCheat
!byte <OnError
!byte <Joystick
InputDispatchTableHi
!byte >OnSearch
!byte >OnClear
@ -42,8 +44,9 @@ InputDispatchTableHi
!byte >Credits
!byte >OnCheat
!byte >OnError
!byte >Joystick
kNumInputKeys = 10 ; number of entries in next 2 tables (each)
kNumInputKeys = 11 ; number of entries in next 2 tables (each)
InputKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $81 ; Ctrl-A = about
@ -57,6 +60,7 @@ InputKeys
!byte $8D ; ENTER = launch current game (if any)
!byte $9B ; Esc = clear input buffer (if any)
; or switch to mega attract mode
!byte $90 ; Ctrl-P = launch joystick calibration program
InputKeyDispatch
!byte kInputCheat
!byte kInputCredits
@ -68,6 +72,7 @@ InputKeyDispatch
!byte kInputBack
!byte kInputLaunch
!byte kInputClear
!byte kInputJoystick
.noKeyMatch
jsr IsSearchKey

View File

@ -59,6 +59,7 @@ cscript /nologo bin\rsync.js "res\HELPTEXT" "build\" >>build\log
cscript /nologo bin\dumpcr.js "build\HELPTEXT"
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\DECRUNCH" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\JOYSTICK" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\Finder.Data" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\Finder.Root" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.HGR" "res\TITLE.HGR" >>build\log