diff --git a/Makefile b/Makefile index 835d8a1ca..c9631ae91 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/res/HELP b/res/HELP index c17d2a615..cea01e0a9 100644 Binary files a/res/HELP and b/res/HELP differ diff --git a/res/_FileInformation.txt b/res/_FileInformation.txt index 375ba3e8b..b4475aac5 100644 --- a/res/_FileInformation.txt +++ b/res/_FileInformation.txt @@ -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) diff --git a/res/attic/transfer.dsk b/res/attic/transfer.dsk index 83868f9f5..d7fe872c2 100644 Binary files a/res/attic/transfer.dsk and b/res/attic/transfer.dsk differ diff --git a/res/help.txt b/res/help.txt new file mode 100644 index 000000000..a9a02fa95 --- /dev/null +++ b/res/help.txt @@ -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] \ No newline at end of file diff --git a/src/prodos.path.a b/src/prodos.path.a index cf7a59724..7d07cf7f9 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -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" diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index 683f4d0c3..eb313be82 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.a @@ -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 diff --git a/src/ui.credits.a b/src/ui.credits.a index 4bf022fd9..0cbb5b0e4 100644 --- a/src/ui.credits.a +++ b/src/ui.credits.a @@ -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 diff --git a/src/ui.font.lc2.a b/src/ui.font.lc2.a index 0dac4ab16..85e873479 100644 --- a/src/ui.font.lc2.a +++ b/src/ui.font.lc2.a @@ -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 diff --git a/src/ui.offscreen.a b/src/ui.offscreen.a index 3e58df17a..fd9120fdd 100644 --- a/src/ui.offscreen.a +++ b/src/ui.offscreen.a @@ -57,7 +57,7 @@ LoadTitleOffscreen ; out: all flags and registers clobbered ;------------------------------------------------------------------------------ LoadHelpOffscreen - lda #>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