passport/src/patchers/jmp2012.a
2021-06-21 11:57:02 -04:00

39 lines
1018 B
Plaintext

;-------------------------------
; #JMP2012
; Boot1 jumps to $B3C3 to read
; and decrypt a nibble check at
; $2012, which exits via $9D84
; if successful
; seems to be a variant of JMPB412
; with tighter code
;
; tested on
; - BackAid - The Start Disk (1987, BrainBank's Be Better Series)
;-------------------------------
!zone {
lda gTrack
cmp #$02
bne .exit
lda #$00
ldx #$E5
ldy #$06
jsr compare ; if T02,S00,$E8 ==
!byte $99,$12,$20; STA $2012,Y
!byte $C8 ; INY
!byte $D0,$F5 ; BNE -
bcs .exit ; passport-test-suite/BackAid.woz [C=0] matches
ldy #$20
sty gDisplayBytes+1 ; address (hi)
ldy #$12
sty gDisplayBytes+2 ; address (lo)
jsr PrintByID
!byte s_beforedos
ldx #$EC
jsr modify2 ; then set T02,S00,$EC =
!byte $84,$9D
.exit
}