mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-23 16:31:44 +00:00
Fixed sector number offset for raw sector labels
This commit is contained in:
parent
a4726f1c5a
commit
c89b89f9a7
@ -24,6 +24,7 @@ class AtrHeader(object):
|
||||
self.unused = 0
|
||||
self.flags = 0
|
||||
self.header_offset = 0
|
||||
self.starting_sector_label = 1
|
||||
self.initial_sector_size = sector_size
|
||||
self.num_initial_sectors = initial_sectors
|
||||
self.max_sectors = 0
|
||||
@ -280,7 +281,7 @@ class DiskImageBase(object):
|
||||
i = self.header.header_offset
|
||||
if self.header.image_size > 0:
|
||||
self.segments.append(ObjSegment(r[0:i], 0, 0, 0, i, name="%s Header" % self.header.file_format))
|
||||
self.segments.append(RawSectorsSegment(r[i:], 1, self.header.max_sectors, self.header.image_size, 128, 3, self.header.sector_size, name="Raw disk sectors"))
|
||||
self.segments.append(RawSectorsSegment(r[i:], self.header.starting_sector_label, self.header.max_sectors, self.header.image_size, self.header.initial_sector_size, self.header.num_initial_sectors, self.header.sector_size, name="Raw disk sectors"))
|
||||
self.segments.extend(self.get_boot_segments())
|
||||
self.segments.extend(self.get_vtoc_segments())
|
||||
self.segments.extend(self.get_directory_segments())
|
||||
|
@ -107,7 +107,7 @@ class Dos33Dirent(object):
|
||||
break
|
||||
sector_list.append(image.header.sector_from_track(t, s))
|
||||
self.sector_map = sector_list
|
||||
|
||||
|
||||
def start_read(self, image):
|
||||
if not self.is_sane:
|
||||
raise InvalidDirent("Invalid directory entry '%s'" % str(self))
|
||||
@ -136,6 +136,7 @@ class Dos33Header(AtrHeader):
|
||||
|
||||
def __init__(self):
|
||||
AtrHeader.__init__(self, None, 256, 0)
|
||||
self.starting_sector_label = 0
|
||||
self.header_offset = 0
|
||||
self.sector_order = range(16)
|
||||
self.vtoc_sector = 17 * 16
|
||||
|
Loading…
x
Reference in New Issue
Block a user