add support for protection check in MEMORY.CONFIG pre-startup program

This commit is contained in:
4am 2017-08-01 19:42:11 -04:00
parent 309a09c385
commit a74cc9b78a
3 changed files with 43 additions and 1 deletions

View File

@ -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"

View File

@ -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
}

View File

@ -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 " "