Skip to content

Commit

Permalink
mac: Fix write verification
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed May 4, 2023
1 parent 20b9fe5 commit 0328007
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/greaseweazle/codec/macintosh/mac_gcr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from greaseweazle.track import MasterTrack, RawTrack
from greaseweazle.flux import Flux

default_revs = 1.1
default_revs = 1.3

self_sync_bytes = b'\xff\x3f\xcf\xf3\xfc\xff'
sector_sync_bytes = b'\xd5\xaa\x96' # 1101 0101 1010 1010 1001 0110
Expand Down Expand Up @@ -124,6 +124,9 @@ def decode_raw(self, track, pll=None) -> None:
print('T%d.%d: Ignoring unexpected sector '
'C:%d H:%d R:%d F:0x%x'
% (self.cyl, self.head, cyl, side, sec_id, fmt))
continue
if self.exists(sec_id):
continue

# Find data
offs += 5*8
Expand Down Expand Up @@ -183,6 +186,7 @@ def raw_track(self) -> MasterTrack:

def verify_track(self, flux):
readback_track = self.__class__(self.cyl, self.head, self.config)
readback_track.decode_raw(flux)
return (readback_track.nr_missing() == 0
and self.sector == readback_track.sector)

Expand Down

0 comments on commit 0328007

Please sign in to comment.