mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-26 01:29:39 +00:00
add support for Swordthrust RWTS
This commit is contained in:
parent
132a8eb138
commit
26ae141203
@ -209,6 +209,35 @@ _Inspect1a
|
||||
bcs +
|
||||
jsr $BC61
|
||||
;
|
||||
; Check for alternate RWTS entry point (e.g. Swordthrust)
|
||||
;
|
||||
+ lda jCallRWTS+2
|
||||
sec
|
||||
sbc #$06
|
||||
ldx #$75
|
||||
ldy #(@end_swordthrust-@begin_swordthrust)
|
||||
jsr CompareMemory
|
||||
@begin_swordthrust
|
||||
PHP
|
||||
SEI
|
||||
PHA
|
||||
LDX $B7EC
|
||||
LDA $BED0,X
|
||||
EOR $B942
|
||||
STA $B8FC
|
||||
STA $B85D
|
||||
PLA
|
||||
JSR $BD00
|
||||
@end_swordthrust
|
||||
bcs +
|
||||
stx jCallRWTS+1; set new RWTS entry point to $B775
|
||||
lda #$B7
|
||||
sta jCallRWTS+2
|
||||
lda #<gTrack ; this entry point assumes track number is in $B7EC
|
||||
sta $B779 ; which isn't true, so change the code to look at
|
||||
lda #>gTrack ; Passport's gTrack instead
|
||||
sta $B77A
|
||||
;
|
||||
; good to go
|
||||
;
|
||||
+ jmp ADStyle ; use this RWTS to read the disk
|
||||
|
@ -110,6 +110,7 @@ AnalyzeT00
|
||||
!source "../patchers/microfun2.a"
|
||||
!source "../patchers/panglosdos.a"
|
||||
!source "../patchers/rdos13.a"
|
||||
!source "../patchers/swordthrust.a"
|
||||
|
||||
;add only above this line
|
||||
rts
|
||||
|
41
src/patchers/swordthrust.a
Normal file
41
src/patchers/swordthrust.a
Normal file
@ -0,0 +1,41 @@
|
||||
;-------------------------------
|
||||
; #SWORDTHRUST
|
||||
; custom RWTS entry point at $B775 changes parameters based on track
|
||||
;
|
||||
; Tested on
|
||||
; - Swordthrust
|
||||
;-------------------------------
|
||||
!zone {
|
||||
bit gMode ; nothing to do here in verify-only mode
|
||||
bpl .exit
|
||||
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
|
||||
sta gDisplayBytes
|
||||
lda #s_bytrack
|
||||
jsr PrintByID
|
||||
lda #$01
|
||||
ldx #$81
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $2C
|
||||
ldx #$84
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $2C
|
||||
.exit
|
||||
}
|
@ -147,7 +147,7 @@ StringTable
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2018-10-03",$00
|
||||
!text "Passport by 4am 2018-10-04",$00
|
||||
.mainmenu
|
||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||
!text " "
|
||||
|
Loading…
Reference in New Issue
Block a user