verify complete RW18 disks (e.g. Toy Shop data disks)

This commit is contained in:
Peter Ferrie 2021-06-07 08:58:39 -07:00
parent 6d713afd14
commit ff6e074bee
3 changed files with 24 additions and 24 deletions

View File

@ -482,9 +482,11 @@ VerifyInfocom18
ldx #$06 ; six sectors, three times the usual size
stx tmp ; sector counter
bne +
--- jsr ReadNib
.retryrw18
jsr ReadNib
-- cmp #$D5
bne ---
bne .retryrw18
jsr ReadNib
cmp #$9D
bne --
@ -493,7 +495,9 @@ VerifyInfocom18
+ ldy #4
- dey
beq .badrw18
jsr ReadNib6
-- ldx $C0EC
bpl --
lda $BA00,x
eor #$A5
bne -
sta $3A
@ -541,22 +545,33 @@ VerifyInfocom18
cmp #$D4
bne .badrw18
dec tmp
bne ---
bne .jmpretryrw18
jmp .checkmode
.jmpretryrw18
jmp .retryrw18
.badrw18
jmp .badsect
.rw18pro
jsr ReadNib6 ; region (half)
-- ldx $C0EC
bpl --
lda $BA00,x ; region (half)
sta $2C
jsr ReadNib6 ; region (half)
-- ldx $C0EC
bpl --
lda $BA00,x ; region (half)
sta $2D
jsr ReadNib6 ; checksum
-- ldx $C0EC
bpl --
lda $BA00,x ; checksum
eor $2C
eor $2D
bne +
jsr ReadNib6 ; epilogue
-- ldx $C0EC
bpl --
lda $BA00,x ; epilogue
eor #$AA
+ rts

View File

@ -346,7 +346,7 @@ StringTableHigh
.passport
!text "Passport ",$00
.header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-03",$00
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-07",$00
.bar9
!text "_________",$00
.bar18

View File

@ -250,21 +250,6 @@ ReadNib
bpl -
rts
;-------------------------------
; ReadNib6
; read a single nibble from S6,D1
; return corresponding 6-bit value
;
; in: S6,D1 must be spun up and ready to read
; out: A contains 6-bit value
; X contains nibble value
;-------------------------------
ReadNib6
jsr ReadNib
tax
lda $BA00,x
rts
;-------------------------------
; Read4x4
; read a 4-4-encoded value from S6,D1