mirror of
https://github.com/a2-4am/passport.git
synced 2025-08-09 22:25:12 +00:00
add support for Harvey protection, consolidate similar log messages [fixes Harvey by Primes]
This commit is contained in:
@@ -496,3 +496,53 @@ xSVE
|
|||||||
!byte $4C,$71,$A9
|
!byte $4C,$71,$A9
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;-------------------------------
|
||||||
|
; xHarvey
|
||||||
|
; check if disk has Harvey protection
|
||||||
|
; which has a one-time RWTS swap
|
||||||
|
; after loading DOS
|
||||||
|
;
|
||||||
|
; in: $B600..$BFFF contains boot1
|
||||||
|
; out: RWTS may have been patched in memory
|
||||||
|
; all flags and registers clobbered
|
||||||
|
;-------------------------------
|
||||||
|
!zone {
|
||||||
|
xHarvey
|
||||||
|
lda #$B7
|
||||||
|
ldx #$47
|
||||||
|
ldy #$03
|
||||||
|
jsr CompareMemory
|
||||||
|
!byte $4C,$82,$A2
|
||||||
|
bcs .exit
|
||||||
|
ldx #$00
|
||||||
|
stx gAddress
|
||||||
|
inx
|
||||||
|
stx gTrack
|
||||||
|
inx
|
||||||
|
stx gSector
|
||||||
|
ldx #$09
|
||||||
|
stx gAddress+1
|
||||||
|
jsr ReadSector ; read T01S01 into $900
|
||||||
|
bcs .exit
|
||||||
|
lda #$09
|
||||||
|
ldx #$32
|
||||||
|
ldy #$18
|
||||||
|
jsr CompareMemory
|
||||||
|
!byte $A9,WILDCARD
|
||||||
|
!byte $8D,$55,$B9
|
||||||
|
!byte $8D,$7A,$BC
|
||||||
|
!byte $A9,WILDCARD
|
||||||
|
!byte $8D,$5D,$B8
|
||||||
|
!byte $8D,$FC,$B8
|
||||||
|
!byte $A9,WILDCARD
|
||||||
|
!byte $8D,$60,$BC
|
||||||
|
!byte $4C,$84,$9D
|
||||||
|
bcs .exit
|
||||||
|
lda #$60
|
||||||
|
sta $0947 ; RTS instead of JMP
|
||||||
|
jsr $0932 ; call to apply RWTS patches
|
||||||
|
lda #kSectorSwitchToBuiltinRWTS
|
||||||
|
sta T02S0F
|
||||||
|
.exit rts
|
||||||
|
}
|
||||||
|
@@ -305,6 +305,7 @@ ADStyle
|
|||||||
.noSVE
|
.noSVE
|
||||||
jsr xB660
|
jsr xB660
|
||||||
jsr xB4BB
|
jsr xB4BB
|
||||||
|
jsr xHarvey
|
||||||
jmp ReadWithRWTS
|
jmp ReadWithRWTS
|
||||||
|
|
||||||
UseUniversal
|
UseUniversal
|
||||||
@@ -812,6 +813,7 @@ _applyToAll
|
|||||||
!source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only
|
!source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only
|
||||||
!source "patchers/choplifter.a" ; gIsChoplifter only
|
!source "patchers/choplifter.a" ; gIsChoplifter only
|
||||||
!source "patchers/pdi.a" ; gIsDiversi only
|
!source "patchers/pdi.a" ; gIsDiversi only
|
||||||
|
!source "patchers/harvey.a" ; T01 only
|
||||||
|
|
||||||
lda gPatchCount
|
lda gPatchCount
|
||||||
beq .nopatches
|
beq .nopatches
|
||||||
|
40
src/patchers/harvey.a
Normal file
40
src/patchers/harvey.a
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
;-------------------------------
|
||||||
|
; #HARVEY
|
||||||
|
; late-stage RWTS swapper
|
||||||
|
;
|
||||||
|
; tested on
|
||||||
|
; Buzz Bang Harvey (Queue)
|
||||||
|
; Harvey by Primes (Queue)
|
||||||
|
;-------------------------------
|
||||||
|
!zone {
|
||||||
|
bit gMode ; nothing to do here in verify-only mode
|
||||||
|
bpl .exit
|
||||||
|
lda gIsBoot0
|
||||||
|
bne .exit
|
||||||
|
ldx gTrack
|
||||||
|
dex
|
||||||
|
bne .exit
|
||||||
|
|
||||||
|
lda #$01
|
||||||
|
ldx #$95
|
||||||
|
ldy #$03
|
||||||
|
jsr compare ; if T01,S01,$95 ==
|
||||||
|
!byte $4C,$32,$A3
|
||||||
|
bcs .exit
|
||||||
|
|
||||||
|
lda #$A2
|
||||||
|
sta gDisplayBytes
|
||||||
|
lda #$82
|
||||||
|
sta gDisplayBytes+1
|
||||||
|
lda #$01
|
||||||
|
sta gDisplayBytes+2
|
||||||
|
lda #s_beforedos
|
||||||
|
jsr PrintByID
|
||||||
|
|
||||||
|
lda #$01
|
||||||
|
inx ; #$96 because both compare and PrintByID preserve X
|
||||||
|
tay
|
||||||
|
jsr modify ; then set T01,S01,$96 =
|
||||||
|
!byte $47
|
||||||
|
.exit
|
||||||
|
}
|
@@ -25,9 +25,12 @@
|
|||||||
!byte $C8 ; INY
|
!byte $C8 ; INY
|
||||||
!byte $D0,$F5 ; BNE -
|
!byte $D0,$F5 ; BNE -
|
||||||
bcs .exit ; passport-test-suite/BackAid.woz [C=0] matches
|
bcs .exit ; passport-test-suite/BackAid.woz [C=0] matches
|
||||||
|
sta gDisplayBytes+2 ; sector (A is still #$00 here)
|
||||||
lda #$20
|
lda #$20
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes ; address (hi)
|
||||||
lda #s_jmpb412
|
lda #$12
|
||||||
|
sta gDisplayBytes+1 ; address (lo)
|
||||||
|
lda #s_beforedos
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
lda #$00
|
lda #$00
|
||||||
ldx #$EC
|
ldx #$EC
|
||||||
|
@@ -47,8 +47,12 @@
|
|||||||
; LDA $C088,X
|
; LDA $C088,X
|
||||||
; JMP $9D84
|
; JMP $9D84
|
||||||
bcs .exit ; passport-test-suite/Binomial Multiplication.woz [C=0] matches
|
bcs .exit ; passport-test-suite/Binomial Multiplication.woz [C=0] matches
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes+2 ; sector
|
||||||
lda #s_jmpb400
|
lda #$B4
|
||||||
|
sta gDisplayBytes ; address (hi)
|
||||||
|
lda #$00
|
||||||
|
sta gDisplayBytes+1 ; address (lo)
|
||||||
|
lda #s_beforedos
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
lda #$03
|
lda #$03
|
||||||
ldx #$00
|
ldx #$00
|
||||||
|
@@ -25,9 +25,12 @@
|
|||||||
!byte $C8 ; INY
|
!byte $C8 ; INY
|
||||||
!byte $C0,$FF ; CPY #$FF
|
!byte $C0,$FF ; CPY #$FF
|
||||||
bcs .exit ; passport-test-suite/America Coast to Coast.woz [C=0] matches
|
bcs .exit ; passport-test-suite/America Coast to Coast.woz [C=0] matches
|
||||||
|
sta gDisplayBytes+2 ; sector (A is still #$00 here)
|
||||||
lda #$B4
|
lda #$B4
|
||||||
sta gDisplayBytes
|
sta gDisplayBytes ; address (hi)
|
||||||
lda #s_jmpb412
|
lda #$12
|
||||||
|
sta gDisplayBytes+1 ; address (lo)
|
||||||
|
lda #s_beforedos
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
lda #$00
|
lda #$00
|
||||||
ldx #$F6
|
ldx #$F6
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
ldx gIsDOS32
|
ldx gIsDOS32
|
||||||
bne +
|
bne +
|
||||||
lda #$0A
|
lda #$0A
|
||||||
+ sta gDisplayBytes
|
+ sta gDisplayBytes+2 ; sector
|
||||||
ldx #$D7
|
ldx #$D7
|
||||||
ldy #$04
|
ldy #$04
|
||||||
jsr compare ; and T02,S0x,$D7 ==
|
jsr compare ; and T02,S0x,$D7 ==
|
||||||
@@ -63,7 +63,11 @@
|
|||||||
bcs .exit ; passport-test-suite/Snooper Troops Case 2.woz [C=0] matches
|
bcs .exit ; passport-test-suite/Snooper Troops Case 2.woz [C=0] matches
|
||||||
.found
|
.found
|
||||||
pha
|
pha
|
||||||
lda #s_jmpb4bb
|
lda #$B4
|
||||||
|
sta gDisplayBytes ; address (hi)
|
||||||
|
lda #$BB
|
||||||
|
sta gDisplayBytes+1 ; address (lo)
|
||||||
|
lda #s_beforedos
|
||||||
jsr PrintByID
|
jsr PrintByID
|
||||||
pla
|
pla
|
||||||
inx
|
inx
|
||||||
|
@@ -75,7 +75,8 @@ T02 !byte $FF,$FF,$FF,$FF,$FF
|
|||||||
T02S05 !byte $FF
|
T02S05 !byte $FF
|
||||||
!byte $FF,$FF,$FF,$FF,$FF,$FF
|
!byte $FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T02S0C !byte $FF
|
T02S0C !byte $FF
|
||||||
!byte $FF,$FF,$FF
|
!byte $FF,$FF
|
||||||
|
T02S0F !byte $FF
|
||||||
T03 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T03 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T04 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T04 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
T05 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
T05 !byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
|
||||||
|
@@ -61,8 +61,6 @@ StringTableLow
|
|||||||
!byte <.rol1e
|
!byte <.rol1e
|
||||||
!byte <.runhello
|
!byte <.runhello
|
||||||
!byte <.e7
|
!byte <.e7
|
||||||
!byte <.jmpb4bb
|
|
||||||
!byte <.jmpb400
|
|
||||||
!byte <.jmpbeca
|
!byte <.jmpbeca
|
||||||
!byte <.bb03
|
!byte <.bb03
|
||||||
!byte <.thunder
|
!byte <.thunder
|
||||||
@@ -97,7 +95,7 @@ StringTableLow
|
|||||||
!byte <.quickdos
|
!byte <.quickdos
|
||||||
!byte <.diversidos
|
!byte <.diversidos
|
||||||
!byte <.prontodos
|
!byte <.prontodos
|
||||||
!byte <.jmpb412
|
!byte <.beforedos
|
||||||
!byte <.laureate
|
!byte <.laureate
|
||||||
!byte <.bbf9
|
!byte <.bbf9
|
||||||
!byte <.micrograms
|
!byte <.micrograms
|
||||||
@@ -183,8 +181,6 @@ StringTableHigh
|
|||||||
!byte >.rol1e
|
!byte >.rol1e
|
||||||
!byte >.runhello
|
!byte >.runhello
|
||||||
!byte >.e7
|
!byte >.e7
|
||||||
!byte >.jmpb4bb
|
|
||||||
!byte >.jmpb400
|
|
||||||
!byte >.jmpbeca
|
!byte >.jmpbeca
|
||||||
!byte >.bb03
|
!byte >.bb03
|
||||||
!byte >.thunder
|
!byte >.thunder
|
||||||
@@ -219,7 +215,7 @@ StringTableHigh
|
|||||||
!byte >.quickdos
|
!byte >.quickdos
|
||||||
!byte >.diversidos
|
!byte >.diversidos
|
||||||
!byte >.prontodos
|
!byte >.prontodos
|
||||||
!byte >.jmpb412
|
!byte >.beforedos
|
||||||
!byte >.laureate
|
!byte >.laureate
|
||||||
!byte >.bbf9
|
!byte >.bbf9
|
||||||
!byte >.micrograms
|
!byte >.micrograms
|
||||||
@@ -284,7 +280,7 @@ StringTableHigh
|
|||||||
; can be set directly before calling PrintByID.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2020-07-13",$00
|
!text "Passport by 4am 2020-07-14",$00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
@@ -439,12 +435,6 @@ StringTableHigh
|
|||||||
!text "startup program.",$8D,$00
|
!text "startup program.",$8D,$00
|
||||||
.e7
|
.e7
|
||||||
!text "T%t,S%0 Found E7 bitstream",$8D,$00
|
!text "T%t,S%0 Found E7 bitstream",$8D,$00
|
||||||
.jmpb4bb
|
|
||||||
!text "T%t,S%0 Disk calls a protection check at"
|
|
||||||
!text "$B4BB before initializing DOS.",$8D,$00
|
|
||||||
.jmpb400
|
|
||||||
!text "T%t,S%0 Disk calls a protection check at"
|
|
||||||
!text "$B400 before initializing DOS.",$8D,$00
|
|
||||||
.jmpbeca
|
.jmpbeca
|
||||||
!text "T00,S02 RWTS requires extra nibbles and",$8D
|
!text "T00,S02 RWTS requires extra nibbles and",$8D
|
||||||
!text "timing bits after the data prologue by",$8D
|
!text "timing bits after the data prologue by",$8D
|
||||||
@@ -532,9 +522,9 @@ StringTableHigh
|
|||||||
!text "T00,S00 Found Diversi-DOS bootloader",$8D,$00
|
!text "T00,S00 Found Diversi-DOS bootloader",$8D,$00
|
||||||
.prontodos
|
.prontodos
|
||||||
!text "T00,S00 Found Pronto-DOS bootloader",$8D,$00
|
!text "T00,S00 Found Pronto-DOS bootloader",$8D,$00
|
||||||
.jmpb412
|
.beforedos
|
||||||
!text "T02,S00 Disk calls a protection check",$8D
|
!text "T%t,S%2 Disk calls a protection check",$8D
|
||||||
!text "at $%012 before initializing DOS.",$8D,$00
|
!text "at $%0%1 before initializing DOS.",$8D,$00
|
||||||
.laureate
|
.laureate
|
||||||
!text "T00,S00 Found Laureate bootloader",$8D,$00
|
!text "T00,S00 Found Laureate bootloader",$8D,$00
|
||||||
.bbf9
|
.bbf9
|
||||||
|
@@ -47,79 +47,77 @@ s_jmpbcf0 = $29
|
|||||||
s_rol1e = $2A
|
s_rol1e = $2A
|
||||||
s_runhello = $2B
|
s_runhello = $2B
|
||||||
s_e7 = $2C
|
s_e7 = $2C
|
||||||
s_jmpb4bb = $2D
|
s_jmpbeca = $2D
|
||||||
s_jmpb400 = $2E
|
s_bb03 = $2E
|
||||||
s_jmpbeca = $2F
|
s_thunder = $2F
|
||||||
s_bb03 = $30
|
s_jmpae8e = $30
|
||||||
s_thunder = $31
|
s_diskvol = $31
|
||||||
s_jmpae8e = $32
|
s_d5d5f7 = $32
|
||||||
s_diskvol = $33
|
s_construct= $33
|
||||||
s_d5d5f7 = $34
|
s_datasoftb0 = $34
|
||||||
s_construct= $35
|
s_datasoft = $35
|
||||||
s_datasoftb0 = $36
|
s_lsr6a = $36
|
||||||
s_datasoft = $37
|
s_bcs08 = $37
|
||||||
s_lsr6a = $38
|
s_jmpb660 = $38
|
||||||
s_bcs08 = $39
|
s_protdos = $39
|
||||||
s_jmpb660 = $3A
|
s_decryptrwts =$3A
|
||||||
s_protdos = $3B
|
s_protserial = $3B
|
||||||
s_decryptrwts =$3C
|
s_fbff = $3C
|
||||||
s_protserial = $3D
|
s_encoded44 = $3D
|
||||||
s_fbff = $3E
|
s_encoded53 = $3E
|
||||||
s_encoded44 = $3F
|
s_specdel = $3F
|
||||||
s_encoded53 = $40
|
s_bytrack = $40
|
||||||
s_specdel = $41
|
s_a5count = $41
|
||||||
s_bytrack = $42
|
s_restart = $42
|
||||||
s_a5count = $43
|
s_corrupter= $43
|
||||||
s_restart = $44
|
s_eab0 = $44
|
||||||
s_corrupter= $45
|
s_eatrk6 = $45
|
||||||
s_eab0 = $46
|
s_eeef = $46
|
||||||
s_eatrk6 = $47
|
s_poke = $47
|
||||||
s_eeef = $48
|
s_bootcounter = $48
|
||||||
s_poke = $49
|
s_milliken = $49
|
||||||
s_bootcounter = $4A
|
s_jsr8b3 = $4A
|
||||||
s_milliken = $4B
|
s_daviddos = $4B
|
||||||
s_jsr8b3 = $4C
|
s_quickdos = $4C
|
||||||
s_daviddos = $4D
|
s_diversidos = $4D
|
||||||
s_quickdos = $4E
|
s_prontodos = $4E
|
||||||
s_diversidos = $4F
|
s_beforedos = $4F
|
||||||
s_prontodos = $50
|
s_laureate = $50
|
||||||
s_jmpb412 = $51
|
s_bbf9 = $51
|
||||||
s_laureate = $52
|
s_micrograms = $52
|
||||||
s_bbf9 = $53
|
s_cmpbne0 = $53
|
||||||
s_micrograms = $54
|
s_writeram = $54
|
||||||
s_cmpbne0 = $55
|
s_d5timing = $55
|
||||||
s_writeram = $56
|
s_advint = $56
|
||||||
s_d5timing = $57
|
s_dos32b0 = $57
|
||||||
s_advint = $58
|
s_bootwrite = $58
|
||||||
s_dos32b0 = $59
|
s_rwtswrite = $59
|
||||||
s_bootwrite = $5A
|
s_rdos = $5A
|
||||||
s_rwtswrite = $5B
|
s_sra = $5B
|
||||||
s_rdos = $5C
|
s_muse = $5C
|
||||||
s_sra = $5D
|
s_origin = $5D
|
||||||
s_muse = $5E
|
s_volumename = $5E
|
||||||
s_origin = $5F
|
s_dinkeydos = $5F
|
||||||
s_volumename = $60
|
s_trillium = $60
|
||||||
s_dinkeydos = $61
|
s_tamper = $61
|
||||||
s_trillium = $62
|
s_microfun = $62
|
||||||
s_tamper = $63
|
s_advent = $63
|
||||||
s_microfun = $64
|
s_gathering = $64
|
||||||
s_advent = $65
|
s_davidson = $65
|
||||||
s_gathering = $66
|
s_rdos13 = $66
|
||||||
s_davidson = $67
|
s_ssi = $67
|
||||||
s_rdos13 = $68
|
s_aacount = $68
|
||||||
s_ssi = $69
|
s_infocom18 = $69
|
||||||
s_aacount = $6A
|
s_toverify = $6A
|
||||||
s_infocom18 = $6B
|
s_13sector = $6B
|
||||||
s_toverify = $6C
|
s_dakin5 = $6C
|
||||||
s_13sector = $6D
|
s_springboard =$6D
|
||||||
s_dakin5 = $6E
|
s_hallabs = $6E
|
||||||
s_springboard =$6F
|
s_holle = $6F
|
||||||
s_hallabs = $70
|
s_hoffman = $70
|
||||||
s_holle = $71
|
s_diskvol0 = $71
|
||||||
s_hoffman = $72
|
s_e7everywhere=$72
|
||||||
s_diskvol0 = $73
|
s_choplifter = $73
|
||||||
s_e7everywhere=$74
|
s_pdi = $74
|
||||||
s_choplifter = $75
|
s_sve = $75
|
||||||
s_pdi = $76
|
STRINGCOUNT = $76
|
||||||
s_sve = $77
|
|
||||||
STRINGCOUNT = $78
|
|
||||||
|
Reference in New Issue
Block a user