passport/src/patchers/t00_swordthrust.a
2021-06-21 12:12:33 -04:00

39 lines
907 B
Plaintext

;-------------------------------
; #SWORDTHRUST
; custom RWTS entry point at $B775 changes parameters based on track
;
; Tested on
; - Swordthrust
;-------------------------------
!zone {
; gTrack = 0
; Caller found DOS 3.3 RWTS
lda #$01
ldx #$75
ldy #(@end_swordthrust-@begin_swordthrust)
jsr compare
@begin_swordthrust
PHP
SEI
PHA
LDX $B7EC
LDA $BED0,X
EOR $B942
STA $B8FC
STA $B85D
PLA
JSR $BD00
@end_swordthrust
bcs .exit ; passport-test-suite/Swordthrust 1 The King's Testing Ground.woz [C=0] matches
jsr PrintByID
!byte s_bytrack
ldx #$81
jsr modify1
!byte $2C
ldx #$84
jsr modify1
!byte $2C
.exit
}