with all the trimmings

This commit is contained in:
Peter Ferrie 2019-04-17 22:26:19 -07:00
parent 7941fcb327
commit af64599488
20 changed files with 335 additions and 900 deletions

View File

@ -3,14 +3,13 @@ EnterCFFAIfAvailable
ldy #$04
- lda $C7F6, y
cmp CFFASignature, y
sec
bne +
dey
bpl -
jsr $C730
clc
!byte $24 ; hide next SEC
+
sec
rts
CFFASignature
!byte $43,$46,$33,$4B,$31

View File

@ -11,24 +11,24 @@
!zone {
IDDavidson
lda gIsProDOS ; ProDOS?
bne .no ; no, give up
bne .exit ; no, give up
lda gTrack ; track $22?
cmp #$22
bne .no ; no, give up
sec
bne .exit ; no, give up
lda gSector ; sector $00?
bne .no ; no, give up
bne .exit ; no, give up
;;lda #$00 ; try re-reading the sector but
sta $B92E ; ignore data field checksum failure
jsr ReadSector
lda #$13
sta $B92E
bcs .no ; didn't work, give up
bcs .exit ; didn't work, give up
lda #s_davidson
jsr PrintByID
lda #TRUE
sta gIsDavidson
clc
!byte $24
.no sec
.exit
rts
}

View File

@ -145,9 +145,6 @@ IDDOS33
ldy #$09
jsr compare ; if T00,S00,$F0 ==
!byte $8D,$FE,$08
!byte $EE,$F3,$03
!byte $4C,$1F,$08
; bcs .exit ; unknown code at $08F0 -> failure

View File

@ -15,7 +15,7 @@ IDEncoded44
ldy #$07
jsr SearchTrack
!byte $BD,$8C,$C0,$10,$FB,$38,$2A
bcs .exit
;; bcs .exit
.exit
rts
}

View File

@ -16,7 +16,7 @@ IDEncoded53
jsr SearchTrack
!byte $BD,$8C,$C0,$10,$FB,$C9,$B5,$F0
!byte $09,$28,$90,$DF,$49,$AD,$F0,$1F
bcs .exit
;; bcs .exit
.exit
rts
}

View File

@ -28,10 +28,8 @@ ID8b3
!byte $A2,$FF,$BD,$00,$08,$9D,$00,$B6
!byte $CA,$E0,$FF,$D0,$F5,$20,$CC,$08
!byte $A6,$2B
bcc .maybe
rts
bcs .exit
.maybe
lda #$00
ldx #$B3
ldy #$36
@ -44,5 +42,6 @@ ID8b3
!byte $00,$F0,$91,$00,$C0,$FF,$D0,$F6
!byte $C6,$01,$A9,$08,$C5,$01,$D0,$EC
!byte $60
.exit
rts
}

View File

@ -82,10 +82,7 @@ AnalyzeT00
!source "../patchers/bademu2.a"
!source "../patchers/rwts.a"
!source "../patchers/rwtslog.a"
!source "../patchers/mecc1.a"
!source "../patchers/mecc2.a"
!source "../patchers/mecc3.a"
!source "../patchers/mecc4.a"
!source "../patchers/mecc.a"
!source "../patchers/rol1e.a"
; !source "../patchers/thunder.a"
!source "../patchers/bb03.a"

View File

@ -4,7 +4,7 @@
;-------------------------------
; Passport
; a 4am hack
; (c) 2016-8 by 4am
; (c) 2016-9 by 4am
;
; Permission is hereby granted, free of charge, to any
; person obtaining a copy of this software and associated
@ -234,11 +234,6 @@ MainMenu
bne +
lda #%00000000
beq Action ; unconditional branch
+
cmp #k_demuffin
bne +
lda #%10000000
bne Action ; unconditional branch
+
cmp #k_crack
bne .getkey

View File

@ -20,12 +20,11 @@
bcs .exit
sta gDisplayBytes
pha
lda #s_a5count
jsr PrintByID
txa
clc
adc #$08
tax
lda #s_a5count
jsr PrintByID
pla
ldy #$02
jsr modify

View File

@ -23,9 +23,8 @@
lda #$07 ; sector to check for David-DOS variant
ldx gIsDavidDOS
beq .maybe
ldx gIsBoot0 ; if DOS 3.3 boot0 loader
bne .noButInYellow
ldx gIsBoot1 ; and DOS 3.3 boot1 loader
lda gIsBoot0 ; if DOS 3.3 boot0 loader
ora gIsBoot1 ; and DOS 3.3 boot1 loader
bne .noButInYellow
lda #$05 ; sector to check for DOS 3.3 variant
.maybe

View File

@ -358,7 +358,7 @@ ReadChoplifter
lda $c050
ldx #0
- lda $800,x
sta $400,x
sta $B300,x
inx
bne -
ldx #$42
@ -375,10 +375,10 @@ ReadChoplifter
sta $500,x
lda (*+$ff) and $ff00,x
sta $200,x
lda $400,x
sta $800,x
lda (*+$1ff) and $ff00,x
sta $400,x
lda $B300,x
sta $800,x
txs
inx
bne -

92
src/patchers/mecc.a Normal file
View File

@ -0,0 +1,92 @@
;-------------------------------
; #MECC
; MECC fastloader with custom
; address and data prologues
; e.g. 1: Word Munchers
; e.g. 2: Phonics Prime Time series
; e.g. 3: Word Munchers v1.1
; e.g. 4: A-201 Conquering Whole Numbers
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .jmpexit
lda gMECCFastloadType
cmp #ID_MECC1
bcc .jmpexit
cmp #ID_MECC4+1
bcs .jmpexit
asl
adc gMECCFastloadType
ldx #6
- pha
tay
txa
pha
lda .table+2,y
sta .cmpbyte
sta .modbyte
lda .table,y
ldx .table+1,y
ldy #$01
jsr compare
.cmpbyte
!byte $D1 ; SMC
bcc +
ldy #$01
jsr modify
.modbyte
!byte $D1 ; SMC
+ pla
tax
pla
tay
iny
iny
iny
dex
bne -
.jmpexit
jmp .exit
.table
; MECC1
!byte $0B,$08,$D5
!byte $0B,$12,$AA
!byte $0B,$1D,$96
!byte $0B,$8F,$D5
!byte $0B,$99,$AA
!byte $0B,$A3,$AD
; MECC2
!byte $07,$83,$D5
!byte $07,$8D,$AA
!byte $07,$98,$96
!byte $07,$15,$D5
!byte $07,$1F,$AA
!byte $07,$2A,$AD
; MECC3
!byte $0A,$E8,$D5
!byte $0A,$F2,$AA
!byte $0A,$FD,$96
!byte $0B,$6F,$D5
!byte $0B,$79,$AA
!byte $0B,$83,$AD
; MECC4
!byte $08,$83,$D5
!byte $08,$8D,$AA
!byte $08,$98,$96
!byte $08,$15,$D5
!byte $08,$1F,$AA
!byte $08,$2A,$AD
.exit
}

View File

