passport/src/patchers/c9ff.a
2021-06-21 10:33:16 -04:00

42 lines
1.2 KiB
Plaintext

;-------------------------------
; #C9FF
; a custom RWTS-like routine to
; position the disk for an E7
; protection check
;
; tested on
; Bank Street Writer II
; Fact and Fiction Toolkit
; Mr. Pixel's Cartoon Kit
; Mr. Pixel's Programming Paint Set
; Story Maker
; Swiss Family Robinson
;-------------------------------
!zone {
ldy #$1A
jsr SearchTrack
!byte $A8 ; TAY
!byte $D0,$15 ; BNE +$15
!byte $BD,$8C,$C0; LDA $C08C,X
!byte $10,$FB ; BPL -$FB
!byte $C9,$FF ; CMP #$FF
!byte $D0,$0C ; BNE +$0C
!byte $EA ; NOP
!byte $BD,$8C,$C0; LDA $C08C,X
!byte $10,$FB ; BPL -$FB
!byte $C9,$FF ; CMP #$FF
!byte $D0,$02 ; BNE +$02
!byte $18 ; CLC
!byte $60 ; RTS
!byte $38 ; SEC
!byte $60 ; RTS
bcs .exit ; passport-test-suite/Mr. Pixel's Programming Paint Set.woz [C=0] matches
jsr inx9
jsr modify1
!byte $DE
jsr inx0A
jsr modify1
!byte $AA
.exit
}