mirror of
https://github.com/a2-4am/passport.git
synced 2025-01-11 16:30:22 +00:00
NEW: patchers/f7f6 for F7F6 protections not contained in SSPROT startup program
This commit is contained in:
parent
f62c654690
commit
5d9bc2243f
@ -49,10 +49,14 @@
|
||||
; compile-time flag, no way to change at runtime
|
||||
|
||||
FIRSTFILTER
|
||||
;gForceDiskVol
|
||||
!byte FALSE ; 0=true, 1=false
|
||||
; reset before each operation
|
||||
; set in patchers/f7f6
|
||||
;gIsF7F6
|
||||
!byte FALSE ; 0=true, 1=false
|
||||
; reset before each operation
|
||||
; set in analyze/SetupF7F6SecondRound
|
||||
; set in analyze (SetupF7F6SecondRound)
|
||||
; used to avoid an expensive search
|
||||
;gIsSierra13
|
||||
!byte FALSE ; 0=true, 1=false
|
||||
|
@ -84,9 +84,10 @@ gIsDatasoft = gIsLaureate-$01 ; byte
|
||||
gIsSierra = gIsDatasoft-$01 ; byte
|
||||
gIsSierra13 = gIsSierra-$01 ; byte
|
||||
gIsF7F6 = gIsSierra13-$01 ; byte
|
||||
gForceDiskVol = gIsF7F6-$01 ; byte
|
||||
;LASTFILTER ; add new gIs* above this line
|
||||
|
||||
gOnAClearDayYouCanReadForever = gIsF7F6-$01 ; byte
|
||||
gOnAClearDayYouCanReadForever = gForceDiskVol-$01 ; byte
|
||||
gUsingRAMDisk = gOnAClearDayYouCanReadForever-$01 ; byte
|
||||
gRAMDiskRef = gUsingRAMDisk-$01 ; byte
|
||||
gDisplayBytes = gRAMDiskRef-$0A ; 10 bytes
|
||||
|
@ -757,6 +757,7 @@ _applyToAll
|
||||
!source "patchers/sra.a" ; gIsDOS32 or gIsRWTS only
|
||||
!source "patchers/sierra13.a" ; gIsDOS32 only
|
||||
!source "patchers/ssprot.a" ; gIsF7F6 only
|
||||
!source "patchers/f7f6.a" ; gIsF7F6 only
|
||||
|
||||
lda gPatchCount
|
||||
beq .nopatches
|
||||
|
@ -6,26 +6,34 @@
|
||||
!zone {
|
||||
lda gIsRWTS ; if DOS 3.3 RWTS
|
||||
bne .exit
|
||||
|
||||
lda #$01
|
||||
ldx #$EE
|
||||
ldy #$01
|
||||
jsr compare ; and T00,S01,$EE ==
|
||||
!byte $FB
|
||||
bcs .exit
|
||||
|
||||
ldx #$FB
|
||||
ldy #$04
|
||||
jsr compare ; and T00,S01,$FB ==
|
||||
!byte $00,$01,$EF,$D8
|
||||
bcs .exit
|
||||
|
||||
lda gForceDiskVol
|
||||
beq .yes
|
||||
|
||||
ldx #$EB
|
||||
ldy #$01
|
||||
jsr compare ; and T00,S01,$EB !=
|
||||
!byte $FE
|
||||
bcc .exit
|
||||
|
||||
ldy #$01
|
||||
jsr compare ; and T00,S01,$EB !=
|
||||
!byte $00
|
||||
bcc .exit
|
||||
.yes
|
||||
lda #$08
|
||||
ldx #$10
|
||||
ldy #$05
|
||||
@ -34,8 +42,10 @@
|
||||
!byte $B1,$48 ; LDA ($48),Y
|
||||
!byte $48 ; PHA
|
||||
bcs .exit
|
||||
|
||||
lda #s_diskvol
|
||||
jsr PrintByID
|
||||
|
||||
lda #$08
|
||||
ldx #$12
|
||||
ldy #$02
|
||||
|
40
src/patchers/f7f6.a
Normal file
40
src/patchers/f7f6.a
Normal file
@ -0,0 +1,40 @@
|
||||
;-------------------------------
|
||||
; #F7F6
|
||||
; protection check that counts groups of F7F6EFEEAB nibbles
|
||||
;
|
||||
; hidden behind a global flag (gIsF7F6)
|
||||
; because it relies on an expensive search
|
||||
;
|
||||
; tested on
|
||||
; I, Damiano (1985, Bantam)
|
||||
; Might and Magic (1986, New World Computing)
|
||||
; Sherlock Holmes in Another Bow (1985, Bantam)
|
||||
; Chipwits (1984, Brain Power)
|
||||
; The Complete Scarsdale Medical Diet (1985, Bantam)
|
||||
; Create With Garfield Deluxe Edition (1987, DLM)
|
||||
; Teddy Bearrels of Fun (1987, DLM)
|
||||
;-------------------------------
|
||||
!zone {
|
||||
lda gIsF7F6
|
||||
bne .exit
|
||||
|
||||
ldy #$08
|
||||
jsr SearchTrack
|
||||
!byte $A9,$40 ; LDA #$40
|
||||
!byte $85,$FA ; STA $FA
|
||||
!byte $A2,$60 ; LDX #$60
|
||||
!byte $BD,$8E ; LDA $..8E,X
|
||||
bcs .exit
|
||||
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
ldy #$01
|
||||
jsr modify
|
||||
!byte $18 ; CLC
|
||||
|
||||
lda #TRUE ; needed for Might & Magic
|
||||
sta gForceDiskVol
|
||||
.exit
|
||||
}
|
@ -42,8 +42,6 @@
|
||||
jsr compare
|
||||
!byte $23,$2A,$28
|
||||
bcs .nextsector
|
||||
lda #s_f7f6
|
||||
jsr PrintByID
|
||||
lda .sector+1
|
||||
ldx #$20
|
||||
ldy #$03
|
||||
|
@ -112,7 +112,6 @@ StringTable
|
||||
!word .origin
|
||||
!word .volumename
|
||||
!word .dinkeydos
|
||||
!word .f7f6
|
||||
;
|
||||
; Text can contain substitution strings, which
|
||||
; are replaced by current values at runtime. Each
|
||||
@ -429,6 +428,4 @@ StringTable
|
||||
!text "T%t,S%0 Volume name is ",$00
|
||||
.dinkeydos
|
||||
!text "T00,S0B Found Dinkey-DOS",$8D,$00
|
||||
.f7f6
|
||||
!text "T%t,S%0 Found F7F6 protection check",$8D,$00
|
||||
}
|
||||
|
@ -100,5 +100,4 @@ s_muse = $5E
|
||||
s_origin = $5F
|
||||
s_volumename = $60
|
||||
s_dinkeydos = $61
|
||||
s_f7f6 = $62
|
||||
STRINGCOUNT = $63
|
||||
STRINGCOUNT = $62
|
||||
|
Loading…
x
Reference in New Issue
Block a user