From 4093077e3c32d52bb8b01f54ef68303d29cce57c Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Sun, 7 Feb 2016 18:37:38 -0800 Subject: [PATCH] Added enhanced density VTOC2 segment --- atrcopy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/atrcopy.py b/atrcopy.py index 4296120..0ef1d41 100755 --- a/atrcopy.py +++ b/atrcopy.py @@ -419,6 +419,7 @@ class AtrDiskImage(object): self.header = None self.first_vtoc = 360 self.num_vtoc = 1 + self.vtoc2 = 0 self.first_data_after_vtoc = 369 self.total_sectors = 0 self.unused_sectors = 0 @@ -496,6 +497,11 @@ class AtrDiskImage(object): self.num_vtoc = num self.total_sectors = values[1] self.unused_sectors = values[2] + if self.header.image_size == 133120: + # enhanced density has 2nd VTOC + self.vtoc2 = 1024 + extra_free = self.get_sectors(self.vtoc2)[122:124].view(dtype=' 0: + start, count = self.get_contiguous_sectors(self.vtoc2, 1) + segment = self.get_raw_sectors_segment(self.vtoc2, 1, count, self.bytes[start:start+count], name="VTOC2") + segments.append(segment) return segments def get_directory_segments(self):