add support for MicroLearn protection [fixes U.S. Constitution Tutor]

This commit is contained in:
4am 2022-08-04 21:53:10 -04:00
parent 26215423bf
commit b5cdad368b
6 changed files with 105 additions and 1 deletions

View File

@ -334,6 +334,37 @@ TraceDOS33c ; 2nd-level trace callback is here
jsr $BC61
.notFun
;
; Check for Micro Learn RWTS
; (uses per-disk zero page values within RWTS)
;
lda MaybeB7
cmp #$B7
bne .notLearn
ldx #$38
ldy #$08
jsr CompareMemory
!byte $A9,WILDCARD
!byte $85,$31
!byte $A9,WILDCARD
!byte $85,$D6
bcs .notLearn ; passport-test-suite/U.S. Constitution Tutor.woz [C=0] matches
lda #$C9
sta $B8E6
sta $B8F0
sta $B934
sta $B954
sta $B95E
sta $B990
lda $B739
sta $B8F1
sta $B955
sta $B991
lda $B73D
sta $B8E7
sta $B935
sta $B95F
.notLearn
;
; Check for alternate RWTS entry point (e.g. Swordthrust)
;
lda MaybeB7

View File

@ -62,6 +62,7 @@ AnalyzeT00
!source "../patchers/t00_methods.a"
!source "../patchers/t00_microfun.a"
!source "../patchers/t00_microfun2.a"
!source "../patchers/t00_microlearn.a"
!source "../patchers/t00_milliken.a"
!source "../patchers/t00_muserwts.a"
!source "../patchers/t00_panglosdos.a"

View File

@ -379,6 +379,7 @@ AnalyzeTrack
+
!source "patchers/hallabs.a" ; gIsBoot0 && T01 only
!source "patchers/harvey.a" ; gIsBoot0 && T01 only
!source "patchers/microlearn.a" ; gIsBoot0 && T01 only
!source "patchers/jmpb400.a" ; gIsBoot0 && T02 only
!source "patchers/jmpb412.a" ; gIsBoot0 && T02 only
!source "patchers/mak.a" ; gIsBoot0 && T02 only

30
src/patchers/microlearn.a Normal file
View File

@ -0,0 +1,30 @@
;-------------------------------
; #MICROLEARN
; protection check that writes
; its own protection track on
; first boot
;
;-------------------------------
!zone {
lda gTrack
cmp #$01
bne .exit
lda #$00
ldx #$84
jsr compare3
!byte $4C,$8E,$AE
bcs .exit
sta gDisplayBytes
ldy #$AE
sty gDisplayBytes+1 ; address (hi)
ldy #$8E
sty gDisplayBytes+2 ; address (lo)
jsr PrintByID
!byte s_beforedos
jsr modify3
!byte $AD,$E9,$B7
.exit
}

View File

@ -0,0 +1,41 @@
;-------------------------------
; #MICROLEARN
; RWTS uses per-disk values in
; zero page
;
; tested on
; - U.S. Constitution Tutor
; - SAT English 1
;-------------------------------
!zone {
; gTrack = 0
; Caller found DOS 3.3 RWTS
lda #$02
ldx #$E6
jsr compare2
!byte $C5,$D6
bcs +
jsr modify2
!byte $C9,$D5
+ ldx #$F0
jsr compare2
!byte $C5,$31
bcs +
jsr modify2
!byte $C9,$AA
+ lda #$03
ldx #$54
jsr compare2
!byte $C5,$31
bcs +
jsr modify2
!byte $C9,$D5
+ ldx #$5E
jsr compare2
!byte $C5,$D6
bcs +
jsr modify2
!byte $C9,$AA
+
}

View File

@ -373,7 +373,7 @@ StringTableHigh ; must be kept in sync with constants in enid.a
.passport
!text "Passport ",$00
.header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2022-07-12",$00
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2022-08-04",$00
.bar9
!text "_________",$00
.bar18