mirror of
https://github.com/a2-4am/passport.git
synced 2024-11-19 03:06:34 +00:00
fixes for MECC Database Composer's multiple layers of RWTS swappers
This commit is contained in:
parent
9fd7e03572
commit
efcfdd8aa2
@ -792,6 +792,7 @@ _applyToAll
|
||||
!source "patchers/bbf9.a" ; gIsProDOS only
|
||||
!source "patchers/memory.config.a" ; gIsProDOS only
|
||||
!source "patchers/origin.a" ; gIsProDOS only
|
||||
!source "patchers/meccdbc.a" ; gMECCFastloadType==1 && gT07 only
|
||||
!source "patchers/rwtsswapmecc.a" ; gMECCFastloadType only
|
||||
!source "patchers/rwtsswapmecc2.a" ; gPossibleMECCSwapper only
|
||||
!source "patchers/rwtsswappenguin.a" ; T01 only
|
||||
@ -842,6 +843,15 @@ _applyToAll
|
||||
sec ; set carry if nothing happened
|
||||
rts
|
||||
|
||||
inx6 inx
|
||||
inx5 inx
|
||||
inx4 inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
rts
|
||||
|
||||
|
||||
universalrwts
|
||||
!bin "../build/universalrwts.pak"
|
||||
!source "exodecrunch.s"
|
||||
@ -849,13 +859,13 @@ universalrwts
|
||||
get_crunched_byte:
|
||||
_byte_lo = * + 1
|
||||
_byte_hi = * + 2
|
||||
lda $1234 ; needs to be set correctly before
|
||||
; decrunch_file is called.
|
||||
inc _byte_lo
|
||||
bne _byte_skip_hi
|
||||
inc _byte_hi
|
||||
lda $1234 ; needs to be set correctly before
|
||||
; decrunch_file is called.
|
||||
inc _byte_lo
|
||||
bne _byte_skip_hi
|
||||
inc _byte_hi
|
||||
_byte_skip_hi:
|
||||
rts
|
||||
rts
|
||||
|
||||
AnalyzeT00 ; placeholder to identify stack of packed data
|
||||
!bin "../build/t00only.pak"
|
||||
|
@ -87,11 +87,7 @@
|
||||
!byte $03,$4C ;LDI #$00
|
||||
!byte $04,$EB,$19 ;LDA $c0e8
|
||||
bcs +
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx5
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $04
|
||||
@ -113,12 +109,7 @@
|
||||
!byte $D0,$A7 ;BNE -$A7
|
||||
!byte $4C ;JMP $xxxx
|
||||
bcs +
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx6
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $00 ;disable branch
|
||||
@ -210,11 +201,7 @@
|
||||
lda #s_tamper
|
||||
jsr PrintByID
|
||||
pla
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx5
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $00 ;new checksum value for cmp
|
||||
@ -231,12 +218,7 @@
|
||||
lda #s_tamper
|
||||
jsr PrintByID
|
||||
pla
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx6
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $50 ;new checksum value for cmp
|
||||
@ -252,10 +234,7 @@
|
||||
lda #s_tamper
|
||||
jsr PrintByID
|
||||
pla
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx4
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $50 ;new checksum value for cmp
|
||||
@ -267,12 +246,7 @@
|
||||
!byte $20,$00,$61 ;JSR $6100
|
||||
!byte $4C,$94,$69 ;JMP $6994
|
||||
bcs +
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx6
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $2C ;JSR->BIT
|
||||
|
64
src/patchers/meccdbc.a
Normal file
64
src/patchers/meccdbc.a
Normal file
@ -0,0 +1,64 @@
|
||||
;-------------------------------
|
||||
; #MECCDBC
|
||||
;-------------------------------
|
||||
!zone {
|
||||
bit gMode ; nothing to do here in verify-only mode
|
||||
bpl .jmpexit
|
||||
lda gTrack
|
||||
cmp #7
|
||||
bne .jmpexit
|
||||
lda gMECCFastloadType
|
||||
cmp #ID_MECC1
|
||||
bne .jmpexit
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
sta tmp
|
||||
asl
|
||||
adc tmp
|
||||
ldx #8
|
||||
- pha
|
||||
tay
|
||||
txa
|
||||
pha
|
||||
lda .table+2-24,y
|
||||
sta .cmpbyte
|
||||
sta .modbyte
|
||||
lda .table-24,y
|
||||
ldx .table+1-24,y
|
||||
ldy #$01
|
||||
jsr compare
|
||||
.cmpbyte
|
||||
!byte $D1 ; SMC
|
||||
bcc +
|
||||
|
||||
ldy #$01
|
||||
jsr modify
|
||||
.modbyte
|
||||
!byte $D1 ; SMC
|
||||
|
||||
+ pla
|
||||
tax
|
||||
pla
|
||||
tay
|
||||
iny
|
||||
iny
|
||||
iny
|
||||
tya
|
||||
dex
|
||||
bne -
|
||||
|
||||
.jmpexit
|
||||
jmp .exit
|
||||
|
||||
.table
|
||||
!byte $0B,$08,$D5
|
||||
!byte $0B,$12,$AA
|
||||
!byte $0B,$1D,$96
|
||||
!byte $0B,$8F,$D5
|
||||
!byte $0B,$99,$AA
|
||||
!byte $0B,$A3,$AD
|
||||
!byte $0C,$82,$AA
|
||||
!byte $0C,$87,$AD
|
||||
.exit
|
||||
}
|
@ -9,6 +9,19 @@
|
||||
lda gMECCFastloadType
|
||||
beq .exit
|
||||
|
||||
ldy #$08
|
||||
jsr SearchTrack
|
||||
!byte $A0,$02
|
||||
!byte $AD,$88,$67
|
||||
!byte $D0,$11
|
||||
!byte $B9
|
||||
bcs + ; passport-test-suite/MECC Dataquest Composer [C=0] matches
|
||||
sta gDisplayBytes
|
||||
jsr inx5
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $24
|
||||
+
|
||||
ldy #$11
|
||||
jsr SearchTrack
|
||||
!byte $0A
|
||||
|
@ -17,11 +17,7 @@
|
||||
!byte $8D,$7A,$BC
|
||||
bcs .exit ; passport-test-suite/Word Wizards v1.0.woz [C=0] matches
|
||||
sta gDisplayBytes
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx5
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $60
|
||||
|
@ -127,10 +127,7 @@
|
||||
bcs +
|
||||
pha
|
||||
tay
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx5
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
@ -183,11 +180,7 @@
|
||||
!byte $28 ;PLP
|
||||
!byte $6C,$36,$00 ;JMP ($0036)
|
||||
bcs +
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx5
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $2C ;BIT $xxxx
|
||||
@ -213,10 +206,7 @@
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $EA ;NOP
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx4
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $EA ;NOP
|
||||
@ -296,10 +286,7 @@
|
||||
!byte $A9,$00 ;LDA #$00
|
||||
!byte $85,$48 ;STA $48
|
||||
!byte $BD,$89,$C0 ;LDA $C089,X
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr inx4
|
||||
bcs ++
|
||||
+ sta gDisplayBytes
|
||||
pha
|
||||
|
@ -284,7 +284,7 @@ StringTableHigh
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2021-02-23",$00
|
||||
!text "Passport by 4am 2021-02-28",$00
|
||||
.mainmenu
|
||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||
!text " "
|
||||
|
Loading…
Reference in New Issue
Block a user