Exemplo n.º 1
0
 def overlay_table(self):
     with self.open('header.bin') as header:
         reader = BinaryIO.adapter(header)
         reader.seek(0x24)
         entry = reader.readUInt32()
         ram_offset = reader.readUInt32()
         size = reader.readUInt32()
         reader.seek(0x54)
         overlay_count = reader.readUInt32() >> 5  # Size/sizeof(entry)
     with self.open('overarm9.dec.bin') as overarm:
         ovt = OverlayTable(overlay_count, reader=overarm)
     return ovt
Exemplo n.º 2
0
 def save_archive(self, archive, filename):
     with open(os.path.join(self.files.directory, 'fs', filename), 'wb')\
             as handle:
         archive.save(BinaryIO.adapter(handle))