From c36aebd593a796f0687f562e7f9de24c4864159e Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Thu, 11 Feb 2016 19:18:09 -0800 Subject: [PATCH] Added SpartaDOS sector map parsing and initial directory support --- atrcopy.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/atrcopy.py b/atrcopy.py index c2706d4..55d6daf 100755 --- a/atrcopy.py +++ b/atrcopy.py @@ -935,13 +935,35 @@ class SpartaDosDiskImage(DiskImageBase): segments.append(segment) return segments + def get_sector_map(self, sector): + m = None + while sector > 0: + b, _ = self.get_sectors(sector) + sector, prev = b[0:4].view(dtype=' 0: + segment = IndexedByteSegment(self.bytes, self.style, byte_order, name=name) + else: + segment = EmptySegment(self.bytes, self.style, name=name) + segment.map_width = 23 segments.append(segment) return segments