PS1: output PSN-style game folders (EBOOT.PBP + KEYS.BIN + DOCUMENT.DAT)

This commit is contained in:
2026-09-07 16:20:39 -04:00
parent 4d5c48cb94
commit a9c371c221
4 changed files with 77 additions and 27 deletions
+8 -7
View File
@@ -227,10 +227,11 @@ class Ps1ConvertSource(Source):
if not game_id:
raise RuntimeError("missing game_id for PS1 conversion")
safe = re.sub(r'[<>:"/\\|?*]', " ", title).strip() or "PS1 game"
out_path = dest_dir / f"{safe} ({game_id}).pbp"
if out_path.exists():
raise FileExistsError(str(out_path))
folder_name = re.sub(r"[^A-Za-z0-9]", "", game_id).upper() or "PS1GAME"
folder = dest_dir / folder_name
eboot = folder / "EBOOT.PBP"
if eboot.exists():
raise FileExistsError(str(eboot))
def cb(done, total):
if progress_cb is not None and total:
@@ -239,13 +240,13 @@ class Ps1ConvertSource(Source):
from . import ps1_convert
try:
ps1_convert.convert(
source, title, game_id, self.base_pbp, out_path,
ps1_convert.convert_to_folder(
source, title, game_id, self.base_pbp, dest_dir,
progress_cb=cb, cancel_event=cancel_event,
)
except ps1_convert.Cancelled:
raise TransferCancelled() from None
return out_path
return folder
class TreeCopySource(Source):