@ -1,73 +0,0 @@
;-------------------------------
; #MECC1
; MECC fastloader with custom
; address and data prologues
; e.g. Word Munchers
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gMECCFastloadType
cmp #ID_MECC1
bne .exit
lda #$0B
ldx #$08
ldy #$01
jsr compare ; if T00,S0B,$08 !=
!byte $D5
bcc .addr2
ldy #$01
jsr modify ; then set T00,S0B,$0B =
!byte $D5
.addr2
lda #$0B
ldx #$12
ldy #$01
jsr compare ; if T00,S0B,$12 !=
!byte $AA
bcc .addr3
ldy #$01
jsr modify ; then set T00,S0B,$12 =
!byte $AA
.addr3
lda #$0B
ldx #$1D
ldy #$01
jsr compare ; if T00,S0B,$1D !=
!byte $96
bcc .data1
ldy #$01
jsr modify ; then set T00,S0B,$1D =
!byte $96
.data1
lda #$0B
ldx #$8F
ldy #$01
jsr compare ; if T00,S0B,$8F !=
!byte $D5
bcc .data2
ldy #$01
jsr modify ; then set T00,S0B,$8F =
!byte $D5
.data2
lda #$0B
ldx #$99
ldy #$01
jsr compare ; if T00,S0B,$99 !=
!byte $AA
bcc .data3
ldy #$01
jsr modify ; then set T00,S0B,$99 =
!byte $AA
.data3
lda #$0B
ldx #$A3
ldy #$01
jsr compare ; if T00,S0B,$A3 !=
!byte $AD
bcc .exit
ldy #$01
jsr modify ; then set T00,S0B,$A3 =
!byte $AD
.exit
}

View File

@ -1,73 +0,0 @@
;-------------------------------
; #MECC2
; MECC fastloader with custom
; address and data prologues
; e.g. Phonics Prime Time series
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gMECCFastloadType
cmp #ID_MECC2
bne .exit
lda #$07
ldx #$83
ldy #$01
jsr compare ; if T00,S07,$83 !=
!byte $D5
bcc .addr2
ldy #$01
jsr modify ; then set T00,S07,$83 =
!byte $D5
.addr2
lda #$07
ldx #$8D
ldy #$01
jsr compare ; if T00,S07,$8D !=
!byte $AA
bcc .addr3
ldy #$01
jsr modify ; then set T00,S07,$8D =
!byte $AA
.addr3
lda #$07
ldx #$98
ldy #$01
jsr compare ; if T00,S07,$98 !=
!byte $96
bcc .data1
ldy #$01
jsr modify ; then set T00,S07,$98 =
!byte $96
.data1
lda #$07
ldx #$15
ldy #$01
jsr compare ; if T00,S07,$15 !=
!byte $D5
bcc .data2
ldy #$01
jsr modify ; then set T00,S07,$15 =
!byte $D5
.data2
lda #$07
ldx #$1F
ldy #$01
jsr compare ; if T00,S07,$1F !=
!byte $AA
bcc .data3
ldy #$01
jsr modify ; then set T00,S07,$1F =
!byte $AA
.data3
lda #$07
ldx #$2A
ldy #$01
jsr compare ; if T00,S07,$2A !=
!byte $AD
bcc .exit
ldy #$01
jsr modify ; then set T00,S07,$2A =
!byte $AD
.exit
}

View File

@ -1,73 +0,0 @@
;-------------------------------
; #MECC3
; MECC fastloader with custom
; address and data prologues
; e.g. Word Munchers v1.1
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gMECCFastloadType
cmp #ID_MECC3
bne .exit
lda #$0A
ldx #$E8
ldy #$01
jsr compare ; if T00,S0A,$E8 !=
!byte $D5
bcc .addr2
ldy #$01
jsr modify ; then set T00,S0A,$E8 =
!byte $D5
.addr2
lda #$0A
ldx #$F2
ldy #$01
jsr compare ; if T00,S0A,$F2 !=
!byte $AA
bcc .addr3
ldy #$01
jsr modify ; then set T00,S0A,$F2 =
!byte $AA
.addr3
lda #$0A
ldx #$FD
ldy #$01
jsr compare ; if T00,S0A,$FD !=
!byte $96
bcc .data1
ldy #$01
jsr modify ; then set T00,S0A,$FD =
!byte $96
.data1
lda #$0B
ldx #$6F
ldy #$01
jsr compare ; if T00,S0B,$6F !=
!byte $D5
bcc .data2
ldy #$01
jsr modify ; then set T00,S0B,$6F =
!byte $D5
.data2
lda #$0B
ldx #$79
ldy #$01
jsr compare ; if T00,S0B,$79 !=
!byte $AA
bcc .data3
ldy #$01
jsr modify ; then set T00,S0B,$79 =
!byte $AA
.data3
lda #$0B
ldx #$83
ldy #$01
jsr compare ; if T00,S0B,$83 !=
!byte $AD
bcc .exit
ldy #$01
jsr modify ; then set T00,S0B,$83 =
!byte $AD
.exit
}

