add support for Micro Fun RWTS that alters data field checksum [fixes Crown of Arthain]

This commit is contained in:
4am 2018-10-03 23:30:39 -04:00
parent dad9aeae8d
commit 132a8eb138
4 changed files with 74 additions and 0 deletions

View File

@ -193,6 +193,22 @@ _Inspect1a
dey
bpl -
;
; Check for Micro Fun RWTS swapper (called from outside RWTS so
; we need to call it ourselves)
+ ldx jCallRWTS+2
dex
txa
ldx #$61
ldy #$0B
jsr CompareMemory
!byte $A9,$01
!byte $8D,$00,$B9
!byte $A9,$B5
!byte $8D,$FC,$B8
!byte $60
bcs +
jsr $BC61
;
; good to go
;
+ jmp ADStyle ; use this RWTS to read the disk

View File

@ -91,6 +91,7 @@ AnalyzeT00
!source "../patchers/bb03.a"
!source "../patchers/rwtsswap.a"
!source "../patchers/rwtsswap2.a"
!source "../patchers/rwtsswapmicrofun.a"
!source "../patchers/border.a"
!source "../patchers/jmpae8e.a"
!source "../patchers/jmpbbfe.a"
@ -106,6 +107,7 @@ AnalyzeT00
!source "../patchers/dos32.a"
!source "../patchers/dos32dlm.a"
!source "../patchers/microfun.a"
!source "../patchers/microfun2.a"
!source "../patchers/panglosdos.a"
!source "../patchers/rdos13.a"

24
src/patchers/microfun2.a Normal file
View File

@ -0,0 +1,24 @@
;-------------------------------
; #MICROFUN2
; RWTS jumps to $B6B8 to burn cycles during write
;
; tested on
; - Crown Of Arthain
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gIsRWTS ; if DOS 3.3-shaped RWTS
bne .exit
lda #$02
ldx #$5E
ldy #$03
jsr compare
!byte $4C,$B8,$B6
bcs .exit
sta gDisplayBytes
ldy #$03
jsr modify
!byte $20,$B8,$B8
.exit
}

View File

@ -0,0 +1,32 @@
;-------------------------------
; #RWTSSWAPMICROFUN
; RWTS swappers at $BC56 and $BC61
;
; Tested on
; - Crown of Arthain
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda #$06
ldx #$56
ldy #$05
jsr compare
!byte $A9,$00
!byte $8D,$00,$B9
bcs +
ldy #$01
jsr modify
!byte $60
+
ldx #$61
ldy #$05
jsr compare
!byte $A9,$01
!byte $8D,$00,$B9
bcs .exit
ldy #$01
jsr modify
!byte $60
.exit
}