Esempio n. 1
0
 def __init__(self, image, file_num=0, bytes=None, starting_sector=None):
     self.length = 0
     self.sector_map = None
     self.sector_map_index = 0
     AtariDosDirent.__init__(self, image, file_num, bytes=bytes)
     if starting_sector is not None:
         # Root directory doesn't have the starting sector in the dirent,
         # rather the boot sector so it must be specified here.
         self.starting_sector = starting_sector
         self.is_sane = self.sanity_check(image)
Esempio n. 2
0
 def __init__(self, image):
     AtariDosDirent.__init__(self, image)
     self.in_use = True
     self.starting_sector = 4
     self.filename = image.filename
     if not self.filename:
         self.filename = "KBOOT"
     if self.filename == self.filename.upper():
         self.ext = "XEX"
     else:
         self.ext = "xex"
     start, size = image.header.get_pos(4)
     i = image.header.header_offset + 9
     count = image.bytes[i] + 256 * image.bytes[i+1] + 256 * 256 *image.bytes[i + 2]
     if start + count > image.size or start + count < image.size - 128:
         self.is_sane = False
     else:
         self.exe_size = count
         self.exe_start = start
     self.num_sectors = count / 128 + 1
Esempio n. 3
0
 def __init__(self, image):
     AtariDosDirent.__init__(self, image)
     self.in_use = True
     self.starting_sector = 4
     self.filename = image.filename
     if not self.filename:
         self.filename = "KBOOT"
     if self.filename == self.filename.upper():
         self.ext = "XEX"
     else:
         self.ext = "xex"
     start, size = image.header.get_pos(4)
     i = image.header.header_offset + 9
     count = image.bytes[i] + 256 * image.bytes[
         i + 1] + 256 * 256 * image.bytes[i + 2]
     if start + count > image.size or start + count < image.size - 128:
         self.is_sane = False
     else:
         self.exe_size = count
         self.exe_start = start
     self.num_sectors = count / 128 + 1