mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-23 10:31:52 +00:00
add support for Woodbury bad block protection [fixes PlayWriter]
This commit is contained in:
parent
bbd5349e5c
commit
3cb2f61fa6
@ -64,6 +64,10 @@
|
|||||||
; set in IDBootloader() after reading T00,S00
|
; set in IDBootloader() after reading T00,S00
|
||||||
|
|
||||||
FIRSTFILTER
|
FIRSTFILTER
|
||||||
|
;gPossibleWoodbury
|
||||||
|
!byte FALSE ; 0=true, 1=false
|
||||||
|
; reset before each operation
|
||||||
|
; set in TraceDOS33c() after tracing DOS 3.3-shaped RWTS
|
||||||
;gPossibleMECCSwapper
|
;gPossibleMECCSwapper
|
||||||
!byte FALSE ; 0=true, 1=false
|
!byte FALSE ; 0=true, 1=false
|
||||||
; reset before each operation
|
; reset before each operation
|
||||||
|
@ -104,9 +104,10 @@ gIsPhoenix = gIsHolle-$01 ; byte
|
|||||||
gIsDiversi = gIsPhoenix-$01 ; byte
|
gIsDiversi = gIsPhoenix-$01 ; byte
|
||||||
gIsTSR = gIsDiversi-$01 ; byte
|
gIsTSR = gIsDiversi-$01 ; byte
|
||||||
gPossibleMECCSwapper = gIsTSR-$01 ; byte
|
gPossibleMECCSwapper = gIsTSR-$01 ; byte
|
||||||
|
gPossibleWoodbury = gPossibleMECCSwapper-$01 ; byte
|
||||||
;LASTFILTER ; add new gIs* above this line
|
;LASTFILTER ; add new gIs* above this line
|
||||||
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
|
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
|
||||||
gIsInfocom18 = gPossibleMECCSwapper-$01 ; byte
|
gIsInfocom18 = gPossibleWoodbury-$01 ; byte
|
||||||
;gIs13Sector is a special case whose ID is not in the regular inspection path
|
;gIs13Sector is a special case whose ID is not in the regular inspection path
|
||||||
gIs13Sector = gIsInfocom18-$01 ; byte
|
gIs13Sector = gIsInfocom18-$01 ; byte
|
||||||
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
|
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
|
||||||
@ -183,6 +184,7 @@ ConstructStandardDelivery = jConstructStandardDelivery
|
|||||||
!warn "gIsDiversi=",gIsDiversi
|
!warn "gIsDiversi=",gIsDiversi
|
||||||
!warn "gIsTSR=",gIsTSR
|
!warn "gIsTSR=",gIsTSR
|
||||||
!warn "gPossibleMECCSwpper",gPossibleMECCSwapper
|
!warn "gPossibleMECCSwpper",gPossibleMECCSwapper
|
||||||
|
!warn "gPossibleWoodbury",gPossibleWoodbury
|
||||||
!warn "gIsRDOS13=",gIsRDOS13
|
!warn "gIsRDOS13=",gIsRDOS13
|
||||||
!warn "gIsInfocom18=",gIsInfocom18
|
!warn "gIsInfocom18=",gIsInfocom18
|
||||||
!warn "gIs13Sector=",gIs13Sector
|
!warn "gIs13Sector=",gIs13Sector
|
||||||
|
@ -228,6 +228,21 @@ _Inspect1a
|
|||||||
lda #TRUE
|
lda #TRUE
|
||||||
sta gPossibleMECCSwapper
|
sta gPossibleMECCSwapper
|
||||||
;
|
;
|
||||||
|
; Check for unusual init at $BFC8
|
||||||
|
; (sets flag for a specific patcher
|
||||||
|
; and marks a certain sector optional)
|
||||||
|
;
|
||||||
|
+ lda $08FE
|
||||||
|
cmp #$B7
|
||||||
|
bne +
|
||||||
|
lda $BFCC
|
||||||
|
cmp #$10
|
||||||
|
bne +
|
||||||
|
lda #TRUE
|
||||||
|
sta gPossibleWoodbury
|
||||||
|
lda #kSectorOptional
|
||||||
|
sta T14S06
|
||||||
|
;
|
||||||
; Turn off drive recalibration
|
; Turn off drive recalibration
|
||||||
;
|
;
|
||||||
+ lda jCallRWTS+2; check for code at $BDD2
|
+ lda jCallRWTS+2; check for code at $BDD2
|
||||||
|
@ -833,6 +833,7 @@ _applyToAll
|
|||||||
!source "patchers/pdi.a" ; gIsDiversi only
|
!source "patchers/pdi.a" ; gIsDiversi only
|
||||||
!source "patchers/harvey.a" ; T01 only
|
!source "patchers/harvey.a" ; T01 only
|
||||||
!source "patchers/tsr.a" ; T04 && gIsTSR only
|
!source "patchers/tsr.a" ; T04 && gIsTSR only
|
||||||
|
!source "patchers/woodbury.a" ; gPossibleWoodbury only
|
||||||
|
|
||||||
lda gPatchCount
|
lda gPatchCount
|
||||||
beq .nopatches
|
beq .nopatches
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
!byte $20,$D2,$25; JSR $25D2
|
!byte $20,$D2,$25; JSR $25D2
|
||||||
!byte $4C,$74,$08; JMP $0874
|
!byte $4C,$74,$08; JMP $0874
|
||||||
bcs + ; passport-test-suite/Word Attack Plus Spanish.woz [C=0] matches
|
bcs + ; passport-test-suite/Word Attack Plus Spanish.woz [C=0] matches
|
||||||
|
pha
|
||||||
|
lda #s_badblock
|
||||||
|
jsr PrintByID
|
||||||
|
pla
|
||||||
ldx #$04
|
ldx #$04
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr modify
|
jsr modify
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
!byte $08,$80,$00,$FD,$1C,$D1,$0D,$EC
|
!byte $08,$80,$00,$FD,$1C,$D1,$0D,$EC
|
||||||
bcs .exit ; passport-test-suite/Read 'N Roll.woz [C=0] matches
|
bcs .exit ; passport-test-suite/Read 'N Roll.woz [C=0] matches
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes
|
||||||
|
pha
|
||||||
|
lda #s_badblock
|
||||||
|
jsr PrintByID
|
||||||
|
pla
|
||||||
inx
|
inx
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr modify
|
jsr modify
|
||||||
|
38
src/patchers/woodbury.a
Normal file
38
src/patchers/woodbury.a
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
;-------------------------------
|
||||||
|
; #WOODBURY
|
||||||
|
; bad block check with delayed effects
|
||||||
|
;
|
||||||
|
; Tested on
|
||||||
|
; - PlayWriter: Mystery! (1985, Woodbury)
|
||||||
|
; - PlayWriter: Adventures in Space (1985, Woodbury)
|
||||||
|
; - PlayWriter: Castles and Creatures (1985, Woodbury)
|
||||||
|
;-------------------------------
|
||||||
|
!zone {
|
||||||
|
bit gMode ; nothing to do here in verify-only mode
|
||||||
|
bpl .exit
|
||||||
|
lda gPossibleWoodbury
|
||||||
|
bne .exit
|
||||||
|
|
||||||
|
ldy #$14
|
||||||
|
jsr SearchTrack
|
||||||
|
!byte $A9,$00
|
||||||
|
!byte $85,$09
|
||||||
|
!byte $A9,WILDCARD
|
||||||
|
!byte $A0,WILDCARD
|
||||||
|
!byte $20,$D9,$03
|
||||||
|
!byte $AD,WILDCARD,WILDCARD
|
||||||
|
!byte $C9,$40
|
||||||
|
!byte $D0,$05
|
||||||
|
!byte $A9,$00
|
||||||
|
bcs .exit ; passport-test-suite/PlayWriter.woz [C=0] matches
|
||||||
|
sta gDisplayBytes
|
||||||
|
pha
|
||||||
|
lda #s_badblock
|
||||||
|
jsr PrintByID
|
||||||
|
pla
|
||||||
|
jsr inx4
|
||||||
|
ldy #$02
|
||||||
|
jsr modify
|
||||||
|
!byte $F0,$0E
|
||||||
|
.exit
|
||||||
|
}
|
@ -97,7 +97,9 @@ T11 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
|||||||
T11S0F !byte $FF
|
T11S0F !byte $FF
|
||||||
T12 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T12 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T13 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T13 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T14 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T14 !byte $FF,$FF,$FF,$FF,$FF,$FF
|
||||||
|
T14S06 !byte $FF
|
||||||
|
!byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T15 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T15 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T16 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T16 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T17 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T17 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
|
@ -137,6 +137,7 @@ StringTableLow
|
|||||||
!byte <.cmpnopnop
|
!byte <.cmpnopnop
|
||||||
!byte <.tsr
|
!byte <.tsr
|
||||||
!byte <.idinfo
|
!byte <.idinfo
|
||||||
|
!byte <.badblock
|
||||||
|
|
||||||
StringTableHigh
|
StringTableHigh
|
||||||
!byte >.header
|
!byte >.header
|
||||||
@ -260,6 +261,7 @@ StringTableHigh
|
|||||||
!byte >.cmpnopnop
|
!byte >.cmpnopnop
|
||||||
!byte >.tsr
|
!byte >.tsr
|
||||||
!byte >.idinfo
|
!byte >.idinfo
|
||||||
|
!byte >.badblock
|
||||||
|
|
||||||
;
|
;
|
||||||
; Text can contain substitution strings, which
|
; Text can contain substitution strings, which
|
||||||
@ -286,7 +288,7 @@ StringTableHigh
|
|||||||
; can be set directly before calling PrintByID.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2021-03-01",$00
|
!text "Passport by 4am 2021-03-02",$00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
@ -618,4 +620,6 @@ StringTableHigh
|
|||||||
!text "T00,S00 Found TSR bootloader",$8D,$00
|
!text "T00,S00 Found TSR bootloader",$8D,$00
|
||||||
.idinfo
|
.idinfo
|
||||||
!text "T00,S01 Erasing site license information",$00
|
!text "T00,S01 Erasing site license information",$00
|
||||||
|
.badblock
|
||||||
|
!text "T%t,S%0 Found bad block protection check",$00
|
||||||
}
|
}
|
||||||
|
@ -123,4 +123,5 @@ s_sve = $75
|
|||||||
s_cmpnopnop = $76
|
s_cmpnopnop = $76
|
||||||
s_tsr = $77
|
s_tsr = $77
|
||||||
s_idinfo = $78
|
s_idinfo = $78
|
||||||
STRINGCOUNT = $79
|
s_badblock = $79
|
||||||
|
STRINGCOUNT = $7A
|
||||||
|
Loading…
Reference in New Issue
Block a user