mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-21 13:29:19 +00:00
commit
f95c77f858
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -15,7 +15,7 @@ IDEncoded44
|
||||
ldy #$07
|
||||
jsr SearchTrack
|
||||
!byte $BD,$8C,$C0,$10,$FB,$38,$2A
|
||||
bcs .exit
|
||||
;; bcs .exit
|
||||
.exit
|
||||
rts
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -341,6 +341,9 @@ IDBootFailure
|
||||
|
||||
VerifyInfocom18
|
||||
lda $C0E9
|
||||
lda #2
|
||||
sta modsrc
|
||||
|
||||
.retry13
|
||||
ldx #$1A ; the length of a track
|
||||
ldy #0
|
||||
@ -355,6 +358,8 @@ VerifyInfocom18
|
||||
rts
|
||||
|
||||
.badsect
|
||||
dec modsrc
|
||||
beq .no
|
||||
lda gIsInfocom18
|
||||
beq .no ; if in Infocom mode already then we have a true failure
|
||||
bne .retry13 ; otherwise, try to identify 13-sector instead
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 -
|
||||
|
97
src/patchers/mecc.a
Normal file
97
src/patchers/mecc.a
Normal file
@ -0,0 +1,97 @@
|
||||
;-------------------------------
|
||||
; #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
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
adc gMECCFastloadType
|
||||
adc gMECCFastloadType
|
||||
ldx #6
|
||||
- pha
|
||||
tay
|
||||
txa
|
||||
pha
|
||||
lda .table+2-18,y
|
||||
sta .cmpbyte
|
||||
sta .modbyte
|
||||
lda .table-18,y
|
||||
ldx .table+1-18,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
|
||||
tya
|
||||
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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -6,19 +6,6 @@
|
||||
;-------------------------------
|
||||
!zone {
|
||||
_nibtable
|
||||
jmp .checkread
|
||||
|
||||
.writedata
|
||||
!byte $96,$97,$9A,$9B,$9D,$9E,$9F,$A6
|
||||
!byte $A7,$AB,$AC,$AD,$AE,$AF,$B2,$B3
|
||||
!byte $B4,$B5,$B6,$B7,$B9,$BA,$BB,$BC
|
||||
!byte $BD,$BE,$BF,$CB,$CD,$CE,$CF,$D3
|
||||
!byte $D6,$D7,$D9,$DA,$DB,$DC,$DD,$DE
|
||||
!byte $DF,$E5,$E6,$E7,$E9,$EA,$EB,$EC
|
||||
!byte $ED,$EE,$EF,$F2,$F3,$F4,$F5,$F6
|
||||
!byte $F7,$F9,$FA,$FB,$FC,$FD,$FE,$FF
|
||||
|
||||
.checkread
|
||||
bit gMode ; nothing to do here in verify-only mode
|
||||
bpl .exit
|
||||
lda gIsRWTS ; if DOS 3.3 RWTS
|
||||
@ -74,11 +61,18 @@ _nibtable
|
||||
bne .common
|
||||
|
||||
.fixwrite
|
||||
lda #$16
|
||||
sta modsrc
|
||||
lda #$20
|
||||
ldx #$00
|
||||
tay
|
||||
jsr build6and2 ; to $2000
|
||||
|
||||
lda #$40
|
||||
sta .loopcheck+1
|
||||
lda #$29
|
||||
ldx #<.writedata
|
||||
ldy #>.writedata
|
||||
ldx #$00
|
||||
ldy #$20
|
||||
|
||||
.common
|
||||
sta nibdestindex
|
||||
|
@ -63,7 +63,7 @@
|
||||
adc #$0B
|
||||
tax
|
||||
lda #$0B
|
||||
jmp ++
|
||||
bne ++
|
||||
+
|
||||
ldx #BASEPAGE
|
||||
inx
|
||||
|
@ -65,33 +65,12 @@
|
||||
|
||||
lda #s_rwtswrite
|
||||
jsr PrintByID
|
||||
|
||||
;build 6-and-2 denibbilisation table for reading
|
||||
|
||||
ldx #$16
|
||||
ldy #0
|
||||
-- stx $48
|
||||
txa
|
||||
asl
|
||||
bit $48
|
||||
beq +
|
||||
ora $48
|
||||
eor #$ff
|
||||
and #$7e
|
||||
- bcs +
|
||||
lsr
|
||||
bne -
|
||||
tya
|
||||
sta (BASEPAGE * $100) + $6B9 - $16, x
|
||||
|
||||
;and 6-and-2 nibbilisation table for writing
|
||||
|
||||
txa
|
||||
ora #$80
|
||||
sta (BASEPAGE * $100) + $B70, y
|
||||
iny
|
||||
+ inx
|
||||
bpl --
|
||||
lda #<((BASEPAGE * $100) + $6B9 - $16)
|
||||
sta modsrc
|
||||
lda #>((BASEPAGE * $100) + $6B9 - $16)
|
||||
ldx #<((BASEPAGE * $100) + $B70)
|
||||
ldy #>((BASEPAGE * $100) + $B70)
|
||||
jsr build6and2
|
||||
|
||||
;replace 6-and-2 encoder routine
|
||||
;and introduce DOS-order lookup
|
||||
@ -118,6 +97,43 @@
|
||||
|
||||
jmp .exit
|
||||
|
||||
;build 6-and-2 denibbilisation table for reading
|
||||
|
||||
build6and2
|
||||
sta modsrc+1
|
||||
stx moddest
|
||||
sty moddest+1
|
||||
ldx #$16
|
||||
ldy #0
|
||||
-- stx $48
|
||||
txa
|
||||
asl
|
||||
bit $48
|
||||
beq +
|
||||
ora $48
|
||||
eor #$ff
|
||||
and #$7e
|
||||
- bcs +
|
||||
lsr
|
||||
bne -
|
||||
tya
|
||||
pha
|
||||
txa
|
||||
tay
|
||||
pla
|
||||
sta (modsrc), y
|
||||
tay
|
||||
|
||||
;and 6-and-2 nibbilisation table for writing
|
||||
|
||||
txa
|
||||
ora #$80
|
||||
sta (moddest), y
|
||||
iny
|
||||
+ inx
|
||||
bpl --
|
||||
rts
|
||||
|
||||
.writemod
|
||||
!byte $A2,$00 ;LDX #$00
|
||||
!byte $A0,$02 ;LDY #$00
|
||||
|
@ -5,542 +5,241 @@
|
||||
!zone {
|
||||
bit gMode ; nothing to do here in verify-only mode
|
||||
bpl .jmpexit
|
||||
lda gIsRWTS ; DOS 3.3-shaped RWTSen only
|
||||
beq +
|
||||
ldy gIsRWTS ; DOS 3.3-shaped RWTSen only
|
||||
beq .initmatch1
|
||||
|
||||
.jmpexit
|
||||
jmp .exit
|
||||
;
|
||||
; address prologue byte 1 (read)
|
||||
;
|
||||
+ lda #$03
|
||||
ldx #$4F
|
||||
ldy #$06
|
||||
jsr compare ; if T00,S03,$4F ==
|
||||
!byte $BD,$8C,$C0
|
||||
!byte $10,$FB
|
||||
!byte $C9
|
||||
bcs +
|
||||
ldx #$56
|
||||
ldy #$03
|
||||
jsr compare ; and T00,S03,$56 ==
|
||||
!byte $D0,$F0
|
||||
!byte $EA
|
||||
bcs +
|
||||
ldx #$55
|
||||
ldy #$01
|
||||
jsr compare ; and T00,S03,$55 !=
|
||||
|
||||
; 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
|
||||
|
||||
; Y, compare bytes (nop-pad to four bytes)
|
||||
|
||||
.table2
|
||||
!byte $03,$D0,$F0,$EA,$EA
|
||||
!byte $04,$D0,$F2,$A0,$03
|
||||
!byte $02,$D0,$E7,$EA,$EA
|
||||
!byte $02,$D0,$AE,$EA,$EA
|
||||
!byte $03,$D0,$A4,$18,$EA
|
||||
!byte $03,$D0,$F4,$EA,$EA
|
||||
!byte $04,$D0,$F2,$A0,$56
|
||||
!byte $02,$D0,$E7,$EA,$EA
|
||||
!byte $03,$D0,$0A,$EA,$EA
|
||||
!byte $03,$F0,$5C,$38,$EA
|
||||
.table2_e
|
||||
|
||||
; compare/modify byte
|
||||
|
||||
.table3
|
||||
!byte $D5
|
||||
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
|
||||
bcs +
|
||||
ldx #$60
|
||||
ldy #$04
|
||||
jsr compare ; and T00,S03,$60 ==
|
||||
!byte $D0,$F2
|
||||
!byte $A0,$03
|
||||
bcs +
|
||||
ldx #$5F
|
||||
ldy #$01
|
||||
jsr compare ; and T00,S03,$5F !=
|
||||
!byte $AA
|
||||
bcc +
|
||||
ldy #$01
|
||||
jsr modify ; then set T00,S03,$5F =
|
||||
!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
|
||||
!byte $DE
|
||||
!byte $AA
|
||||
!byte $D5
|
||||
!byte $AA
|
||||
!byte $AD
|
||||
!byte $DE
|
||||
!byte $AA
|
||||
.table3_e
|
||||
|
||||
.initmatch1
|
||||
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
|
||||
.cmpbyte1
|
||||
!byte $D1 ; SMC
|
||||
bcs +
|
||||
|
||||
pha
|
||||
txa
|
||||
adc #7
|
||||
pha
|
||||
lda .findmatch1+1
|
||||
lsr
|
||||
adc .findmatch1+1
|
||||
adc .findmatch1+1
|
||||
adc #4
|
||||
tay
|
||||
ldx #$04
|
||||
- lda .table2+1-1,y
|
||||
sta .cmpbytes2-1,x
|
||||
dey
|
||||
dex
|
||||
bne -
|
||||
pla
|
||||
tax
|
||||
lda .table2,y
|
||||
tay
|
||||
pla
|
||||
jsr compare
|
||||
.cmpbytes2 ; SMC
|
||||
!byte $EA,$EA,$EA,$EA
|
||||
bcs +
|
||||
|
||||
pha
|
||||
lda .findmatch1+1
|
||||
lsr
|
||||
tay
|
||||
lda .table3,y
|
||||
sta .cmpbyte3
|
||||
sta .modify3
|
||||
pla
|
||||
dex
|
||||
ldy #1
|
||||
jsr compare
|
||||
.cmpbyte3 ; SMC
|
||||
!byte $D1
|
||||
bcc +
|
||||
ldy #$01
|
||||
jsr modify ; then set T00,S03,$6A =
|
||||
|
||||
ldy #1
|
||||
jsr modify
|
||||
.modify3 ; SMC
|
||||
!byte $D1
|
||||
|
||||
+ ldy .findmatch1+1
|
||||
iny
|
||||
iny
|
||||
cpy #.table1_e-.table1
|
||||
bne .initmatch1
|
||||
|
||||
ldy #$00
|
||||
|
||||
.initmatch2
|
||||
sty .findmatch4+1
|
||||
|
||||
.findmatch4
|
||||
ldy #$D1 ; SMC
|
||||
lda .table4,y
|
||||
ldx .table4+1,y
|
||||
ldy #1
|
||||
jsr compare
|
||||
!byte $A9
|
||||
bcs +
|
||||
|
||||
pha
|
||||
lda .findmatch4+1
|
||||
lsr
|
||||
tay
|
||||
lda .table5,y
|
||||
sta .cmpbyte5+1
|
||||
pla
|
||||
inx
|
||||
inx
|
||||
ldy #2
|
||||
jsr compare
|
||||
.cmpbyte5
|
||||
!byte $20,$D1 ; SMC
|
||||
|
||||
bcs +
|
||||
pha
|
||||
lda .findmatch4+1
|
||||
lsr
|
||||
tay
|
||||
lda .table6,y
|
||||
sta .cmpbyte6
|
||||
sta .modify6
|
||||
pla
|
||||
dex
|
||||
ldy #1
|
||||
jsr compare
|
||||
.cmpbyte6
|
||||
!byte $D1 ; SMC
|
||||
bcc +
|
||||
|
||||
ldy #1
|
||||
jsr modify
|
||||
.modify6
|
||||
!byte $D1 ; SMC
|
||||
|
||||
+ ldy .findmatch4+1
|
||||
iny
|
||||
iny
|
||||
cpy #.table4_e-.table4
|
||||
bne .initmatch2
|
||||
beq .exit
|
||||
|
||||
; 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
|
||||
|
||||
; compare byte
|
||||
|
||||
.table5
|
||||
!byte $D5
|
||||
!byte $D5
|
||||
!byte $D5
|
||||
!byte $D5
|
||||
!byte $D5
|
||||
!byte $D5
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
!byte $B8
|
||||
.table5_e
|
||||
|
||||
; modify byte
|
||||
|
||||
.table6
|
||||
!byte $D5
|
||||
!byte $AA
|
||||
!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
|
||||
}
|
||||
|
@ -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
|
||||
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
|
||||
bpl .exit
|
||||
lda #BASEPAGE+$0F
|
||||
sta .sector+2
|
||||
.search ldx #$A0
|
||||
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 .search
|
||||
.exit
|
||||
}
|
||||
|
@ -280,21 +280,18 @@ StringTableHigh
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2019-04-17",$00
|
||||
!text "Passport by 4am 2019-04-19",$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
|
||||
|
Loading…
Reference in New Issue
Block a user