mirror of
https://github.com/a2-4am/passport.git
synced 2025-01-02 01:30:44 +00:00
support new King's Quest protection (#97)
This commit is contained in:
parent
2ec1105c5f
commit
3a2a4c0c4f
@ -314,76 +314,85 @@
|
|||||||
|
|
||||||
;two of these are on the same track
|
;two of these are on the same track
|
||||||
|
|
||||||
++ ldy #17
|
++ ldy #10
|
||||||
jsr SearchTrack
|
jsr SearchTrack
|
||||||
!byte $A5,$12 ;LDA $12
|
!byte $F0,$08 ;BEQ *+10
|
||||||
!byte $C9,$FC ;CMP #$FC
|
!byte $A9,$00 ;LDA #$00
|
||||||
!byte $D0,$06 ;BNE *+8
|
!byte $AA ;TAX
|
||||||
!byte $A5,$13 ;LDA $13
|
!byte $95,$00 ;STA $00,X
|
||||||
!byte $C9,$D5 ;CMP #$D5
|
!byte WILDCARD ;INX or DEX
|
||||||
!byte $F0,$08 ;BEQ *+10
|
!byte $D0,$FB ;BNE *-5
|
||||||
!byte $A9,$00 ;LDA #$00
|
|
||||||
!byte $AA ;TAX
|
|
||||||
!byte $95,$00 ;STA $00,X
|
|
||||||
bcs +
|
bcs +
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes
|
||||||
pha
|
pha
|
||||||
lda #s_tamper
|
lda #s_tamper
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
txa
|
txa
|
||||||
adc #9
|
adc #5
|
||||||
tax
|
tax
|
||||||
pla
|
pla
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr modify
|
jsr modify
|
||||||
!byte $DD ;checksum
|
!byte $B5 ;load instead of store
|
||||||
sta .patchstyle
|
|
||||||
ldy #11
|
|
||||||
jsr SearchTrack
|
|
||||||
!byte $A5,$12 ;LDA $12
|
|
||||||
!byte $C9,$F9 ;CMP #$F9
|
|
||||||
!byte $F0,$08 ;BEQ *+10
|
|
||||||
!byte $A9,$00 ;LDA #$00
|
|
||||||
!byte $AA ;TAX
|
|
||||||
!byte $95,$00 ;STA $00,X
|
|
||||||
+ bcs +
|
|
||||||
sta gDisplayBytes
|
|
||||||
pha
|
|
||||||
lda #s_tamper
|
|
||||||
jsr PrintByID
|
|
||||||
pla
|
|
||||||
inx
|
|
||||||
inx
|
|
||||||
inx
|
|
||||||
ldy #$01
|
|
||||||
jsr modify
|
|
||||||
!byte $F8 ;checksum
|
|
||||||
bvc .jmpexit
|
|
||||||
|
|
||||||
+ ldy #19
|
ldy #24
|
||||||
jsr SearchTrack
|
jsr SearchTrack
|
||||||
!byte $A5,$12 ;LDA $12
|
!byte $AD,WILDCARD,WILDCARD ;LDA $xxxx
|
||||||
!byte $C9,$1B ;CMP #$1B
|
!byte $CD,WILDCARD,WILDCARD ;CMP $xxxx
|
||||||
!byte $D0,$07 ;BNE *+9
|
!byte $D0,$40 ;BNE *+$42
|
||||||
!byte $A5,$13 ;LDA $13
|
!byte $AD,WILDCARD,WILDCARD ;LDA $xxxx
|
||||||
!byte $C9,$37 ;CMP #$37
|
!byte $CD,WILDCARD,WILDCARD ;CMP $xxxx
|
||||||
!byte $D0,$01 ;BNE *+3
|
!byte $D0,$38 ;BNE *+$3A
|
||||||
!byte $60 ;RTS
|
!byte $AD,WILDCARD,WILDCARD ;LDA $xxxx
|
||||||
!byte $A9,$00 ;LDA #$00
|
!byte $CD,WILDCARD,WILDCARD ;CMP $xxxx
|
||||||
!byte $AA ;TAX
|
!byte $D0,$30 ;BNE *+$32
|
||||||
!byte $9D,$00,$01 ;STA $0100,X
|
bcs +
|
||||||
bcs .jmpexit
|
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes
|
||||||
pha
|
pha
|
||||||
lda #s_tamper
|
lda #s_tamper
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
pla
|
pla
|
||||||
inx
|
|
||||||
inx
|
|
||||||
inx
|
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr modify
|
jsr modify
|
||||||
!byte $19 ;checksum
|
!byte $60 ;just return
|
||||||
|
|
||||||
|
+ ldy #15
|
||||||
|
jsr SearchTrack
|
||||||
|
!byte $A9,$00 ;LDA #$00
|
||||||
|
!byte $85,$57 ;STA $57
|
||||||
|
!byte $A9,$FF ;LDA #$FF
|
||||||
|
!byte $85,$58 ;STA $58
|
||||||
|
!byte $A9,$02 ;LDA #$02
|
||||||
|
!byte $85,$59 ;STA $59
|
||||||
|
!byte $20,$99,$4C ;JSR $4C99
|
||||||
|
bcs +
|
||||||
|
pha
|
||||||
|
txa
|
||||||
|
adc #12
|
||||||
|
tax
|
||||||
|
pla
|
||||||
|
ldy #$01
|
||||||
|
jsr modify
|
||||||
|
!byte $2C ;don't load sector #$10
|
||||||
|
|
||||||
|
+ ldy #13
|
||||||
|
jsr SearchTrack
|
||||||
|
!byte $A9,$00 ;LDA #$00
|
||||||
|
!byte $85,$59 ;STA $59
|
||||||
|
!byte $20,WILDCARD,WILDCARD ;JSR $xxxx
|
||||||
|
!byte $68 ;PLA
|
||||||
|
!byte $D0,$20 ;BNE *+$22
|
||||||
|
!byte $20,$00,$FF ;JSR $FF00
|
||||||
|
bcs +
|
||||||
|
pha
|
||||||
|
txa
|
||||||
|
adc #10
|
||||||
|
tax
|
||||||
|
pla
|
||||||
|
ldy #$01
|
||||||
|
jsr modify
|
||||||
|
!byte $2C ;don't call protection check
|
||||||
|
|
||||||
.jmpexit
|
.jmpexit
|
||||||
jmp .exit
|
jmp .exit
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ StringTableHigh
|
|||||||
; can be set directly before calling PrintByID.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2019-12-06",$00
|
!text "Passport by 4am 2020-01-03",$00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
|
Loading…
Reference in New Issue
Block a user