From a74cc9b78aed4cacc7b681dcd7b890c33270f74c Mon Sep 17 00:00:00 2001 From: 4am Date: Tue, 1 Aug 2017 19:42:11 -0400 Subject: [PATCH] add support for protection check in MEMORY.CONFIG pre-startup program --- src/passport.a | 1 + src/patchers/memory.config.a | 41 ++++++++++++++++++++++++++++++++++++ src/strings/en.a | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/patchers/memory.config.a diff --git a/src/passport.a b/src/passport.a index d138b92..921fbfe 100755 --- a/src/passport.a +++ b/src/passport.a @@ -705,6 +705,7 @@ _applyToAll !source "patchers/prodos6a.a" ; gIsProDOS only !source "patchers/prodosmecc.a" ; gIsProDOS only !source "patchers/bbf9.a" ; gIsProDOS only + !source "patchers/memory.config.a" ; gIsProDOS only !source "patchers/rwtsswapmecc.a" ; gIsMECCFastloader only !source "patchers/protecteddos.a" ; gIsProtDOS only !source "patchers/fbff.a" diff --git a/src/patchers/memory.config.a b/src/patchers/memory.config.a new file mode 100644 index 0000000..a3aabe5 --- /dev/null +++ b/src/patchers/memory.config.a @@ -0,0 +1,41 @@ +;------------------------------- +; #MEMORYCONFIG +; modified PRODOS launches MEMORY.CONFIG +; as startup program, which executes a +; protection check before launching the +; real startup program +; +; tested on +; What Makes A Dinosaur Sore (1987, DC Heath) +; Squeegee Learns About Drugs (1989, Marshware) +; The Botanist's Apprentice (1989, National Geographic Society) +; Journey to the Age of the Dinosaurs (1990, National Geographic Society) +;------------------------------- +!zone { + lda gIsProDOS ; only if ProDOS + bne .exit + lda #$0F + sta .sector+1 +.sector lda #$FF ; modified at runtime + sta gDisplayBytes + ldx #$33 + ldy #$10 + jsr compare + !byte $4C,$00,$10; JMP $1000 + !byte $A9,$00 ; LDA #$00 + !byte $85,$04 ; STA $04 + !byte $AE,$30,$BF; LDX $BF30 + !byte $BD,$89,$C0; LDA $C089,X + !byte $BD,$8E,$C0; LDA $C08E,X + bcs + + lda #s_runhello + jsr PrintByID + lda gDisplayBytes + ldx #$36 + ldy #$01 + jsr modify + !byte $60 ++ dec .sector+1 + bpl .sector +.exit +} diff --git a/src/strings/en.a b/src/strings/en.a index 64d168c..f6ee5a6 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -220,7 +220,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2017-07-22",00 + !text "Passport by 4am 2017-08-01",00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " "