passport/src/patchers/d5d5f7.a

59 lines
1.8 KiB
Plaintext
Executable File

;-------------------------------
; #D5D5F7
; nibble count with weird bitstream
; involving $D5 and $F7 as delimiters
;
; Ace Detective (Mindplay)
; Cat 'n Mouse (Mindplay)
; Cotton Tales (Mindplay)
; Dyno-Quest (Mindplay)
; Easy Street (Mindplay)
; Fraction-oids (Mindplay)
; Math Magic (Mindplay)
; RoboMath (Mindplay)
; NoteCard Maker (Pascal variant)
; Les Sports (DC Heath) - variant wrapped by PHA/PLAs
;-------------------------------
!zone {
;
; always run on Pascal disks
;
lda gIsPascal
;
; if DOS 3.3-shaped bootloader, only run if we found
; specific markers on T00,S00 earlier that are shared
; by all the samples I have that use this protection.
; (This filter is subject to revision if we find
; additional samples.)
;
and gPossibleD5D5F7
bne .exit
ldy #$20
jsr SearchTrack
!byte $BD,$8C,$C0; LDA $C08C,X
!byte $10,$FB ; BPL -$FB
!byte $48 ; PHA
!byte $68 ; PLA
!byte $C9,$D5 ; CMP #$D5
!byte $D0,$F5 ; BNE -$F5
!byte $A0,$00 ; LDY #00
!byte $8C,WILDCARD,WILDCARD; STY $xxxx
!byte $BD,$8C,$C0; LDA $C08C,X
!byte $10,$FB ; BPL -$FB
!byte $C9,$D5 ; CMP #$D5
!byte $F0,$0F ; BEQ +$0F
!byte $C9,$F7 ; CMP #$F7
!byte $D0,$01 ; BNE +$01
!byte $C8 ; INY
!byte $18 ; CLC
!byte $6D ; ADC
bcs .exit ; passport-test-suite/Cotton Tales.woz [C=0] matches
; passport-test-suite/Notecard Maker.woz [C=0] matches
jsr PrintByID
!byte s_d5d5f7
jsr modify3
!byte $18 ; CLC
!byte $90,$62 ; BCC +$62
.exit
}