From d1b857a8d514ed0b5d7ee15716392ee04ecd94a5 Mon Sep 17 00:00:00 2001 From: jaby Date: Thu, 21 Mar 2024 23:41:12 -0500 Subject: [PATCH] First draft for pop-fe --- bin/run_pop_fe.sh | 5 ++++ examples/PoolBox/Makefile | 3 ++- examples/PoolBox/PoolBox.code-workspace | 4 ++-- examples/PoolBox/iso/Icon.png | 3 +++ examples/PoolBox/iso/Pic0.png | 3 +++ examples/PoolBox/iso/Pic1.png | 3 +++ readme.md | 4 ++-- wsl_scripts/install_pop-fe.sh | 32 +++++++++++++++++++++++++ wsl_scripts/install_rust.sh | 1 + 9 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 bin/run_pop_fe.sh create mode 100644 examples/PoolBox/iso/Icon.png create mode 100644 examples/PoolBox/iso/Pic0.png create mode 100644 examples/PoolBox/iso/Pic1.png create mode 100644 wsl_scripts/install_pop-fe.sh diff --git a/bin/run_pop_fe.sh b/bin/run_pop_fe.sh new file mode 100644 index 00000000..80f9ce7b --- /dev/null +++ b/bin/run_pop_fe.sh @@ -0,0 +1,5 @@ +#!/bin/bash +source extern/py3venv/bin/activate + +cd extern/pop-fe/ +./pop-fe.py --title=MyGame --ps1-newemu --cover=$2/Icon.png --pic0=$2/Pic0.png --pic1=$2/Pic1.png --ps3-pkg="${1%.*}.pkg" $1 \ No newline at end of file diff --git a/examples/PoolBox/Makefile b/examples/PoolBox/Makefile index 0c35c831..f4225105 100644 --- a/examples/PoolBox/Makefile +++ b/examples/PoolBox/Makefile @@ -12,7 +12,8 @@ endif ifeq ($(REGION),SCEE) export PSX_TV_FORMAT=PAL export PSX_LICENSE=LICENSEE - export PSX_BOOT_FILE=SLES_000.25 + export PSX_BOOT_FILE=SLES_AAA.AA + #SLES_000.25 endif ifeq ($(REGION),SCEA) export PSX_TV_FORMAT=NTSC diff --git a/examples/PoolBox/PoolBox.code-workspace b/examples/PoolBox/PoolBox.code-workspace index f958c1cb..a4590a87 100644 --- a/examples/PoolBox/PoolBox.code-workspace +++ b/examples/PoolBox/PoolBox.code-workspace @@ -30,11 +30,11 @@ { "label": "create pkg (experimental)", "type": "shell", - "command": "run_pop_fe.bat ${workspaceFolder}/iso/${input:region}/PoolBox.cue", + "command": "wsl ./run_pop_fe.sh $(wslpath ${workspaceFolder}/iso/${input:region}/PoolBox.cue) $(wslpath ${workspaceFolder}/iso)", "group": "build", "options": { // v otherwise the tool won't start... - "cwd": "${env:POP_FE_PATH}", + "cwd": "${env:JABY_ENGINE_PATH}/bin", "env": { "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" } diff --git a/examples/PoolBox/iso/Icon.png b/examples/PoolBox/iso/Icon.png new file mode 100644 index 00000000..86fa13f6 --- /dev/null +++ b/examples/PoolBox/iso/Icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b30ccb5972421f87ea6fa462848e75c8aae133c0d9d96802da495a6c2a145c9 +size 11344 diff --git a/examples/PoolBox/iso/Pic0.png b/examples/PoolBox/iso/Pic0.png new file mode 100644 index 00000000..7debb1b7 --- /dev/null +++ b/examples/PoolBox/iso/Pic0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcfa59f29f86d766f63fb27d2bfa8c832a6d46edb38b18ba4e4d1786602b4056 +size 73064 diff --git a/examples/PoolBox/iso/Pic1.png b/examples/PoolBox/iso/Pic1.png new file mode 100644 index 00000000..fd3b73d3 --- /dev/null +++ b/examples/PoolBox/iso/Pic1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23a00017212ca175169e70204c921cadf805c1a27d68f1336bb0f2b08c0d6e4e +size 195104 diff --git a/readme.md b/readme.md index 83bcfe10..13d5144b 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ # Todo - [ ] Ko-fi supporter list - [ ] Support more GTE -- [ ] Easy serial code swap - - [ ] Support .subst files to be substituted with environment variables +- [X] Easy serial code swap + - [X] Support .subst files to be substituted with environment variables - [ ] PS3 PKG generation tool? - [ ] PS3 runtime detection? \ No newline at end of file diff --git a/wsl_scripts/install_pop-fe.sh b/wsl_scripts/install_pop-fe.sh new file mode 100644 index 00000000..34097867 --- /dev/null +++ b/wsl_scripts/install_pop-fe.sh @@ -0,0 +1,32 @@ +#!/bin/bash +BASEDIR=$(dirname "$0") +mkdir -p $BASEDIR/../bin/extern/ +cd $BASEDIR/../bin/extern + +sudo apt install -y python3 python3-pip python3-venv pkg-config libiso9660-dev swig +if ! test -d py3venv; then + python3 -m venv py3venv +fi +source py3venv/bin/activate +pip3 install ecdsa wheel pillow rarfile PyPDF2 requests opencv-contrib-python pycryptodome pycdio pycdlib + +if ! test -d pop-fe; then + git clone https://github.com/sahlberg/pop-fe +fi + +if ! test -d Cue2cu2; then + git clone https://github.com/NRGDEAD/Cue2cu2 + cp Cue2cu2/cue2cu2.py pop-fe +fi + +cd pop-fe +if ! test -d PSL1GHT; then + git clone https://github.com/sahlberg/PSL1GHT + cd PSL1GHT/tools/ps3py + git checkout origin/use-python3 + make +fi + +#if ! test -f /usr/local/bin/python; then +# sudo ln -s $(which python3) /usr/local/bin/python +#fi diff --git a/wsl_scripts/install_rust.sh b/wsl_scripts/install_rust.sh index 50e5f91c..9bb29601 100644 --- a/wsl_scripts/install_rust.sh +++ b/wsl_scripts/install_rust.sh @@ -1 +1,2 @@ +#!/bin/bash sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \ No newline at end of file