View File

@ -1,73 +0,0 @@
;-------------------------------
; #MECC4
; MECC fastloader with custom
; address and data prologues
; e.g. A-201 Conquering Whole Numbers
;-------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gMECCFastloadType
cmp #ID_MECC4
bne .exit
lda #$08
ldx #$83
ldy #$01
jsr compare ; if T00,S08,$83 !=
!byte $D5
bcc .addr2
ldy #$01
jsr modify ; then set T00,S08,$83 =
!byte $D5
.addr2
lda #$08
ldx #$8D
ldy #$01
jsr compare ; if T00,S08,$8D !=
!byte $AA
bcc .addr3
ldy #$01
jsr modify ; then set T00,S08,$8D =
!byte $AA
.addr3
lda #$08
ldx #$98
ldy #$01
jsr compare ; if T00,S08,$98 !=
!byte $96
bcc .data1
ldy #$01
jsr modify ; then set T00,S08,$98 =
!byte $96
.data1
lda #$08
ldx #$15
ldy #$01
jsr compare ; if T00,S08,$15 !=
!byte $D5
bcc .data2
ldy #$01
jsr modify ; then set T00,S08,$15 =
!byte $D5
.data2
lda #$08
ldx #$1F
ldy #$01
jsr compare ; if T00,S08,$1F !=
!byte $AA
bcc .data3
ldy #$01
jsr modify ; then set T00,S08,$1F =
!byte $AA
.data3
lda #$08
ldx #$2A
ldy #$01
jsr compare ; if T00,S08,$2A !=
!byte $AD
bcc .exit
ldy #$01
jsr modify ; then set T00,S08,$2A =
!byte $AD
.exit
}

View File

@ -63,7 +63,7 @@
adc #$0B
tax
lda #$0B
jmp ++
bne ++
+
ldx #BASEPAGE
inx

View File

@ -4,543 +4,227 @@
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .jmpexit
lda gIsRWTS ; DOS 3.3-shaped RWTSen only
beq +
.jmpexit
bpl .jmpexit1
ldy gIsRWTS ; DOS 3.3-shaped RWTSen only
beq .initmatch
.jmpexit1
jmp .exit
;
; address prologue byte 1 (read)
;
+ lda #$03
ldx #$4F
ldy #$06
jsr compare ; if T00,S03,$4F ==
.initmatch
sty .findmatch1+1
.findmatch1
ldy #$D1 ; SMC
lda #$C9
ldx .table1+1,y
cpx #$E1
bne .compare1
lda #$49
.compare1
sta .cmpbyte1
lda .table1,y
ldy #6
jsr compare
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
.cmpbyte1
!byte $D1 ; SMC
bcs +
ldx #$56
ldy #$03
jsr compare ; and T00,S03,$56 ==
!byte $D0,$F0
!byte $EA
pha
lda .findmatch1+1
asl
adc .findmatch1+1
tay
lda .table2+1,y
pha
tax
- lda .table2+2,x
sta .cmpbytes2,x
dex
bpl -
ldx .table2,y
pla
tay
pla
jsr compare
.cmpbytes2 ; SMC
!byte $EA,$EA,$EA,$EA
bcs +
ldx #$55
ldy #$01
jsr compare ; and T00,S03,$55 !=
!byte $D5
ldy .findmatch1+1
ldx .table3+1,y
stx .cmpbyte3
stx .modify3
ldx .table3,y
ldy #1
jsr compare
.cmpbyte3 ; SMC
!byte $D1
bcc +
ldy #$01
jsr modify ; then set T00,S03,$55 =
!byte $D5
;
; address prologue byte 2 (read)
;
+ lda #$03
ldx #$59
ldy #$06
jsr compare ; if T00,S03,$59 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
ldy #1
jsr modify
.modify3 ; SMC
!byte $D1
+ ldy .findmatch1+1
lda .table4,y
ldx .table4+1,y
ldy #1
jsr compare
!byte $A9
bcs +
ldx #$60
ldy #$04
jsr compare ; and T00,S03,$60 ==
!byte $D0,$F2
!byte $A0,$03
+ ldy .findmatch1+1
ldx .table5+1,y
stx .cmpbyte5+1
ldx .table5,y
tay
txa
pha
tya
ldy #2
jsr compare
.cmpbyte5
!byte $20,$D1 ; SMC
tay
pla
bcs +
ldx #$5F
ldy #$01
jsr compare ; and T00,S03,$5F !=
!byte $AA
tax
dex
tya
pha
lda .findmatch1+1
lsr
tay
lda .table6,y
sta .cmpbyte6
sta .modify6
tya
ldy #1
jsr compare
.cmpbyte6
!byte $D1 ; SMC
bcc +
ldy #$01
jsr modify ; then set T00,S03,$5F =
ldy #1
jsr modify
.modify6
!byte $D1 ; SMC
+ ldy .findmatch1+1
iny
iny
cpy #(.table1_e-.table1)*2/3
beq .jmpexit2
jmp .initmatch
.jmpexit2
jmp .exit
; address prologue (read)
; A,X
.table1
!byte $03,$4F
!byte $03,$59
!byte $03,$64
!byte $03,$8B
!byte $03,$95
!byte $02,$E1
!byte $02,$EB
!byte $02,$F6
!byte $03,$2F
!byte $03,$39
.table1_e
; X,Y, compare bytes (nop-pad to four bytes)
.table2
!byte $56,$03,$D0,$F0,$EA,$EA
!byte $60,$04,$D0,$F2,$A0,$03
!byte $6B,$02,$D0,$E7,$EA,$EA
!byte $92,$02,$D0,$AE,$EA,$EA
!byte $9C,$03,$D0,$A4,$18,$EA
!byte $E8,$03,$D0,$F4,$EA,$EA
!byte $F2,$04,$D0,$F2,$A0,$56
!byte $FD,$02,$D0,$E7,$EA,$EA
!byte $36,$03,$D0,$0A,$EA,$EA
!byte $40,$03,$F0,$5C,$38,$EA
.table2_e
; X, compare byte
.table3
!byte $55,$D5
!byte $5F,$AA
!byte $6A,$96
!byte $91,$DE
!byte $9B,$AA
!byte $E7,$D5
!byte $F1,$AA
!byte $FC,$AD
!byte $35,$DE
!byte $3F,$AA
.table3_e
; address prologue (write)
; A,X
.table4
!byte $06,$79
!byte $06,$7E
!byte $06,$83
!byte $06,$AD
!byte $06,$B2
!byte $06,$B7
!byte $02,$52
!byte $02,$57
!byte $02,$5C
!byte $02,$9D
!byte $02,$A2
!byte $02,$A7
!byte $02,$AC
.table4_e
; X, compare byte
.table5
!byte $7B,$D5
!byte $80,$D5
!byte $85,$D5
!byte $AF,$D5
!byte $B4,$D5
!byte $B9,$D5
!byte $54,$B8
!byte $59,$B8
!byte $5E,$B8
!byte $9F,$B8
!byte $A4,$B8
!byte $A9,$B8
!byte $AE,$B8
.table5_e
; modify byte
.table6
!byte $D5
!byte $AA
;
; address prologue byte 3 (read)
;
+ lda #$03
ldx #$64
ldy #$06
jsr compare ; if T00,S03,$64 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$6B
ldy #$02
jsr compare ; and T00,S03,$6B ==
!byte $D0,$E7
bcs +
ldx #$6A
ldy #$01
jsr compare ; and T00,S03,$6A !=
!byte $96
bcc +
ldy #$01
jsr modify ; then set T00,S03,$6A =
!byte $96
;
; address epilogue byte 1 (read)
;
+ lda #$03
ldx #$8B
ldy #$06
jsr compare ; if T00,S03,$8B ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$92
ldy #$02
jsr compare ; and T00,S03,$92 ==
!byte $D0,$AE
bcs +
ldx #$91
ldy #$01
jsr compare ; and T00,S03,$91 !=
!byte $DE
bcc +
ldy #$01
jsr modify ; then set T00,S03,$91 =
!byte $DE
;
; address epilogue byte 2 (read)
;
+ lda #$03
ldx #$95
ldy #$06
jsr compare ; if T00,S03,$95 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$9C
ldy #$03
jsr compare ; and T00,S03,$9C ==
!byte $D0,$A4
!byte $18
bcs +
ldx #$9B
ldy #$01
jsr compare ; and T00,S03,$9B !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S03,$9B =
!byte $AA
;
; data prologue byte 1 (read)
;
+ lda #$02
ldx #$E1
ldy #$06
jsr compare ; if T00,S02,$E1 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $49
bcs +
ldx #$E8
ldy #$03
jsr compare ; and T00,S02,$E8 ==
!byte $D0,$F4
!byte $EA
bcs +
ldx #$E7
ldy #$01
jsr compare ; and T00,S02,$E7 !=
!byte $D5
bcc +
ldy #$01
jsr modify ; then set T00,S02,$E7 =
!byte $D5
;
; data prologue byte 2 (read)
;
+ lda #$02
ldx #$EB
ldy #$06
jsr compare ; if T00,S02,$EB ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$F2
ldy #$04
jsr compare ; and T00,S02,$F2 ==
!byte $D0,$F2
!byte $A0,$56
bcs +
ldx #$F1
ldy #$01
jsr compare ; and T00,S02,$F1 !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S02,$F1 =
!byte $AA
;
; data prologue byte 3 (read)
;
+ lda #$02
ldx #$F6
ldy #$06
jsr compare ; if T00,S02,$F6 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$FD
ldy #$02
jsr compare ; and T00,S02,$FD ==
!byte $D0,$E7
bcs +
ldx #$FC
ldy #$01
jsr compare ; and T00,S02,$FC !=
!byte $AD
bcc +
ldy #$01
jsr modify ; then set T00,S02,$FC =
!byte $AD
;
; data epilogue byte 1 (read)
;
+ lda #$03
ldx #$2F
ldy #$06
jsr compare ; if T00,S03,$2F ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$36
ldy #$03
jsr compare ; and T00,S03,$36 ==
!byte $D0,$0A,$EA
bcs +
ldx #$35
ldy #$01
jsr compare ; and T00,S03,$35 !=
!byte $DE
bcc +
ldy #$01
jsr modify ; then set T00,S03,$35 =
!byte $DE
;
; data epilogue byte 2 (read)
;
+ lda #$03
ldx #$39
ldy #$06
jsr compare ; if T00,S03,$39 ==
!byte $BD,$8C,$C0
!byte $10,$FB
!byte $C9
bcs +
ldx #$40
ldy #$03
jsr compare ; and T00,S03,$40 ==
!byte $F0,$5C,$38
bcs +
ldx #$3F
ldy #$01
jsr compare ; and T00,S03,$3F !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S03,$3F =
!byte $AA
;
; address prologue byte 1 (write)
;
+ lda #$06
ldx #$79
ldy #$01
jsr compare ; if T00,S06,$79 ==
!byte $A9
bcs +
ldx #$7B
ldy #$02
jsr compare ; and T00,S06,$7B ==
!byte $20,$D5
bcs +
ldx #$7A
ldy #$01
jsr compare ; and T00,S06,$7A !=
!byte $D5
bcc +
ldy #$01
jsr modify ; then set T00,S06,$7A =
!byte $D5
;
; address prologue byte 2 (write)
;
+ lda #$06
ldx #$7E
ldy #$01
jsr compare ; if T00,S06,$7E ==
!byte $A9
bcs +
ldx #$80
ldy #$02
jsr compare ; and T00,S06,$80 ==
!byte $20,$D5
bcs +
ldx #$7F
ldy #$01
jsr compare ; and T00,S06,$7F !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S06,$7F =
!byte $AA
;
; address prologue byte 3 (write)
;
+ lda #$06
ldx #$83
ldy #$01
jsr compare ; if T00,S06,$83 ==
!byte $A9
bcs +
ldx #$85
ldy #$02
jsr compare ; and T00,S06,$85 ==
!byte $20,$D5
bcs +
ldx #$84
ldy #$01
jsr compare ; and T00,S06,$84 !=
!byte $96
bcc +
ldy #$01
jsr modify ; then set T00,S06,$84 =
!byte $96
;
; address epilogue byte 1 (write)
;
+ lda #$06
ldx #$AD
ldy #$01
jsr compare ; if T00,S06,$AD ==
!byte $A9
bcs +
ldx #$AF
ldy #$02
jsr compare ; and T00,S06,$AF ==
!byte $20,$D5
bcs +
ldx #$AE
ldy #$01
jsr compare ; and T00,S06,$AE !=
!byte $DE
bcc +
ldy #$01
jsr modify ; then set T00,S06,$AE =
!byte $DE
;
; address epilogue byte 2 (write)
;
+ lda #$06
ldx #$B2
ldy #$01
jsr compare ; if T00,S06,$B2 ==
!byte $A9
bcs +
ldx #$B4
ldy #$02
jsr compare ; and T00,S06,$B4 ==
!byte $20,$D5
bcs +
ldx #$B3
ldy #$01
jsr compare ; and T00,S06,$B3 !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S06,$B3 =
!byte $AA
;
; address epilogue byte 3 (write)
;
+ lda #$06
ldx #$B7
ldy #$01
jsr compare ; if T00,S06,$B7 ==
!byte $A9
bcs +
ldx #$B9
ldy #$02
jsr compare ; and T00,S06,$B9 ==
!byte $20,$D5
bcs +
ldx #$B8
ldy #$01
jsr compare ; and T00,S06,$B8 !=
!byte $EB
bcc +
ldy #$01
jsr modify ; then set T00,S06,$B8 =
!byte $EB
;
; data prologue byte 1 (write)
;
+ lda #$02
ldx #$52
ldy #$01
jsr compare ; if T00,S02,$52 ==
!byte $A9
bcs +
ldx #$54
ldy #$02
jsr compare ; and T00,S02,$54 ==
!byte $20,$B8
bcs +
ldx #$53
ldy #$01
jsr compare ; and T00,S02,$53 !=
!byte $D5
bcc +
ldy #$01
jsr modify ; then set T00,S02,$53 =
!byte $D5
;
; data prologue byte 2 (write)
;
+ lda #$02
ldx #$57
ldy #$01
jsr compare ; if T00,S02,$57 ==
!byte $A9
bcs +
ldx #$59
ldy #$02
jsr compare ; and T00,S02,$59 ==
!byte $20,$B8
bcs +
ldx #$58
ldy #$01
jsr compare ; and T00,S02,$58 ==
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S02,$58 =
!byte $AA
;
; data prologue byte 3 (write)
;
+ lda #$02
ldx #$5C
ldy #$01
jsr compare ; if T00,S02,$5C ==
!byte $A9
bcs +
ldx #$5E
ldy #$02
jsr compare ; and T00,S02,$5E ==
!byte $20,$B8
bcs +
ldx #$5D
ldy #$01
jsr compare ; and T00,S02,$5D !=
!byte $AD
bcc +
ldy #$01
jsr modify ; then set T00,S02,$5D =
!byte $AD
;
; data epilogue byte 1 (write)
;
+ lda #$02
ldx #$9D
ldy #$01
jsr compare ; if T00,S02,$9D ==
!byte $A9
bcs +
ldx #$9F
ldy #$02
jsr compare ; and T00,S02,$9F ==
!byte $20,$B8
bcs +
ldx #$9E
ldy #$01
jsr compare ; and T00,S02,$9E !=
!byte $DE
bcc +
ldy #$01
jsr modify ; then set T00,S02,$9E =
!byte $DE
;
; data epilogue byte 2 (write)
;
+ lda #$02
ldx #$A2
ldy #$01
jsr compare ; if T00,S02,$A2 ==
!byte $A9
bcs +
ldx #$A4
ldy #$02
jsr compare ; and T00,S02,$A4 ==
!byte $20,$B8
bcs +
ldx #$A3
ldy #$01
jsr compare ; and T00,S02,$A3 !=
!byte $AA
bcc +
ldy #$01
jsr modify ; then set T00,S02,$A3 =
!byte $AA
;
; data epilogue byte 3 (write)
;
+ lda #$02
ldx #$A7
ldy #$01
jsr compare ; if T00,S02,$A7 ==
!byte $A9
bcs +
ldx #$A9
ldy #$02
jsr compare ; and T00,S02,$A9 ==
!byte $20,$B8
bcs +
ldx #$A8
ldy #$01
jsr compare ; and T00,S02,$A8 !=
!byte $EB
bcc +
ldy #$01
jsr modify ; then set T00,S02,$A8 =
!byte $EB
;
; data epilogue byte 4 (write)
; needed by some Sunburst disks
;
+ lda #$02
ldx #$AC
ldy #$01
jsr compare ; if T00,S02,$AC ==
!byte $A9
bcs +
ldx #$AE
ldy #$02
jsr compare ; and T00,S02,$AE ==
!byte $20,$B8
bcs +
ldx #$AD
ldy #$01
jsr compare ; and T00,S02,$AD !=
!byte $FF
bcc +
ldy #$01
jsr modify ; then set T00,S02,$AD =
!byte $FF
+
.table6_e
.exit
}

