diff --git a/Makefile b/Makefile index f2f69a813..295054c2a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/res/HELPTEXT b/res/HELPTEXT index 6260027fb..1680919e4 100644 --- a/res/HELPTEXT +++ b/res/HELPTEXT @@ -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] diff --git a/src/constants.a b/src/constants.a index 5f048bda6..81199f6f0 100644 --- a/src/constants.a +++ b/src/constants.a @@ -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 diff --git a/src/glue.launch.a b/src/glue.launch.a index 10664a9c7..825a40b49 100644 --- a/src/glue.launch.a +++ b/src/glue.launch.a @@ -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 diff --git a/src/parse.prefs.a b/src/parse.prefs.a index da5d27cb2..5142e784f 100644 --- a/src/parse.prefs.a +++ b/src/parse.prefs.a @@ -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 diff --git a/src/prodos.path.a b/src/prodos.path.a index 839a64f8a..09bf9a70c 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -165,3 +165,7 @@ kSFXFizzleFile kDecrunchFile !byte 8 !raw "DECRUNCH" + +kJoystickFile + !byte 8 + !raw "JOYSTICK" diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index ba1538078..061eb2aef 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.a @@ -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 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 diff --git a/src/ui.credits.a b/src/ui.credits.a index 87a32b6ba..f8d4c5898 100644 --- a/src/ui.credits.a +++ b/src/ui.credits.a @@ -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 diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index cd675f1b0..f6746b79d 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -19,6 +19,7 @@ kInputHelp = 6 kInputCredits = 7 kInputCheat = 8 kInputError = 9 +kInputJoystick = 10 InputDispatchTableLo !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 diff --git a/winmake.bat b/winmake.bat index 8c2926fc2..54c903829 100644 --- a/winmake.bat +++ b/winmake.bat @@ -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