Created
March 8, 2025 03:12
-
-
Save salamcast/700befc7a487cdc2bf5360e4e3bda837 to your computer and use it in GitHub Desktop.
Convert encrypted PSN Classic PSX PBP file to an unencrypted PBP file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# the purpose of this script is to make all the PSN PSX games I purchased on my PS3, PSP, PS Vita | |
# playable in DuckStation and Batocera | |
# | |
# you will need to build the following projects: | |
# | |
# https://github.com/AKuHAK/psxtract | |
# https://github.com/bryanperris/PSXPackager | |
# | |
# I downloaded the zip files and build them that way, you might need to fix the path for your setup | |
# | |
# my current system is Debian 12 on an core i3 | |
# | |
# this will also delete the ROM folder after it is done outputing the file | |
# | |
# this should be the PSX output dir | |
DIR=/export/psn-psx | |
# this is the directory with the EBOOT.PBP file | |
ROM=$1 | |
mkdir ${DIR} 2>/dev/null | |
cd $ROM | |
# -c will output a BIN/CUE files | |
~/Downloads/psxtract-master/Linux/psxtract -c EBOOT.PBP | |
# for single disk | |
if [ $(ls CDROM | wc -l) -eq 2 ];then | |
cd CDROM | |
# this will output a PBP file | |
~/Downloads/PSXPackager-master/bin/PSXPackager -i CDROM.CUE -o "$DIR/" -f '%TITLE% [%GAMEID%]' | |
# you can switch to this option if you want to make a CHD file instead, but no title for the file name | |
#chdman createcd -i "CDROM.CUE" -o "$DIR/$ROM.chd" --force | |
cd ../.. | |
rm -r $ROM | |
# for multi disk | |
elif [ $(ls CDROM | wc -l) -gt 2 ];then | |
cd CDROM | |
# make playlist for multi disk file | |
echo '' > CDROM.M3U | |
for x in *.CUE | |
do | |
echo $x >> CDROM.M3U | |
done | |
# make a single file for the multi disk game | |
~/Downloads/PSXPackager-master/bin/PSXPackager -i CDROM.M3U -o "$DIR/" -f '%TITLE% [%GAMEID%]' | |
cd ../.. | |
rm -r $ROM | |
else | |
echo -e "\n ################################# \n" | |
echo "$ROM - will need to test later on" | |
ls CDROM | |
rm -r ISO PBP | |
echo -e "\n ################################# \n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment