passport/src/patchers/rwtslog.a

147 lines
3.9 KiB
Plaintext

;-------------------------------
; #RWTSLOG
; Print log messages for RWTS variants
; that indicate structural copy protection
; but don't require any patches
;-------------------------------
!zone {
;-------------------------------
; RWTS "LSR $6A" identification
; disk allows either $D4 or $D5 for the
; first address prologue nibble
;-------------------------------
bit gMode ; nothing to do here in verify mode
bmi +
jmp .exit
-
ldy #$0A
jsr compare
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $4A
!byte WILDCARD,$6A
!byte $D0,$EF
rts
+
; DOS 3.3 variant
lda #$03
sta gDisplayBytes
ldx #$4F ; T00,S03,$4F
jsr -
bcc .yeslsr ; passport-test-suite/The Seasons.woz [C=0] matches
; RDOS variant
ldx #$4D ; T00,S03,$4D
jsr -
bcc .yeslsr ; passport-test-suite/Roadwar 2000.woz [C=0] matches
; Pascal variant
lda #$0D
sta gDisplayBytes
ldx #$05 ; T00,S0D,$05
jsr -
bcs .endlsr ; passport-test-suite/GATO v1.3.woz [C=0] matches
.yeslsr
lda #s_lsr6a
jsr PrintByID
inc gPatchCount
.endlsr
;-------------------------------
; RWTS "CMP #$08 / BCS" identification
; disk allows either $DE or a timing bit
; for the first address epilogue nibble
;-------------------------------
; DOS 3.3 variant
lda #$03
sta gDisplayBytes
ldx #$8B
ldy #$15
jsr compare ; if T00,S03,$8B ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9,$DE
!byte $F0,$0A
!byte $48
!byte $68
!byte $BD,$8C,$C0
!byte $C9,$08
!byte $B0,$A5
!byte $EA
!byte $18
!byte $60
bcc .yesbcs ; passport-test-suite/The Seasons.woz [C=0] matches
; RDOS variant
ldx #$89
ldy #$11
jsr compare ; or T00,S03,$89 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9,$DE
!byte $F0,$09
!byte $48
!byte $68
!byte $BD,$8C,$C0
!byte $C9,$80
!byte $B0
bcs .endbcs ; passport-test-suite/Roadwar 2000.woz [C=0] matches
.yesbcs
lda #s_bcs08
jsr PrintByID
inc gPatchCount
.endbcs
;-------------------------------
; RWTS "CMP / BNE 0" identification
; disk allows any value for
; for the first address epilogue nibble
;-------------------------------
; DOS 3.3 variant
lda #$03
sta gDisplayBytes
ldx #$8B
ldy #$09
jsr compare ; if T00,S03,$8B ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9,WILDCARD
!byte $D0,$00
bcc .yesbne0 ; passport-test-suite/The Home Accountant.woz [C=0] matches
; David-DOS variant
lda #$05
sta gDisplayBytes
ldx #$8B
ldy #$09
jsr compare ; or T00,S05,$8B ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9,WILDCARD
!byte $D0,$00
bcs .endbne0 ; passport-test-suite/Horses.woz [C=0] matches
.yesbne0
lda #s_cmpbne0
jsr PrintByID
inc gPatchCount
.endbne0
;-------------------------------
; RWTS "CMP / NOP NOP" identification
; disk allows any value for
; for the second address epilogue nibble
;-------------------------------
lda #$03
sta gDisplayBytes
ldx #$95
ldy #$09
jsr compare ; if T00,S03,$95 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9,$AA
!byte $EA,$EA
bcs .endnopnop ; passport-test-suite/La Guillotine.woz [C=0] matches
lda #s_cmpnopnop
jsr PrintByID
inc gPatchCount
.endnopnop
.exit
}