mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-26 16:30:22 +00:00
add AA nibble count patcher [fixes Battle Group, Moebius]
This commit is contained in:
parent
92626d897d
commit
62c6978cf8
@ -801,6 +801,7 @@ _applyToAll
|
||||
!source "patchers/davidsonasm.a" ; gIsDavidson only
|
||||
!source "patchers/ssi.a" ; gIsRDOS13 only
|
||||
!source "patchers/rdosfmt.a" ; gIsRDOS13 only
|
||||
!source "patchers/aacount.a"
|
||||
|
||||
lda gPatchCount
|
||||
beq .nopatches
|
||||
|
36
src/patchers/aacount.a
Normal file
36
src/patchers/aacount.a
Normal file
@ -0,0 +1,36 @@
|
||||
;-------------------------------
|
||||
; #AACount
|
||||
; self-decrypting and re-encrypting nibble count
|
||||
;
|
||||
; tested on
|
||||
; Battle Group (SSI)
|
||||
; Moebius (Origin)
|
||||
;-------------------------------
|
||||
!zone {
|
||||
bit gMode ; nothing to do here in verify-only mode
|
||||
bpl .exit
|
||||
|
||||
lda #$0F
|
||||
sta gDisplayBytes
|
||||
.loop lda gDisplayBytes
|
||||
ldx #$04
|
||||
ldy #$0E
|
||||
jsr compare
|
||||
!byte $CE,$07,$02; DEC $0207
|
||||
!byte $EF,$07,$02; ??? $0207 (becomes INC)
|
||||
!byte $A0,$27 ; LDY #$27
|
||||
!byte $D0,$02 ; BNE *+4
|
||||
!byte $00 ; BRK
|
||||
!byte $6C,$B9,$00; JMP ($00B9)
|
||||
bcs +
|
||||
lda #s_aacount
|
||||
jsr PrintByID
|
||||
lda gDisplayBytes
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $60 ; RTS
|
||||
+
|
||||
dec gDisplayBytes
|
||||
bpl .loop
|
||||
.exit
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
!byte $C1,$00 ; CMP ($00,X)
|
||||
!byte $EA ; NOP
|
||||
!byte $EA ; NOP
|
||||
bcs +
|
||||
bcs .exit
|
||||
|
||||
sta gDisplayBytes
|
||||
pha
|
||||
@ -30,21 +30,5 @@
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $A9 ; LDA #$..
|
||||
bvc .exit
|
||||
|
||||
+
|
||||
ldy #$0E
|
||||
jsr SearchTrack
|
||||
!byte $CE,$07,$02; DEC $0207
|
||||
!byte $EF,$07,$02; ??? $0207
|
||||
!byte $A0,$27 ; LDY #$27
|
||||
!byte $D0,$02 ; BNE *+4
|
||||
!byte $00 ; BRK
|
||||
!byte $6C,$B9,$00; JMP ($00B9)
|
||||
bcs .exit
|
||||
ldy #1
|
||||
jsr modify
|
||||
!byte $60 ; RTS
|
||||
|
||||
.exit
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ StringTable
|
||||
!word .davidson
|
||||
!word .rdos13
|
||||
!word .ssi
|
||||
!word .aacount
|
||||
;
|
||||
; Text can contain substitution strings, which
|
||||
; are replaced by current values at runtime. Each
|
||||
@ -452,4 +453,6 @@ StringTable
|
||||
!text "T00,S00 Found RDOS 13-sector bootloader",$8D,$00
|
||||
.ssi
|
||||
!text "T%t,S%0 Found SSI protection check",$8D,$00
|
||||
.aacount
|
||||
!text "T%t,S%0 Found AA nibble count",$8D,$00
|
||||
}
|
||||
|
@ -108,4 +108,5 @@ s_gathering = $66
|
||||
s_davidson = $67
|
||||
s_rdos13 = $68
|
||||
s_ssi = $69
|
||||
STRINGCOUNT = $6A
|
||||
s_aacount = $6A
|
||||
STRINGCOUNT = $6B
|
||||
|
Loading…
Reference in New Issue
Block a user