2017-04-05 01:20:05 +00:00
|
|
|
;-------------------------------
|
|
|
|
; IDMilliken
|
|
|
|
; identify Milliken protection routine
|
|
|
|
; in late-stage boot
|
|
|
|
;
|
|
|
|
; in: $B600..$BFFF contains RWTS that can read this disk
|
|
|
|
; $B747..$B749 contains "JMP $9B03"
|
|
|
|
; out: C clear if Milliken protection routine found
|
|
|
|
; C set otherwise
|
|
|
|
; all registers clobbered
|
|
|
|
; all other flags clobbered
|
|
|
|
;-------------------------------
|
|
|
|
!zone {
|
|
|
|
IDMilliken
|
|
|
|
; protection routine starts on T00,S0A (by this point we've
|
|
|
|
; already identified a marker on T00,S01 that strongly
|
|
|
|
; suggests the presence of this routine, so it's worth
|
|
|
|
; doing an extra disk read here to be sure)
|
2021-04-19 14:19:57 +00:00
|
|
|
ldx #$00
|
|
|
|
ldy #$0A
|
|
|
|
tya
|
2017-04-05 01:20:05 +00:00
|
|
|
clc
|
|
|
|
adc #BASEPAGE
|
|
|
|
sta gAddress+1
|
2021-04-19 14:19:57 +00:00
|
|
|
jsr ReadSectorXY
|
2017-04-05 01:20:05 +00:00
|
|
|
bcs .exit
|
|
|
|
|
|
|
|
IDMilliken1
|
|
|
|
; variant 1 (seen in Gulp and Frenzy, Tangram Puzzler)
|
|
|
|
lda #$0A
|
|
|
|
ldx #$03
|
|
|
|
ldy #$0E
|
|
|
|
jsr compare
|
|
|
|
!byte $A9,$AE,$8D,$00,$04,$4C,$99,$AD
|
|
|
|
!byte $AE,$F8,$05,$BD,$89,$C0
|
2019-05-07 01:24:29 +00:00
|
|
|
bcs + ; passport-test-suite/Tangram Puzzler.woz [C=0] matches
|
2017-11-09 05:47:12 +00:00
|
|
|
lda #TRUE
|
|
|
|
sta gIsMilliken1
|
2017-04-05 01:20:05 +00:00
|
|
|
bcc .exit
|
|
|
|
|
2017-11-09 05:47:12 +00:00
|
|
|
+
|
2017-04-05 01:20:05 +00:00
|
|
|
; variant 2 (seen in The Writing Workshop)
|
|
|
|
ldy #$0B
|
|
|
|
jsr compare
|
|
|
|
!byte $A9,$AE,$8D,$00,$04,$AE,$F8,$05
|
|
|
|
!byte $BD,$89,$C0
|
|
|
|
|
|
|
|
.exit
|
|
|
|
rts
|
|
|
|
}
|