2017-08-08 15:09:27 +00:00
|
|
|
;-------------------------------
|
|
|
|
; #RWTSLOG
|
|
|
|
; Print log messages for RWTS variants
|
|
|
|
; that indicate structural copy protection
|
|
|
|
; but don't require any patches
|
|
|
|
;-------------------------------
|
2021-06-13 17:08:28 +00:00
|
|
|
_rwtslog_start
|
2021-06-14 14:56:40 +00:00
|
|
|
; gTrack = 0 here
|
|
|
|
|
2021-06-16 17:02:29 +00:00
|
|
|
clc
|
|
|
|
bcc @lsr6a_start ; always branches
|
2021-06-13 17:08:28 +00:00
|
|
|
;
|
|
|
|
; Some purely local utility functions here (out of execution path)
|
|
|
|
; to reduce duplicated code
|
|
|
|
;
|
|
|
|
@compare_lsr6a
|
2022-11-29 18:59:13 +00:00
|
|
|
ldy #$09
|
2021-04-08 01:44:09 +00:00
|
|
|
jsr compare
|
2017-08-08 15:09:27 +00:00
|
|
|
!byte $BD,$8C,$C0
|
|
|
|
!byte $10,$FB
|
|
|
|
!byte $4A
|
|
|
|
!byte WILDCARD,$6A
|
2022-11-29 18:59:13 +00:00
|
|
|
!byte $D0
|
|
|
|
rts
|
|
|
|
|
|
|
|
@compare_cmp08
|
|
|
|
ldy #$11
|
|
|
|
jsr compare
|
|
|
|
!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
|
2021-04-08 01:44:09 +00:00
|
|
|
rts
|
2021-06-13 17:08:28 +00:00
|
|
|
|
|
|
|
@compare_bne0
|
|
|
|
ldy #$09
|
|
|
|
jsr compare
|
|
|
|
!byte $BD,$8C,$C0
|
|
|
|
!byte $10,$FB
|
|
|
|
!byte $C9,WILDCARD
|
|
|
|
!byte $D0,$00
|
|
|
|
rts
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RWTS "LSR $6A" identification
|
|
|
|
; disk allows either $D4 or $D5 for the
|
|
|
|
; first address prologue nibble
|
|
|
|
;-------------------------------
|
|
|
|
@lsr6a_start
|
2021-04-08 01:44:09 +00:00
|
|
|
; DOS 3.3 variant
|
2021-06-13 17:08:28 +00:00
|
|
|
lda #$03 ; if T00,S03,$4F ==
|
|
|
|
ldx #$4F
|
|
|
|
jsr @compare_lsr6a
|
|
|
|
bcc @print_lsr6a ; passport-test-suite/The Seasons.woz [C=0] matches
|
|
|
|
|
2017-09-07 13:52:27 +00:00
|
|
|
; RDOS variant
|
2021-06-13 17:08:28 +00:00
|
|
|
ldx #$4D ; or T00,S03,$4D ==
|
|
|
|
jsr @compare_lsr6a
|
|
|
|
bcc @print_lsr6a ; passport-test-suite/Roadwar 2000.woz [C=0] matches
|
|
|
|
|
2022-11-29 18:59:13 +00:00
|
|
|
; ATILA variant
|
|
|
|
lda #$04 ; or T00,S04,$A5 ==
|
|
|
|
ldx #$A5
|
|
|
|
jsr @compare_lsr6a
|
|
|
|
bcc @print_lsr6a ; passport-test-suite/The Treasure of Forest Isle.woz [C=0] matches
|
|
|
|
|
2021-04-08 01:44:09 +00:00
|
|
|
; Pascal variant
|
|
|
|
lda #$0D
|
2022-11-29 18:59:13 +00:00
|
|
|
ldx #$05 ; or T00,S0D,$05 ==
|
2021-06-13 17:08:28 +00:00
|
|
|
jsr @compare_lsr6a
|
|
|
|
bcs @lsr6a_end ; passport-test-suite/GATO v1.3.woz [C=0] matches
|
|
|
|
|
|
|
|
@print_lsr6a
|
2017-08-08 15:09:27 +00:00
|
|
|
jsr PrintByID
|
2021-06-13 02:07:26 +00:00
|
|
|
!byte s_lsr6a
|
2017-08-08 15:09:27 +00:00
|
|
|
inc gPatchCount
|
2021-06-13 17:08:28 +00:00
|
|
|
@lsr6a_end
|
2017-08-08 15:09:27 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RWTS "CMP #$08 / BCS" identification
|
|
|
|
; disk allows either $DE or a timing bit
|
|
|
|
; for the first address epilogue nibble
|
|
|
|
;-------------------------------
|
2017-09-07 13:52:27 +00:00
|
|
|
; DOS 3.3 variant
|
2022-11-29 18:59:13 +00:00
|
|
|
lda #$03 ; if T00,S03,$8B ==
|
2017-08-08 15:09:27 +00:00
|
|
|
ldx #$8B
|
2022-11-29 18:59:13 +00:00
|
|
|
jsr @compare_cmp08
|
2021-06-13 17:08:28 +00:00
|
|
|
bcc @print_bcs08 ; passport-test-suite/The Seasons.woz [C=0] matches
|
|
|
|
|
2017-09-07 13:52:27 +00:00
|
|
|
; RDOS variant
|
|
|
|
ldx #$89
|
|
|
|
ldy #$11
|
2021-06-13 17:08:28 +00:00
|
|
|
jsr compare ; or T00,S03,$89 ==
|
2017-09-07 13:52:27 +00:00
|
|
|
!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
|
2022-11-29 18:59:13 +00:00
|
|
|
bcc @print_bcs08 ; passport-test-suite/Roadwar 2000.woz [C=0] matches
|
|
|
|
|
|
|
|
; ATILA variant
|
|
|
|
lda #$04
|
|
|
|
ldx #$E6 ; or T00,S04,$E6 ==
|
|
|
|
jsr @compare_cmp08
|
|
|
|
bcs @bcs08_end ; passport-test-suite/The Treasure of Forest Isle.woz [C=0] matches
|
2021-06-13 17:08:28 +00:00
|
|
|
|
|
|
|
@print_bcs08
|
2017-08-08 15:09:27 +00:00
|
|
|
jsr PrintByID
|
2021-06-13 02:07:26 +00:00
|
|
|
!byte s_bcs08
|
2017-08-08 15:09:27 +00:00
|
|
|
inc gPatchCount
|
2021-06-13 17:08:28 +00:00
|
|
|
@bcs08_end
|
2017-08-08 15:09:27 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RWTS "CMP / BNE 0" identification
|
|
|
|
; disk allows any value for
|
|
|
|
; for the first address epilogue nibble
|
|
|
|
;-------------------------------
|
2017-09-07 13:52:27 +00:00
|
|
|
; DOS 3.3 variant
|
2021-06-13 17:08:28 +00:00
|
|
|
lda #$03 ; if T00,S03,$8B ==
|
2017-08-08 15:09:27 +00:00
|
|
|
ldx #$8B
|
2021-06-13 17:08:28 +00:00
|
|
|
jsr @compare_bne0
|
|
|
|
bcc @print_bne0 ; passport-test-suite/The Home Accountant.woz [C=0] matches
|
|
|
|
|
2017-09-07 13:52:27 +00:00
|
|
|
; David-DOS variant
|
2021-06-13 17:08:28 +00:00
|
|
|
lda #$05 ; or T00,S05,$8B ==
|
|
|
|
jsr @compare_bne0
|
|
|
|
bcs @bne0_end ; passport-test-suite/Horses.woz [C=0] matches
|
|
|
|
|
|
|
|
@print_bne0
|
2017-08-08 15:09:27 +00:00
|
|
|
jsr PrintByID
|
2021-06-13 02:07:26 +00:00
|
|
|
!byte s_cmpbne0
|
2017-08-08 15:09:27 +00:00
|
|
|
inc gPatchCount
|
2021-06-13 17:08:28 +00:00
|
|
|
@bne0_end
|
2020-07-22 15:38:25 +00:00
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RWTS "CMP / NOP NOP" identification
|
|
|
|
; disk allows any value for
|
|
|
|
; for the second address epilogue nibble
|
|
|
|
;-------------------------------
|
|
|
|
lda #$03
|
|
|
|
ldx #$95
|
|
|
|
ldy #$09
|
2021-06-13 17:08:28 +00:00
|
|
|
jsr compare ; if T00,S03,$95 ==
|
2020-07-22 15:38:25 +00:00
|
|
|
!byte $BD,$8C,$C0
|
|
|
|
!byte $10,$FB
|
|
|
|
!byte $C9,$AA
|
|
|
|
!byte $EA,$EA
|
2023-05-29 00:02:43 +00:00
|
|
|
bcs @cmpnopnop_end ; passport-test-suite/La Guillotine.woz [C=0] matches
|
2020-07-22 15:38:25 +00:00
|
|
|
jsr PrintByID
|
2021-06-13 02:07:26 +00:00
|
|
|
!byte s_cmpnopnop
|
2020-07-22 15:38:25 +00:00
|
|
|
inc gPatchCount
|
2023-05-29 00:02:43 +00:00
|
|
|
@cmpnopnop_end
|
|
|
|
|
|
|
|
;-------------------------------
|
|
|
|
; RWTS "TAY / BIT" identification
|
|
|
|
; disk allows any value for
|
|
|
|
; for address field checksum
|
|
|
|
;-------------------------------
|
|
|
|
lda #$03
|
|
|
|
ldx #$88
|
|
|
|
ldy #$03
|
|
|
|
jsr compare ; if T00,S03,$88 ==
|
|
|
|
!byte $A8
|
|
|
|
!byte $24,$B7
|
|
|
|
bcs _rwtslog_end ; passport-test-suite/E-Z Learner.woz [C=0] matches
|
|
|
|
jsr PrintByID
|
|
|
|
!byte s_anychecksum
|
|
|
|
inc gPatchCount
|
2021-06-13 17:08:28 +00:00
|
|
|
|
|
|
|
_rwtslog_end
|