Spin and Win
class PSPEbootArchive: MAGIC = b'PARC' VERSION = 1def create(self, eboot_paths, output_path, compress=False): entries = [] for path in eboot_paths: data = open(path, 'rb').read() if compress: data = zlib.compress(data) entries.append( 'original_name': path.name, 'compressed': compress, 'data': data ) self._write_archive(output_path, entries) def extract(self, archive_path, indices=None, output_dir='.'): entries = self._read_toc(archive_path) for idx, entry in enumerate(entries): if indices and idx not in indices: continue data = entry['data'] if entry['compressed']: data = zlib.decompress(data) Path(output_dir, f'EBOOT_idx.PBP').write_bytes(data)
When you open a PS1 EBOOT:
[Header] → [PARAM.SFO] → [ICON0] → [ICON1] → [PIC0] → [PIC1] → [SND0] → [DATA.PSP] → [DATA.PSAR]