disable track recalibration on traced DOS 3.3 and universal RWTS

This commit is contained in:
4am 2018-05-08 21:48:00 -04:00
parent 522b16c352
commit 8ec251bd87
3 changed files with 27 additions and 9 deletions

View File

@ -69,6 +69,8 @@ _Inspect1a
dex
stx .x3+1
stx .x4+1
stx .x8+2
stx .x9+2
stx jCallRWTS+2
jsr ProtectedDOS ; check for a specific (encrypted)
; bootloader called "Protected DOS"
@ -82,21 +84,21 @@ _Inspect1a
!byte $84,$48,$85,$49
bcc .x1
jmp UseUniversal
.x1 lda #$FF ; check for "SEC;RTS" at $B942
.x1 lda #$B9 ; check for "SEC;RTS" at $B942
ldx #$42
ldy #$02
jsr CompareMemory
!byte $38,$60
bcc .x2
jmp UseUniversal
.x2 lda #$FF ; check for "LDA $C08C,X" at $B94F
.x2 lda #$B9 ; check for "LDA $C08C,X" at $B94F
ldx #$4F
ldy #$03
jsr CompareMemory
!byte $BD,$8C,$C0
bcc .x3
jmp UseUniversal
.x3 lda #$FF ; check for "JSR $xx00" at $BDB9
.x3 lda #$BD ; check for "JSR $xx00" at $BDB9
ldx #$B9
ldy #$02
jsr CompareMemory
@ -106,7 +108,7 @@ _Inspect1a
; Check for RWTS variant that has extra code before
; JSR $B800 e.g. Verb Viper (DLM), Advanced Analogies (Hartley)
;
.x4 lda #$FF ; check for "JSR $xx00" at $BDC5
.x4 lda #$BD ; check for "JSR $xx00" at $BDC5
ldx #$C5
ldy #$02
jsr CompareMemory
@ -118,7 +120,7 @@ _Inspect1a
; LDX $1FE8 e.g. Pinball Construction Set (1983)
; we don't like that one
;
.x5 lda #$FF ; check for "LDX $1FE8" at $BE43
.x5 lda #$BE ; check for "LDX $1FE8" at $BE43
ldx #$43
ldy #$03
jsr CompareMemory
@ -129,7 +131,7 @@ _Inspect1a
; Check for Milliken protection routine in late-stage boot
; (affects readable/ignoreable sector map, so must ID now)
;
.x6 lda #$FF ; check for "JMP $9B03" at $B747
.x6 lda #$B7 ; check for "JMP $9B03" at $B747
ldx #$47
ldy #$03
jsr CompareMemory
@ -144,7 +146,7 @@ _Inspect1a
;
; Check for Adventure International RWTS (sets flag for patcher)
;
.x7 lda #$FF ; check for code at $B936
.x7 lda #$B9 ; check for code at $B936
ldx #$36
ldy #$0A
jsr CompareMemory
@ -156,6 +158,21 @@ _Inspect1a
lda #TRUE
sta gAdventureInternational
;
; Turn off drive recalibration
;
+ lda jCallRWTS+2; check for code at $BDD2
ldx #$D2
ldy #$06
jsr CompareMemory
!byte $A9,$60 ; LDA #$60
!byte $20,$95,$BE; JSR $BE95
!byte $CE ; DEC $xxxx
bcs +
lda #$B0
.x8 sta $BDD2
lda #$30
.x9 sta $BDD3
;
; Check for Infocom disk (need to massage RWTS a little)
;
+ lda $08FE

View File

@ -121,7 +121,8 @@ universalrwts
!byte $88,$D0,$FD,$E6,$46,$D0,$F7,$E6,$47,$D0,$F3,$A0,$0C,$B1,$48,$F0
!byte $5A,$C9,$04,$F0,$58,$6A,$08,$B0,$03,$20,$00,$B8,$A0,$30,$8C,$78
!byte $05,$AE,$F8,$05,$20,$44,$B9,$90,$24,$CE,$78,$05,$10,$F3,$AD,$78
!byte $04,$48,$A9,$60,$20,$95,$BE,$CE,$F8,$06,$F0,$28,$A9,$04,$8D,$F8
; $BDD2 is patched to disable track recalibration after failing to find an address prologue 48 times
!byte $04,$48,$B0,$30,$20,$95,$BE,$CE,$F8,$06,$F0,$28,$A9,$04,$8D,$F8
!byte $04,$A9,$00,$20,$5A,$BE,$68,$20,$5A,$BE,$4C,$BC,$BD,$A4,$2E,$CC
!byte $78,$04,$F0,$1C,$AD,$78,$04,$48,$98,$20,$95,$BE,$68,$CE,$F8,$04
!byte $D0,$E5,$F0,$CA,$68,$A9,$40,$28,$4C,$48,$BE,$F0,$39,$4C,$AF,$BE

View File

@ -140,7 +140,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2018-04-06",$00
!text "Passport by 4am 2018-05-08",$00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "