Пример #1
0
 def _read(self):
     self.phys_drive_num = self._io.read_u1()
     self.reserved1 = self._io.read_u1()
     self.ext_boot_sign = self._io.read_u1()
     self.volume_id = self._io.read_bytes(4)
     self.partition_volume_label = (KaitaiStream.bytes_strip_right(self._io.read_bytes(11), 32)).decode(u"ASCII")
     self.fs_type_str = (KaitaiStream.bytes_strip_right(self._io.read_bytes(8), 32)).decode(u"ASCII")
Пример #2
0
 def _read(self):
     self._debug['ls_per_fat']['start'] = self._io.pos()
     self.ls_per_fat = self._io.read_u4le()
     self._debug['ls_per_fat']['end'] = self._io.pos()
     self._debug['has_active_fat']['start'] = self._io.pos()
     self.has_active_fat = self._io.read_bits_int(1) != 0
     self._debug['has_active_fat']['end'] = self._io.pos()
     self._debug['reserved1']['start'] = self._io.pos()
     self.reserved1 = self._io.read_bits_int(3)
     self._debug['reserved1']['end'] = self._io.pos()
     self._debug['active_fat_id']['start'] = self._io.pos()
     self.active_fat_id = self._io.read_bits_int(4)
     self._debug['active_fat_id']['end'] = self._io.pos()
     self._io.align_to_byte()
     self._debug['reserved2']['start'] = self._io.pos()
     self.reserved2 = self._io.read_bytes(1)
     self._debug['reserved2']['end'] = self._io.pos()
     if not self.reserved2 == b"\x00":
         raise kaitaistruct.ValidationNotEqualError(
             b"\x00", self.reserved2, self._io,
             u"/types/ext_bios_param_block_fat32/seq/4")
     self._debug['fat_version']['start'] = self._io.pos()
     self.fat_version = self._io.read_u2le()
     self._debug['fat_version']['end'] = self._io.pos()
     self._debug['root_dir_start_clus']['start'] = self._io.pos()
     self.root_dir_start_clus = self._io.read_u4le()
     self._debug['root_dir_start_clus']['end'] = self._io.pos()
     self._debug['ls_fs_info']['start'] = self._io.pos()
     self.ls_fs_info = self._io.read_u2le()
     self._debug['ls_fs_info']['end'] = self._io.pos()
     self._debug['boot_sectors_copy_start_ls']['start'] = self._io.pos()
     self.boot_sectors_copy_start_ls = self._io.read_u2le()
     self._debug['boot_sectors_copy_start_ls']['end'] = self._io.pos()
     self._debug['reserved3']['start'] = self._io.pos()
     self.reserved3 = self._io.read_bytes(12)
     self._debug['reserved3']['end'] = self._io.pos()
     self._debug['phys_drive_num']['start'] = self._io.pos()
     self.phys_drive_num = self._io.read_u1()
     self._debug['phys_drive_num']['end'] = self._io.pos()
     self._debug['reserved4']['start'] = self._io.pos()
     self.reserved4 = self._io.read_u1()
     self._debug['reserved4']['end'] = self._io.pos()
     self._debug['ext_boot_sign']['start'] = self._io.pos()
     self.ext_boot_sign = self._io.read_u1()
     self._debug['ext_boot_sign']['end'] = self._io.pos()
     self._debug['volume_id']['start'] = self._io.pos()
     self.volume_id = self._io.read_bytes(4)
     self._debug['volume_id']['end'] = self._io.pos()
     self._debug['partition_volume_label']['start'] = self._io.pos()
     self.partition_volume_label = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(11), 32)).decode(u"ASCII")
     self._debug['partition_volume_label']['end'] = self._io.pos()
     self._debug['fs_type_str']['start'] = self._io.pos()
     self.fs_type_str = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 32)).decode(u"ASCII")
     self._debug['fs_type_str']['end'] = self._io.pos()
 def _read(self):
     self.str_pad = KaitaiStream.bytes_strip_right(self._io.read_bytes(20),
                                                   64)
     self.str_term = KaitaiStream.bytes_terminate(self._io.read_bytes(20),
                                                  64, False)
     self.str_term_and_pad = KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(20), 43), 64,
         False)
     self.str_term_include = KaitaiStream.bytes_terminate(
         self._io.read_bytes(20), 64, True)
Пример #4
0
 def _read(self):
     self.str_pad = (KaitaiStream.bytes_strip_right(self._io.read_bytes(20),
                                                    64)).decode(u"UTF-8")
     self.str_term = (KaitaiStream.bytes_terminate(self._io.read_bytes(20),
                                                   64,
                                                   False)).decode(u"UTF-8")
     self.str_term_and_pad = (KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(20), 43), 64,
         False)).decode(u"UTF-8")
     self.str_term_include = (KaitaiStream.bytes_terminate(
         self._io.read_bytes(20), 64, True)).decode(u"UTF-8")
Пример #5
0
 def _read(self):
     self.timestamp = self._io.read_u4le()
     self.offset_idx = self._io.read_u2le()
     self.flags = self._io.read_u1()
     self.name = (KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(25), 0), 0,
         False)).decode(u"ASCII")
Пример #6
0
 def _read(self):
     self._debug['name']['start'] = self._io.pos()
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"UTF-8")
     self._debug['name']['end'] = self._io.pos()
     self._debug['virtual_size']['start'] = self._io.pos()
     self.virtual_size = self._io.read_u4le()
     self._debug['virtual_size']['end'] = self._io.pos()
     self._debug['virtual_address']['start'] = self._io.pos()
     self.virtual_address = self._io.read_u4le()
     self._debug['virtual_address']['end'] = self._io.pos()
     self._debug['size_of_raw_data']['start'] = self._io.pos()
     self.size_of_raw_data = self._io.read_u4le()
     self._debug['size_of_raw_data']['end'] = self._io.pos()
     self._debug['pointer_to_raw_data']['start'] = self._io.pos()
     self.pointer_to_raw_data = self._io.read_u4le()
     self._debug['pointer_to_raw_data']['end'] = self._io.pos()
     self._debug['pointer_to_relocations']['start'] = self._io.pos()
     self.pointer_to_relocations = self._io.read_u4le()
     self._debug['pointer_to_relocations']['end'] = self._io.pos()
     self._debug['pointer_to_linenumbers']['start'] = self._io.pos()
     self.pointer_to_linenumbers = self._io.read_u4le()
     self._debug['pointer_to_linenumbers']['end'] = self._io.pos()
     self._debug['number_of_relocations']['start'] = self._io.pos()
     self.number_of_relocations = self._io.read_u2le()
     self._debug['number_of_relocations']['end'] = self._io.pos()
     self._debug['number_of_linenumbers']['start'] = self._io.pos()
     self.number_of_linenumbers = self._io.read_u2le()
     self._debug['number_of_linenumbers']['end'] = self._io.pos()
     self._debug['characteristics']['start'] = self._io.pos()
     self.characteristics = self._io.read_u4le()
     self._debug['characteristics']['end'] = self._io.pos()
Пример #7
0
    def _read(self):
        self._debug['magic']['start'] = self._io.pos()
        self.magic = self._io.read_bytes(8)
        self._debug['magic']['end'] = self._io.pos()
        if not self.magic == b"\x23\x4F\x50\x4C\x5F\x49\x49\x23":
            raise kaitaistruct.ValidationNotEqualError(
                b"\x23\x4F\x50\x4C\x5F\x49\x49\x23", self.magic, self._io,
                u"/seq/0")
        self._debug['instruments']['start'] = self._io.pos()
        self.instruments = [None] * (175)
        for i in range(175):
            if not 'arr' in self._debug['instruments']:
                self._debug['instruments']['arr'] = []
            self._debug['instruments']['arr'].append({'start': self._io.pos()})
            _t_instruments = GenmidiOp2.InstrumentEntry(
                self._io, self, self._root)
            _t_instruments._read()
            self.instruments[i] = _t_instruments
            self._debug['instruments']['arr'][i]['end'] = self._io.pos()

        self._debug['instruments']['end'] = self._io.pos()
        self._debug['instrument_names']['start'] = self._io.pos()
        self.instrument_names = [None] * (175)
        for i in range(175):
            if not 'arr' in self._debug['instrument_names']:
                self._debug['instrument_names']['arr'] = []
            self._debug['instrument_names']['arr'].append(
                {'start': self._io.pos()})
            self.instrument_names[i] = (KaitaiStream.bytes_terminate(
                KaitaiStream.bytes_strip_right(self._io.read_bytes(32), 0), 0,
                False)).decode(u"ASCII")
            self._debug['instrument_names']['arr'][i]['end'] = self._io.pos()

        self._debug['instrument_names']['end'] = self._io.pos()
Пример #8
0
 def _read(self):
     self._debug['header_type']['start'] = self._io.pos()
     self.header_type = KaitaiStream.resolve_enum(
         ZxSpectrumTap.HeaderTypeEnum, self._io.read_u1())
     self._debug['header_type']['end'] = self._io.pos()
     self._debug['filename']['start'] = self._io.pos()
     self.filename = KaitaiStream.bytes_strip_right(
         self._io.read_bytes(10), 32)
     self._debug['filename']['end'] = self._io.pos()
     self._debug['len_data']['start'] = self._io.pos()
     self.len_data = self._io.read_u2le()
     self._debug['len_data']['end'] = self._io.pos()
     self._debug['params']['start'] = self._io.pos()
     _on = self.header_type
     if _on == ZxSpectrumTap.HeaderTypeEnum.program:
         self.params = ZxSpectrumTap.ProgramParams(
             self._io, self, self._root)
         self.params._read()
     elif _on == ZxSpectrumTap.HeaderTypeEnum.num_array:
         self.params = ZxSpectrumTap.ArrayParams(
             self._io, self, self._root)
         self.params._read()
     elif _on == ZxSpectrumTap.HeaderTypeEnum.char_array:
         self.params = ZxSpectrumTap.ArrayParams(
             self._io, self, self._root)
         self.params._read()
     elif _on == ZxSpectrumTap.HeaderTypeEnum.bytes:
         self.params = ZxSpectrumTap.BytesParams(
             self._io, self, self._root)
         self.params._read()
     self._debug['params']['end'] = self._io.pos()
     self._debug['checksum']['start'] = self._io.pos()
     self.checksum = self._io.read_u1()
     self._debug['checksum']['end'] = self._io.pos()
Пример #9
0
        def _read(self):
            self._debug['bbox_min']['start'] = self._io.pos()
            self.bbox_min = QuakeMdl.MdlVertex(self._io, self, self._root)
            self.bbox_min._read()
            self._debug['bbox_min']['end'] = self._io.pos()
            self._debug['bbox_max']['start'] = self._io.pos()
            self.bbox_max = QuakeMdl.MdlVertex(self._io, self, self._root)
            self.bbox_max._read()
            self._debug['bbox_max']['end'] = self._io.pos()
            self._debug['name']['start'] = self._io.pos()
            self.name = (KaitaiStream.bytes_terminate(
                KaitaiStream.bytes_strip_right(self._io.read_bytes(16), 0), 0,
                False)).decode(u"ASCII")
            self._debug['name']['end'] = self._io.pos()
            self._debug['vertices']['start'] = self._io.pos()
            self.vertices = [None] * (self._root.header.num_verts)
            for i in range(self._root.header.num_verts):
                if not 'arr' in self._debug['vertices']:
                    self._debug['vertices']['arr'] = []
                self._debug['vertices']['arr'].append(
                    {'start': self._io.pos()})
                _t_vertices = QuakeMdl.MdlVertex(self._io, self, self._root)
                _t_vertices._read()
                self.vertices[i] = _t_vertices
                self._debug['vertices']['arr'][i]['end'] = self._io.pos()

            self._debug['vertices']['end'] = self._io.pos()
Пример #10
0
        def _read(self):
            self._debug['jmp_instruction']['start'] = self._io.pos()
            self.jmp_instruction = self._io.read_bytes(3)
            self._debug['jmp_instruction']['end'] = self._io.pos()
            self._debug['oem_name']['start'] = self._io.pos()
            self.oem_name = (KaitaiStream.bytes_strip_right(
                self._io.read_bytes(8), 32)).decode(u"ASCII")
            self._debug['oem_name']['end'] = self._io.pos()
            self._debug['bpb']['start'] = self._io.pos()
            self.bpb = self._root.BiosParamBlock(self._io, self, self._root)
            self.bpb._read()
            self._debug['bpb']['end'] = self._io.pos()
            if not (self.is_fat32):
                self._debug['ebpb_fat16']['start'] = self._io.pos()
                self.ebpb_fat16 = self._root.ExtBiosParamBlockFat16(
                    self._io, self, self._root)
                self.ebpb_fat16._read()
                self._debug['ebpb_fat16']['end'] = self._io.pos()

            if self.is_fat32:
                self._debug['ebpb_fat32']['start'] = self._io.pos()
                self.ebpb_fat32 = self._root.ExtBiosParamBlockFat32(
                    self._io, self, self._root)
                self.ebpb_fat32._read()
                self._debug['ebpb_fat32']['end'] = self._io.pos()
Пример #11
0
 def _read(self):
     self.num_patches = self._io.read_u4le()
     self.names = []
     for i in range(self.num_patches):
         self.names.append(
             (KaitaiStream.bytes_strip_right(self._io.read_bytes(8),
                                             0)).decode(u"ASCII"))
Пример #12
0
            def _read(self):
                self._debug['name']['start'] = self._io.pos()
                self.name = (KaitaiStream.bytes_strip_right(
                    self._io.read_bytes(8), 0)).decode(u"ASCII")
                self._debug['name']['end'] = self._io.pos()
                self._debug['masked']['start'] = self._io.pos()
                self.masked = self._io.read_u4le()
                self._debug['masked']['end'] = self._io.pos()
                self._debug['width']['start'] = self._io.pos()
                self.width = self._io.read_u2le()
                self._debug['width']['end'] = self._io.pos()
                self._debug['height']['start'] = self._io.pos()
                self.height = self._io.read_u2le()
                self._debug['height']['end'] = self._io.pos()
                self._debug['column_directory']['start'] = self._io.pos()
                self.column_directory = self._io.read_u4le()
                self._debug['column_directory']['end'] = self._io.pos()
                self._debug['num_patches']['start'] = self._io.pos()
                self.num_patches = self._io.read_u2le()
                self._debug['num_patches']['end'] = self._io.pos()
                self._debug['patches']['start'] = self._io.pos()
                self.patches = [None] * (self.num_patches)
                for i in range(self.num_patches):
                    if not 'arr' in self._debug['patches']:
                        self._debug['patches']['arr'] = []
                    self._debug['patches']['arr'].append(
                        {'start': self._io.pos()})
                    _t_patches = self._root.Texture12.Patch(
                        self._io, self, self._root)
                    _t_patches._read()
                    self.patches[i] = _t_patches
                    self._debug['patches']['arr'][i]['end'] = self._io.pos()

                self._debug['patches']['end'] = self._io.pos()
Пример #13
0
 def _read(self):
     self._debug['ititle']['start'] = self._io.pos()
     self.ititle = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(40), 32)).decode(u"ascii")
     self._debug['ititle']['end'] = self._io.pos()
     self._debug['usernm']['start'] = self._io.pos()
     self.usernm = (self._io.read_bytes(8)).decode(u"ascii")
     self._debug['usernm']['end'] = self._io.pos()
    def _read(self):
        self.magic = self._io.ensure_fixed_contents(b"\x23\x4F\x50\x4C\x5F\x49\x49\x23")
        self.instruments = [None] * (175)
        for i in range(175):
            self.instruments[i] = self._root.InstrumentEntry(self._io, self, self._root)

        self.instrument_names = [None] * (175)
        for i in range(175):
            self.instrument_names[i] = (KaitaiStream.bytes_terminate(KaitaiStream.bytes_strip_right(self._io.read_bytes(32), 0), 0, False)).decode(u"ASCII")
Пример #15
0
        def _read(self):
            self.jmp_instruction = self._io.read_bytes(3)
            self.oem_name = (KaitaiStream.bytes_strip_right(self._io.read_bytes(8), 32)).decode(u"ASCII")
            self.bpb = Vfat.BiosParamBlock(self._io, self, self._root)
            if not (self.is_fat32):
                self.ebpb_fat16 = Vfat.ExtBiosParamBlockFat16(self._io, self, self._root)

            if self.is_fat32:
                self.ebpb_fat32 = Vfat.ExtBiosParamBlockFat32(self._io, self, self._root)
 def _read(self):
     self.bbox_min = self._root.MdlVertex(self._io, self, self._root)
     self.bbox_max = self._root.MdlVertex(self._io, self, self._root)
     self.name = (KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(16), 0), 0,
         False)).decode(u"ASCII")
     self.vertices = [None] * (self._root.header.num_verts)
     for i in range(self._root.header.num_verts):
         self.vertices[i] = self._root.MdlVertex(
             self._io, self, self._root)
Пример #17
0
 def _read(self):
     self._debug['offset']['start'] = self._io.pos()
     self.offset = self._io.read_s4le()
     self._debug['offset']['end'] = self._io.pos()
     self._debug['size']['start'] = self._io.pos()
     self.size = self._io.read_s4le()
     self._debug['size']['end'] = self._io.pos()
     self._debug['name']['start'] = self._io.pos()
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"ASCII")
     self._debug['name']['end'] = self._io.pos()
Пример #18
0
 def _read(self):
     self.ls_per_fat = self._io.read_u4le()
     self.has_active_fat = self._io.read_bits_int(1) != 0
     self.reserved1 = self._io.read_bits_int(3)
     self.active_fat_id = self._io.read_bits_int(4)
     self._io.align_to_byte()
     self.reserved2 = self._io.ensure_fixed_contents(b"\x00")
     self.fat_version = self._io.read_u2le()
     self.root_dir_start_clus = self._io.read_u4le()
     self.ls_fs_info = self._io.read_u2le()
     self.boot_sectors_copy_start_ls = self._io.read_u2le()
     self.reserved3 = self._io.read_bytes(12)
     self.phys_drive_num = self._io.read_u1()
     self.reserved4 = self._io.read_u1()
     self.ext_boot_sign = self._io.read_u1()
     self.volume_id = self._io.read_bytes(4)
     self.partition_volume_label = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(11), 32)).decode(u"ASCII")
     self.fs_type_str = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 32)).decode(u"ASCII")
Пример #19
0
 def _read(self):
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"UTF-8")
     self.virtual_size = self._io.read_u4le()
     self.virtual_address = self._io.read_u4le()
     self.size_of_raw_data = self._io.read_u4le()
     self.pointer_to_raw_data = self._io.read_u4le()
     self.pointer_to_relocations = self._io.read_u4le()
     self.pointer_to_linenumbers = self._io.read_u4le()
     self.num_relocations = self._io.read_u2le()
     self.num_linenumbers = self._io.read_u2le()
     self.characteristics = self._io.read_u4le()
Пример #20
0
 def _read(self):
     self._debug['phys_drive_num']['start'] = self._io.pos()
     self.phys_drive_num = self._io.read_u1()
     self._debug['phys_drive_num']['end'] = self._io.pos()
     self._debug['reserved1']['start'] = self._io.pos()
     self.reserved1 = self._io.read_u1()
     self._debug['reserved1']['end'] = self._io.pos()
     self._debug['ext_boot_sign']['start'] = self._io.pos()
     self.ext_boot_sign = self._io.read_u1()
     self._debug['ext_boot_sign']['end'] = self._io.pos()
     self._debug['volume_id']['start'] = self._io.pos()
     self.volume_id = self._io.read_bytes(4)
     self._debug['volume_id']['end'] = self._io.pos()
     self._debug['partition_volume_label']['start'] = self._io.pos()
     self.partition_volume_label = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(11), 32)).decode(u"ASCII")
     self._debug['partition_volume_label']['end'] = self._io.pos()
     self._debug['fs_type_str']['start'] = self._io.pos()
     self.fs_type_str = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 32)).decode(u"ASCII")
     self._debug['fs_type_str']['end'] = self._io.pos()
Пример #21
0
 def _read(self):
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"ASCII")
     self.masked = self._io.read_u4le()
     self.width = self._io.read_u2le()
     self.height = self._io.read_u2le()
     self.column_directory = self._io.read_u4le()
     self.num_patches = self._io.read_u2le()
     self.patches = []
     for i in range(self.num_patches):
         self.patches.append(
             DoomWad.Texture12.Patch(self._io, self, self._root))
Пример #22
0
 def _read(self):
     self._debug['name']['start'] = self._io.pos()
     self.name = (KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(56), 0), 0,
         False)).decode(u"UTF-8")
     self._debug['name']['end'] = self._io.pos()
     self._debug['ofs']['start'] = self._io.pos()
     self.ofs = self._io.read_u4le()
     self._debug['ofs']['end'] = self._io.pos()
     self._debug['size']['start'] = self._io.pos()
     self.size = self._io.read_u4le()
     self._debug['size']['end'] = self._io.pos()
Пример #23
0
        def _read(self):
            self._debug['num_patches']['start'] = self._io.pos()
            self.num_patches = self._io.read_u4le()
            self._debug['num_patches']['end'] = self._io.pos()
            self._debug['names']['start'] = self._io.pos()
            self.names = [None] * (self.num_patches)
            for i in range(self.num_patches):
                if not 'arr' in self._debug['names']:
                    self._debug['names']['arr'] = []
                self._debug['names']['arr'].append({'start': self._io.pos()})
                self.names[i] = (KaitaiStream.bytes_strip_right(
                    self._io.read_bytes(8), 0)).decode(u"ASCII")
                self._debug['names']['arr'][i]['end'] = self._io.pos()

            self._debug['names']['end'] = self._io.pos()
Пример #24
0
 def __init__(self, _io, _parent=None, _root=None):
     self._io = _io
     self._parent = _parent
     self._root = _root if _root else self
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"UTF-8")
     self.virtual_size = self._io.read_u4le()
     self.virtual_address = self._io.read_u4le()
     self.size_of_raw_data = self._io.read_u4le()
     self.pointer_to_raw_data = self._io.read_u4le()
     self.pointer_to_relocations = self._io.read_u4le()
     self.pointer_to_linenumbers = self._io.read_u4le()
     self.number_of_relocations = self._io.read_u2le()
     self.number_of_linenumbers = self._io.read_u2le()
     self.characteristics = self._io.read_u4le()
Пример #25
0
 def _read(self):
     self._debug['timestamp']['start'] = self._io.pos()
     self.timestamp = self._io.read_u4le()
     self._debug['timestamp']['end'] = self._io.pos()
     self._debug['offset_idx']['start'] = self._io.pos()
     self.offset_idx = self._io.read_u2le()
     self._debug['offset_idx']['end'] = self._io.pos()
     self._debug['flags']['start'] = self._io.pos()
     self.flags = self._io.read_u1()
     self._debug['flags']['end'] = self._io.pos()
     self._debug['name']['start'] = self._io.pos()
     self.name = (KaitaiStream.bytes_terminate(
         KaitaiStream.bytes_strip_right(self._io.read_bytes(25), 0), 0,
         False)).decode(u"ASCII")
     self._debug['name']['end'] = self._io.pos()
Пример #26
0
    def _read(self):
        self.magic = self._io.read_bytes(8)
        if not self.magic == b"\x23\x4F\x50\x4C\x5F\x49\x49\x23":
            raise kaitaistruct.ValidationNotEqualError(
                b"\x23\x4F\x50\x4C\x5F\x49\x49\x23", self.magic, self._io,
                u"/seq/0")
        self.instruments = []
        for i in range(175):
            self.instruments.append(
                GenmidiOp2.InstrumentEntry(self._io, self, self._root))

        self.instrument_names = []
        for i in range(175):
            self.instrument_names.append((KaitaiStream.bytes_terminate(
                KaitaiStream.bytes_strip_right(self._io.read_bytes(32), 0), 0,
                False)).decode(u"ASCII"))
Пример #27
0
        def _read(self):
            self.ids = Specpr.Identifiers(self._io, self, self._root)
            self.iscta = Specpr.CoarseTimestamp(self._io, self, self._root)
            self.isctb = Specpr.CoarseTimestamp(self._io, self, self._root)
            self.jdatea = self._io.read_s4be()
            self.jdateb = self._io.read_s4be()
            self.istb = Specpr.CoarseTimestamp(self._io, self, self._root)
            self.isra = self._io.read_s4be()
            self.isdec = self._io.read_s4be()
            self.itchan = self._io.read_s4be()
            self.irmas = self._io.read_s4be()
            self.revs = self._io.read_s4be()
            self.iband = [None] * (2)
            for i in range(2):
                self.iband[i] = self._io.read_s4be()

            self.irwav = self._io.read_s4be()
            self.irespt = self._io.read_s4be()
            self.irecno = self._io.read_s4be()
            self.itpntr = self._io.read_s4be()
            self.ihist = (KaitaiStream.bytes_strip_right(
                self._io.read_bytes(60), 32)).decode(u"ascii", errors="ignore")
            self.mhist = [None] * (4)
            for i in range(4):
                self.mhist[i] = (self._io.read_bytes(74)).decode(
                    u"ascii", errors="ignore")

            self.nruns = self._io.read_s4be()
            self.siangl = Specpr.IllumAngle(self._io, self, self._root)
            self.seangl = Specpr.IllumAngle(self._io, self, self._root)
            self.sphase = self._io.read_s4be()
            self.iwtrns = self._io.read_s4be()
            self.itimch = self._io.read_s4be()
            self.xnrm = self._io.read_f4be()
            self.scatim = self._io.read_f4be()
            self.timint = self._io.read_f4be()
            self.tempd = self._io.read_f4be()
            self.data = [None] * (256)
            for i in range(256):
                self.data[i] = self._io.read_f4be()
Пример #28
0
 def _read(self):
     self.offset = self._io.read_s4le()
     self.size = self._io.read_s4le()
     self.name = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(8), 0)).decode(u"ASCII")
Пример #29
0
 def _read(self):
     self.ititle = (KaitaiStream.bytes_strip_right(
         self._io.read_bytes(40), 32)).decode(u"ascii", errors="ignore")
     self.usernm = (self._io.read_bytes(8)).decode(u"ascii",
                                                   errors="ignore")
Пример #30
0
 def _read(self):
     self.name = (KaitaiStream.bytes_terminate(KaitaiStream.bytes_strip_right(self._io.read_bytes(56), 0), 0, False)).decode(u"UTF-8")
     self.ofs = self._io.read_u4le()
     self.size = self._io.read_u4le()