move help text to external text file, use Ctrl-A for about page

This commit is contained in:
4am 2019-12-20 10:25:30 -05:00
parent 4c77518af1
commit 7fc4bd830d
12 changed files with 47 additions and 16 deletions

View File

@ -28,8 +28,9 @@ dsk: md asm
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
for f in res/*.conf; do rsync -aP "$$f" build/$$(basename $$f | tr '[:lower:]' '[:upper:]') >>build/log; done for f in res/*.conf; do rsync -aP "$$f" build/$$(basename $$f | tr '[:lower:]' '[:upper:]') >>build/log; done
rsync -aP res/credits.txt build/CREDITS >>build/log rsync -aP res/credits.txt build/CREDITS >>build/log
rsync -aP res/help.txt build/HELPTEXT >>build/log
bin/padto.sh 512 build/PREFS.CONF >>build/log bin/padto.sh 512 build/PREFS.CONF >>build/log
for f in res/TITLE res/COVER res/HELP build/*.CONF build/CREDITS; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done for f in res/TITLE res/COVER res/HELP build/*.CONF build/CREDITS build/HELPTEXT; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
for f in res/title.hgr res/title.dhgr res/action.hgr res/action.dhgr res/action.gr res/artwork.shr res/attract res/ss res/demo res/title.animated; do rsync -aP "$$f"/* build/$$(basename $$f | tr '[:lower:]' '[:upper:]') >>build/log; done for f in res/title.hgr res/title.dhgr res/action.hgr res/action.dhgr res/action.gr res/artwork.shr res/attract res/ss res/demo res/title.animated; do rsync -aP "$$f"/* build/$$(basename $$f | tr '[:lower:]' '[:upper:]') >>build/log; done
bin/buildfileinfo.sh build/TITLE.HGR "06" "4000" >>build/log bin/buildfileinfo.sh build/TITLE.HGR "06" "4000" >>build/log
bin/buildfileinfo.sh build/TITLE.DHGR "06" "4000" >>build/log bin/buildfileinfo.sh build/TITLE.DHGR "06" "4000" >>build/log

BIN
res/HELP

Binary file not shown.

View File

@ -9,3 +9,4 @@ COVER=Type(06),AuxType(2000),Access(C3)
TITLE=Type(06),AuxType(2000),Access(C3) TITLE=Type(06),AuxType(2000),Access(C3)
HELP=Type(06),AuxType(2000),Access(C3) HELP=Type(06),AuxType(2000),Access(C3)
CREDITS=Type(04),AuxType(8000),Access(C3) CREDITS=Type(04),AuxType(8000),Access(C3)
HELPTEXT=Type(04),AuxType(8000),Access(C3)

Binary file not shown.

1
res/help.txt Normal file
View File

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

View File

@ -122,10 +122,14 @@ kCreditsFile
!byte 7 !byte 7
!raw "CREDITS" !raw "CREDITS"
kHelpFile kHelpBackgroundFile
!byte 4 !byte 4
!raw "HELP" !raw "HELP"
kHelpTextFile
!byte 8
!raw "HELPTEXT"
kTitleFile kTitleFile
!byte 5 !byte 5
!raw "TITLE" !raw "TITLE"

View File

@ -145,7 +145,7 @@ BrowseDispatchTableHi
kNumBrowseKeys = 12 ; 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 $A6 ; '&' = credits !byte $81 ; Ctrl-A = about
!byte $AF ; '/' = help !byte $AF ; '/' = help
!byte $BF ; '?' = help !byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode !byte $A0 ; Space = mini attract mode

View File

@ -25,6 +25,7 @@ Credits
lda OffscreenPage lda OffscreenPage
ror ; draw on offscreen page ror ; draw on offscreen page
+LDADDR $8000 +LDADDR $8000
ldx #0
jsr DrawPage ; draw credits jsr DrawPage ; draw credits
jsr ShowOtherPage ; show credits jsr ShowOtherPage ; show credits
jsr WaitForKeyFor30Seconds; wait jsr WaitForKeyFor30Seconds; wait
@ -43,13 +44,24 @@ Credits
; C clear, all other flags and registers clobbered ; C clear, all other flags and registers clobbered
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
Help Help
jsr LoadFile ; load help text into $8000
!word kRootDirectory
!word kHelpTextFile
!word $8000
jsr LoadHelpOffscreen jsr LoadHelpOffscreen
lda OffscreenPage
ror ; draw on offscreen page
+LDADDR $8000
ldx #8
jsr DrawPage ; draw help text
jsr ShowOtherPage jsr ShowOtherPage
jsr WaitForKeyFor30Seconds jsr WaitForKeyFor30Seconds
cmp #$88 cmp #$88
beq BrowseMode beq BrowseMode
cmp #$83 cmp #$83
beq - beq -
cmp #$81
beq -
jsr IsUpDownOrRightArrow jsr IsUpDownOrRightArrow
beq - beq -
jsr IsSearchKey jsr IsSearchKey

View File

@ -10,19 +10,24 @@
DrawPageInternal DrawPageInternal
; A/Y contains address of character buffer ; A/Y contains address of character buffer
; X contains 0-indexed left margin (HTAB)
; carry bit clear -> draw on page 1 ; carry bit clear -> draw on page 1
; carry bit set -> draw on page 2 ; carry bit set -> draw on page 2
; drawing starts at VTAB 0, HTAB 0 ; drawing starts at VTAB 0
; each line starts at column X which was passed in (0-indexed)
; clobbers PTR ; clobbers PTR
; clobbers A/X/Y ; clobbers A/X/Y
; preserves all flags, by a quirk of implementation ; preserves all flags, by a quirk of implementation
php php
stx @leftMargin
ldx #0 ldx #0
stx VTAB stx VTAB
+STAY PTR +STAY PTR
@drawLine @drawLine
@leftMargin=*+1
lda #$FD ; SMC
sta HTAB
ldy #0 ldy #0
sty HTAB
@parseLine @parseLine
lda (PTR),y lda (PTR),y
cmp #$5B ; '[' at beginning on line cmp #$5B ; '[' at beginning on line
@ -31,19 +36,20 @@ DrawPageInternal
beq @donePage beq @donePage
+ cmp #$0D + cmp #$0D
beq @doneParsingLine beq @doneParsingLine
cmp #$2A ldx #3
bne + - cmp @subs_a,x
lda #$10 beq @makesub
sta (PTR),y ; asterisk -> dot, small dex
+ cmp #$7E bpl -
bne + bmi +
lda #$11 @makesub
sta (PTR),y ; tilde -> dot, medium lda @subs_b,x
sta (PTR),y
+ iny + iny
bne @parseLine bne @parseLine
@doneParsingLine @doneParsingLine
sty SAVE sty SAVE
cpy #0 tya
beq @skip beq @skip
ldx SAVE ldx SAVE
+LDAY PTR +LDAY PTR
@ -62,6 +68,10 @@ DrawPageInternal
@donePage @donePage
plp plp
rts rts
@subs_a
!byte $2A,$7E,$3C,$3E
@subs_b
!byte $10,$11,$08,$15
Draw40CharsInternal Draw40CharsInternal
; A/Y contains address of character buffer ; A/Y contains address of character buffer

View File

@ -57,7 +57,7 @@ LoadTitleOffscreen
; out: all flags and registers clobbered ; out: all flags and registers clobbered
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
LoadHelpOffscreen LoadHelpOffscreen
lda #<kHelpFile lda #<kHelpBackgroundFile
+HIDE_NEXT_2_BYTES +HIDE_NEXT_2_BYTES
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; LoadCoverOffscreen ; LoadCoverOffscreen

View File

@ -46,7 +46,7 @@ InputDispatchTableHi
kNumInputKeys = 10 ; 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 $A6 ; '&' = credits !byte $81 ; Ctrl-A = about
!byte $AF ; '/' = help !byte $AF ; '/' = help
!byte $BF ; '?' = help !byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode !byte $A0 ; Space = mini attract mode

View File

@ -44,12 +44,14 @@ call :asm
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\LAUNCHER.SYSTEM" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\LAUNCHER.SYSTEM" >>build\log
cscript /nologo bin\rsync.js res\*.conf build >>build\log cscript /nologo bin\rsync.js res\*.conf build >>build\log
1>nul copy /y res\credits.txt build\CREDITS >>build\log 1>nul copy /y res\credits.txt build\CREDITS >>build\log
1>nul copy /y res\help.txt build\HELPTEXT >>build\log
cscript /nologo bin\padto.js 512 build\PREFS.CONF cscript /nologo bin\padto.js 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%/" "res\HELP" >>build\log
for %%q in (build\*.CONF) do %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "%%q" >>build\log for %%q in (build\*.CONF) do %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "%%q" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\CREDITS" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\CREDITS" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\HELPTEXT" >>build\log
cscript /nologo bin\rsync.js res\title.hgr\* build\TITLE.HGR >>build\log cscript /nologo bin\rsync.js res\title.hgr\* build\TITLE.HGR >>build\log
cscript /nologo bin\rsync.js res\title.dhgr\* build\TITLE.DHGR >>build\log cscript /nologo bin\rsync.js res\title.dhgr\* build\TITLE.DHGR >>build\log
cscript /nologo bin\rsync.js res\action.hgr\* build\ACTION.HGR >>build\log cscript /nologo bin\rsync.js res\action.hgr\* build\ACTION.HGR >>build\log