mirror of
https://github.com/a2-4am/passport.git
synced 2024-09-29 15:54:59 +00:00
93 lines
2.8 KiB
Plaintext
93 lines
2.8 KiB
Plaintext
;-------------------------------
|
|
; #Advent
|
|
; patched RWTS
|
|
;
|
|
; Borrowed Time
|
|
; Mindshadow
|
|
; Tracer Sanction
|
|
;
|
|
; module by qkumba
|
|
;-------------------------------
|
|
!zone {
|
|
lda gIsAdvent
|
|
beq +
|
|
.jmpexit
|
|
jmp .exit
|
|
|
|
+
|
|
;carry controls how many times to run on one track
|
|
;Mindshadow and Tracer Sanction have two copies
|
|
;of the protection on track 0, loaded to two
|
|
;different addresses at different stages of play
|
|
|
|
lda gTrack
|
|
cmp #1
|
|
.again php
|
|
ldy #29
|
|
jsr SearchTrack
|
|
!byte $F0,$10 ;BEQ $+12
|
|
!byte $29,$0F ;AND #$0F
|
|
!byte $A8 ;TAY
|
|
!byte $B9,WILDCARD,WILDCARD ;LDA $xxxx,Y
|
|
!byte $8D,WILDCARD,WILDCARD ;STA $xxxx
|
|
!byte $B9,WILDCARD,WILDCARD ;LDA $xxxx,Y
|
|
!byte $8D,WILDCARD,WILDCARD ;STA $xxxx
|
|
!byte $60 ;RTS
|
|
!byte $A9,$AA ;LDA #$AA
|
|
!byte $8D,WILDCARD,WILDCARD ;STA $xxxx
|
|
!byte $A9,$96 ;LDA #$96
|
|
!byte $8D,WILDCARD,WILDCARD ;STA $xxxx
|
|
!byte $60 ;RTS
|
|
bcs .pop ; passport-test-suite/Borrowed Time.woz [C=0] matches
|
|
ldy #1 ; passport-test-suite/Mindshadow.woz [C=0] matches
|
|
jsr modify ; passport-test-suite/The Tracer Sanction.woz [C=0] matches
|
|
!byte $10 ;BEQ -> BPL
|
|
ldy #23
|
|
jsr SearchTrack
|
|
!byte $A4,WILDCARD ;LDY $xx
|
|
!byte $BD,$8C,$C0 ;LDA $C08C,X
|
|
!byte $10,$FB ;BPL $-3
|
|
!byte $D9,WILDCARD,WILDCARD ;CMP $xxxx,Y
|
|
!byte $D0,$AB ;BNE $-53
|
|
!byte $EA ;NOP
|
|
!byte $BD,$8C,$C0 ;LDA $C08C,X
|
|
!byte $10,$FB ;BPL $-3
|
|
!byte $D9,WILDCARD,WILDCARD ;CMP $xxxx,Y
|
|
!byte $D0,$A0 ;BNE $-5E
|
|
bcs .pop
|
|
pha
|
|
txa
|
|
adc #7
|
|
tax
|
|
pla
|
|
adc #0
|
|
pha
|
|
txa
|
|
adc #11
|
|
sta .patch+1
|
|
pla
|
|
tay
|
|
adc #0
|
|
pha
|
|
tya
|
|
ldy #3
|
|
jsr modify
|
|
!byte $C9,$DE ;CMP #$DE
|
|
!byte $EA ;NOP
|
|
pla
|
|
.patch
|
|
ldx #0
|
|
ldy #3 ; passport-test-suite/Borrowed Time.woz [Z=1] reaches here
|
|
jsr modify
|
|
!byte $C9,$AA ;CMP #$AA
|
|
!byte $EA ;NOP
|
|
plp
|
|
bcs .exit
|
|
sec ; passport-test-suite/Mindshadow.woz [C=0] reaches here
|
|
bcs .again ; passport-test-suite/The Tracer Sanction.woz [C=1] reaches here
|
|
|
|
.pop
|
|
plp
|
|
.exit
|
|
}
|