From: Mazet Laurent Date: Tue, 5 Dec 2023 22:36:21 +0000 (+0100) Subject: add psn_package_npdrm X-Git-Url: https://secure.softndesign.org/git/?p=iso2ps2.git;a=commitdiff_plain;h=2484479bde3c77783fc8d8eafb9fa973005a564d add psn_package_npdrm --- diff --git a/iso2ps2 b/iso2ps2 index a77f938..fd26b5f 100755 --- a/iso2ps2 +++ b/iso2ps2 @@ -3,6 +3,8 @@ # default values PROGNAME=$(basename $0) KLICENSE="e4e54fd67c16c316f47829a30484d843" +PS2CLASSIC=ps2classic/ps2classic +PSNPACKAGE=psn_package_npdrm/psn_package_npdrm # defaut values id=0 @@ -52,7 +54,6 @@ echo "Title: '$title'" mkdir $serial tar -C $serial -xzf skeleton.tgz - # images: # - ICON0.PNG 320x176 # - PIC0.PNG 1000x560 @@ -71,7 +72,7 @@ fi # screenshot touch .touch find $HOME/.config/PCSX2/snaps/ -type f | xargs rm .touch -#pcsx2 "$file" +pcsx2 "$file" capture=$(find $HOME/.config/PCSX2/snaps/ -type f | sort) if [ "$capture" ]; then cp "$capture" tmp.png @@ -90,7 +91,21 @@ echo -n $title | xxd | xxd -r -s 0x108 - $serial/PARAM.SFO echo -n $CID | xxd | xxd -r -s 0x188 - $serial/PARAM.SFO echo -n $CID | xxd | xxd -r -s 0x17- $serial/USRDIR/ISO.BIN.EDAT -# convert +# generate key dd bs=1 count=$(expr ${#KLICENSE} / 2) if=/dev/zero of=$serial/ps2.key echo "00000000 $KLICENSE" | xdd -r - > $serial/ps2.key -ps2classic e cex $serial/ps2.key "$1" $serial/USRDIR/ISO.BIN.ENC ISO.BIN.ENC 2P0001-${CID}_00-0000111122223333 + +# package config +echo > $serial/package.conf << EOF +Content-ID = $CID +k_licensee = 0x$KLICENSE +DRM_Type = Free +Content_Type = Game_Data +PackageVersion = 01.01 +EOF + +# convert iso +$PS2CLASSIC e cex $serial/ps2.key "$1" $serial/USRDIR/ISO.BIN.ENC ISO.BIN.ENC 2P0001-${CID}_00-0000111122223333 + +# create package +$PSNPACKAGE $serial diff --git a/psn_package_npdrm/psn_package_npdrm b/psn_package_npdrm/psn_package_npdrm new file mode 100755 index 0000000..42a0e3f --- /dev/null +++ b/psn_package_npdrm/psn_package_npdrm @@ -0,0 +1,5 @@ +#!/bin/sh + +PWD=$(dirname $0) +[ "$PWD" ] || PWD=. +wine $PWD/$0.exe diff --git a/psn_package_npdrm/psn_package_npdrm.exe b/psn_package_npdrm/psn_package_npdrm.exe new file mode 100644 index 0000000..83d9816 Binary files /dev/null and b/psn_package_npdrm/psn_package_npdrm.exe differ