support Mastery Development RWTS changer [fixes Mastery Arithmetic Games and several others]

This commit is contained in:
4am 2021-04-14 20:23:59 -04:00
parent 8d136c6c5d
commit 8eecd95baf
3 changed files with 61 additions and 5 deletions

View File

@ -71,9 +71,27 @@ _Inspect1a
ldx #$00 ; check for "STY $48;STA $49"
ldy #$04 ; at RWTS entry point
jsr CompareMemory ; (e.g. $BD00 or $3D00)
!byte $84,$48,$85,$49
!byte $84,$48
!byte $85,$49
bcc .x1
jmp UseUniversal
lda jCallRWTS+2
ldy #$03
jsr CompareMemory
!byte $20,$AF,$BE
bcs .useuniv ; passport-test-suite/Mastery Arithmetic Games.woz [C=0] here
lda jCallRWTS+2
;C=0 here
;clc
adc #$01
ldx #$AF
ldy #$08
jsr CompareMemory
!byte $84,$48
!byte $85,$49
!byte $A0,$04
!byte $B1,$48
bcc .x1 ; passport-test-suite/Mastery Arithmetic Games.woz [C=0] here
.useuniv jmp UseUniversal
.x1 lda #$B9 ; check for "SEC;RTS" at $B942
ldx #$42
ldy #$02

View File

@ -54,10 +54,10 @@ AnalyzeT00
stx gIsMaster
lda #$07
ldx #$00
ldy #$40
ldx #$04
ldy #$3C
jsr compare ; if T00,S07,$00 ==
!byte $84,$48,$85,$49,$A0,$02,$8C,WILDCARD
!byte $A0,$02,$8C,WILDCARD
!byte WILDCARD,$A0,$04,$8C,WILDCARD,WILDCARD,$A0,$01
!byte $B1,$48,$AA,$A0,$0F,$D1,$48,$F0
!byte $1B,$8A,$48,$B1,$48,$AA,$68,$48
@ -114,6 +114,7 @@ AnalyzeT00
!source "../patchers/hoffman.a"
!source "../patchers/datasoft2.a"
!source "../patchers/jmpb500.a"
!source "../patchers/mastery.a"
;add only above this line

37
src/patchers/mastery.a Normal file
View File

@ -0,0 +1,37 @@
;-------------------------------
; #MASTERY
; RWTS changes based on track
;
; tested on
; - Mastery Arithmetic Games v1.2 (Mastery Development)
;-------------------------------
!zone {
lda gIsRWTS ; if DOS 3.3-shaped RWTS
bne .exit
lda #$07
ldx #$00
ldy #$03
jsr compare
!byte $20,$AF,$BE
bcs .exit
lda #$08
ldx #$AF
ldy #$0B
jsr compare
!byte $84,$48
!byte $85,$49
!byte $A0,$04
!byte $B1,$48
!byte $C9,$03
!byte $90
bcs .exit
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$08
ldx #$B8
ldy #$01
jsr modify
!byte $23
.exit
}