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
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/help.txt build/HELPTEXT >>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
bin/buildfileinfo.sh build/TITLE.HGR "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)
HELP=Type(06),AuxType(2000),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
!raw "CREDITS"
kHelpFile
kHelpBackgroundFile
!byte 4
!raw "HELP"
kHelpTextFile
!byte 8
!raw "HELPTEXT"
kTitleFile
!byte 5
!raw "TITLE"

View File

@ -145,7 +145,7 @@ BrowseDispatchTableHi
kNumBrowseKeys = 12 ; number of entries in next 2 tables (each)
BrowseKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $A6 ; '&' = credits
!byte $81 ; Ctrl-A = about
!byte $AF ; '/' = help
!byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode

View File

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

View File

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

View File

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

View File

@ -46,7 +46,7 @@ InputDispatchTableHi
kNumInputKeys = 10 ; number of entries in next 2 tables (each)
InputKeys
!byte $83 ; Ctrl-C = toggle cheat mode
!byte $A6 ; '&' = credits
!byte $81 ; Ctrl-A = about
!byte $AF ; '/' = help
!byte $BF ; '?' = help
!byte $A0 ; Space = mini attract mode

View File

@ -44,12 +44,14 @@ call :asm
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "build\LAUNCHER.SYSTEM" >>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\help.txt build\HELPTEXT >>build\log
cscript /nologo bin\padto.js 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
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\HELPTEXT" >>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\action.hgr\* build\ACTION.HGR >>build\log