diff --git a/Makefile b/Makefile index 86dca7b2f..37005b7ff 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ dsk: md asm cp res/_FileInformation.txt build/ >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log cp res/prefs.conf build/PREFS.CONF >>build/log + cp res/credits.txt build/CREDITS >>build/log bin/padto 512 build/PREFS.CONF $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/TITLE" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER" >>build/log @@ -92,6 +93,7 @@ dsk: md asm $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/FX.CONF" >>build/log $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/DFX.CONF" >>build/log + $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/CREDITS" >>build/log rsync -aP res/title.hgr/* build/TITLE.HGR >>build/log bin/buildfileinfo.py build/TITLE.HGR "06" "4000" >>build/log $(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/TITLE.HGR" "build/TITLE.HGR" >>build/log diff --git a/res/_FileInformation.txt b/res/_FileInformation.txt index ace0356de..b0ba01ad8 100644 --- a/res/_FileInformation.txt +++ b/res/_FileInformation.txt @@ -7,3 +7,4 @@ FX.CONF=Type(04),AuxType(8000),Access(C3) DFX.CONF=Type(04),AuxType(8000),Access(C3) COVER=Type(06),AuxType(2000),Access(C3) TITLE=Type(06),AuxType(2000),Access(C3) +CREDITS=Type(04),AuxType(8000),Access(C3) diff --git a/res/credits.txt b/res/credits.txt new file mode 100644 index 000000000..3c6b3d0ac --- /dev/null +++ b/res/credits.txt @@ -0,0 +1 @@ + T O T A L R E P L A Y ~ revision 01 / serial number 190720 ~ design & interface * * * * * * * * * 4am ports & rwts * * * * * * * * * * *qkumba testing & moral support* * * * * crayone testing w/o moral support* * * * option8 ~ https://archive.org/TotalReplay [eof] \ No newline at end of file diff --git a/src/4cade.a b/src/4cade.a index 62f8faecc..02f2f36f1 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -66,6 +66,7 @@ RestoreStackNextTime ; these routines will only be called after relocating to language card !source "src/ui.search.mode.a" !source "src/ui.browse.mode.a" + !source "src/ui.credits.a" !source "src/ui.attract.mode.a" !source "src/ui.attract.hgr.a" !source "src/ui.attract.dhgr.a" diff --git a/src/constants.a b/src/constants.a index 267d5ac16..3fe26374a 100644 --- a/src/constants.a +++ b/src/constants.a @@ -9,7 +9,7 @@ ; D000..E200 - persistent data structures (gGlobalPrefsStore, gGamesListStore) ; ...end of data and start of code are approximate, in between is unused... ; ...if they ever overlap, things will go boom... -; E900..FFFB - main program code +; E600..FFFB - main program code ; FFFC..FFFF - reset and other vectors ; ; LC RAM BANK 2 diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index 69b57ea9c..8574231bd 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.a @@ -57,6 +57,14 @@ BrowseMode ldx #kBrowseTab bne @BrowseDispatch ; always branches + + cmp #$BF ; '?' display scredits + bne + +- ldx #kBrowseCredits + bne @BrowseDispatch ; always branches ++ + cmp #$AF ; '/' also displays credits + beq - + and #$7F ; strip high bit for search characters jsr IsSearchKey beq + @@ -174,6 +182,7 @@ kBrowseNext = 2 kBrowseExitToSearch = 3 kBrowseTab = 4 kBrowseLaunch = 5 +kBrowseCredits = 6 .BrowseDispatchTable !word .OnSearch @@ -182,6 +191,7 @@ kBrowseLaunch = 5 !word SearchMode !word .OnTab !word .OnLaunch + !word Credits BrowseSelectedIndex !byte $FF diff --git a/src/ui.common.a b/src/ui.common.a index 9b440cb45..e0f8bbbc3 100644 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -9,6 +9,7 @@ ; - LoadTitleOffscreen ; - LoadCoverOffscreen ; - DrawSearchBarOffscreen +; - ClearOffscreen ; - ShowOtherPage ; - ToggleOffscreenPage ; - CoverFade @@ -301,11 +302,15 @@ ExecuteTransitionAndWait ; Y = 0 ; Z = 1 ;------------------------------------------------------------------------------ +ClearOffscreen + jsr GetOffscreenAddress + +HIDE_NEXT_2_BYTES .ClearHGR1 + lda #$20 + sta @a+2 ldx #$20 - stx @a+2 - lda #0 - tay + lda #$80 + ldy #0 @a sta $2000,y iny bne @a diff --git a/src/ui.credits.a b/src/ui.credits.a new file mode 100644 index 000000000..f8bd8208d --- /dev/null +++ b/src/ui.credits.a @@ -0,0 +1,92 @@ +;license:MIT +;(c) 2018-9 by 4am +; +; credits page +; +; Public functions +; - Credits + +!zone { + +Credits +; clobbers all + jsr .LoadCredits + jsr ClearOffscreen + lda OffscreenPage + ror ; draw on offscreen page + +LDADDR $8000 + jsr .DrawPage + jsr ShowOtherPage + jsr WaitForKeyFor30Seconds + jsr ShowOtherPage + bit CLEARKBD + clc + rts + +.LoadCredits +; [private] clobbers all + +LDADDR .CreditsFile ++ + jsr SetPath + jsr LoadFile ; loads at $8000 + rts +.CreditsFile + !byte 7 + !text "CREDITS" + +.DrawPage +; A/Y contains address of character buffer +; carry bit clear -> draw on page 1 +; carry bit set -> draw on page 2 +; drawing starts at VTAB 0, HTAB 0 +; clobbers PTR +; clobbers A/X/Y +; preserves all flags, by a quirk of implementation + php + ldx #0 + stx VTAB + +STAY PTR +@drawLine + ldy #0 + sty HTAB +@parseLine + lda (PTR),y + cmp #$5B ; '[' at beginning on line + bne + ; ends the parsing + tya + 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 ++ iny + bne @parseLine +@doneParsingLine + sty SAVE + cpy #0 + beq @skip + ldx SAVE + +LDAY PTR + plp + php + jsr DrawBuffer +@skip inc SAVE ; skip carriage return + lda SAVE ; advance PTR to start of next line + clc + adc PTR + sta PTR + bcc + + inc PTR+1 ++ inc VTAB ; this will print 255 lines if you give it + bne @drawLine ; 255 lines, so don't do that +@donePage + plp + rts + +} diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index b6280cc61..68362447d 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -74,6 +74,15 @@ SearchMode ldx #kInputTab bne @InputDispatch ; always branches + + + cmp #$BF ; '?' display scredits + bne + +- ldx #kInputCredits + bne @InputDispatch ; always branches ++ + cmp #$AF ; '/' also displays credits + beq - + and #$7F ; strip high bit for search characters jsr IsSearchKey beq + @@ -291,6 +300,7 @@ kInputBack = 2 kInputBrowse = 3 kInputTab = 4 kInputLaunch = 5 +kInputCredits = 6 .InputDispatchTable !word .OnSearch @@ -299,5 +309,6 @@ kInputLaunch = 5 !word BrowseMode !word .OnTab !word .OnLaunch + !word Credits }