View File

@ -9,65 +9,34 @@
!zone {
universale7
bit gMode ; nothing to do here in verify-only mode
bpl .jmpexit
lda #$0F
sta .sector+1
.sector lda #$FF ; modified at runtime
bpl .exit
lda #BASEPAGE+$0F
sta .sector+2
ldx #$A0
ldy #$60
jsr compare
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
!byte $AC,$00,$AC,$00,$AC,$00,$AC,$00
bcc +
jmp .nextsector
.jmpexit
jmp .exit
lda #$00
.eor eor #$AC
.sector cmp $D100,x ; modified at runtime
bne .nextsector
inx
cpx #$80
bcc .sector
bne .eor
+
lda .sector+1
ldx #$00
ldy #$80
jsr compare
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
bcs .nextsector
lda .sector+1
lda .sector+2
and #$0F
pha
sta gDisplayBytes
lda #s_e7
jsr PrintByID
lda .sector+1
pla
ldx #$A3
ldy #$0C
jsr modify
!byte $64,$B4,$44,$80,$2C,$DC,$18,$B4,$44,$80,$44,$B4
.nextsector
dec .sector+1
bmi .exit
jmp .sector
dec .sector+2
lda .sector+2
cmp #BASEPAGE-1
bne .sector
.exit
}

View File

@ -282,19 +282,16 @@ StringTableHigh
.header
!text "Passport by 4am 2019-04-17",$00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "
!scrxor $40, "V"
!text "erify disk",$8D,$8D
!text " "
!scrxor $40, "D"
!text "emuffin disk",$8D,$8D
!text " "
!scrxor $40, "C"
!text "rack disk",$8D,$8D
!text " "
!scrxor $40, "Q"
!text "uit",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text "uit",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text "source: S6,D1 target: "
!scrxor $40, "S"
!text "%S,D%D",$00