add bootcounter.a for MECC limited backup disks

This commit is contained in:
4am 2017-03-26 15:33:22 -04:00
parent c968187234
commit 694310521c
3 changed files with 39 additions and 2 deletions

View File

@ -707,6 +707,7 @@ _applyToAll
!source "patchers/ea.a"
!source "patchers/gamco.a"
!source "patchers/optimum.a"
!source "patchers/bootcounter.a"
lda gPatchCount
beq .nopatches

View File

@ -0,0 +1,31 @@
;-------------------------------
; #BOOTCOUNTER
; MECC "limited backup" disks
; contain code to self-destruct
; after a certain number of boots
;-------------------------------
!zone {
_bootcounter
lda gTrack
cmp #$01
bne .exit
lda #$00
ldx #$00
ldy #$23
jsr compare ; if T01,S00,$00 !=
!byte $AD,$F3,$03,$8D,$F4,$03,$20,$2F
!byte $FB,$20,$93,$FE,$20,$89,$FE,$20
!byte $58,$FC,$A9,$0A,$85,$25,$2C,WILDCARD
!byte WILDCARD,$CE,$17,$18,$D0,$05,$A9,$80
!byte $8D,$18,$18
bcs .exit
sta gDisplayBytes
pha
lda #s_bootcounter
jsr PrintByID
pla
ldy #$03
jsr modify ; then set T01,S00,$00 =
!byte $4C,$03,$1B
.exit
}

View File

@ -89,7 +89,8 @@ s_eab0 = $46
s_eatrk6 = $47
s_eeef = $48
s_poke = $49
STRINGCOUNT = $4A
s_bootcounter = $4A
STRINGCOUNT = $4B
!zone {
StringTable
@ -167,6 +168,7 @@ StringTable
!word .eatrk6
!word .eeef
!word .poke
!word .bootcounter
;
; Text can contain substitution strings, which
; are replaced by current values at runtime. Each
@ -192,7 +194,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2017-03-08",00
!text "Passport by 4am 2017-03-26",00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "
@ -427,4 +429,7 @@ StringTable
.poke
!text "T%t,S%0 BASIC program POKEs protection",$8D
!text "check into memory and CALLs it.",$8D,$00
.bootcounter
!text "T%t,S%0 Original disk destroys itself",$8D
!text "after a limited number of boots.",$8D,$00
}