4 PROGNAME
=$
(basename $0)
10 [ -f .
$PROGNAME ] && source .
$PROGNAME
16 serial
=$
(isoinfo
-f -i "$file" | \
17 grep "^/[A-Z][A-Z][A-Z][A-Z]_[0-9][0-9][0-9]\.[0-9][0-9];" | \
18 sed 's,[/.],,g;s,_,-,;s,;.*,,')
19 [ "$serial" ] ||
{ serial
=$
(printf "PS2U-1%04d" $id); let id
++; }
24 echo "id=$id" >> .
$PROGNAME
28 [ -f jlist2.html
] || wget https
://psxdatacenter.com
/psx
2/jlist2.html
29 [ -f plist2.html
] || wget https
://psxdatacenter.com
/psx
2/plist2.html
30 [ -f ulist2.html
] || wget https
://psxdatacenter.com
/psx
2/ulist2.html
32 getline; gsub(/<[^<]*>/, "")
41 [ -f PS2-GAMEID-TITLE-MASTER.csv
] || wget https
://raw.githubusercontent.com
/VTSTech
/PS2-OPL-CFG
/master
/test
/PS2-GAMEID-TITLE-MASTER.csv
42 title
=$
(awk -F\
; '"'$serial'" == $1 {print $2}' PS2-GAMEID-TITLE-MASTER.csv
)
43 [ "$title" ] || title
=$
(basename "$file" |
sed 's/ *(.*//')
47 echo "Serial: $serial"
48 echo "Title: '$title'"
52 tar -C $serial -xzf skeleton.tgz
58 # - PIC1.PNG 1920x1080
61 wget https
://psxdatacenter.com
/psx
2/images
2/covers
/$serial.jpg
62 if [ -f $serial.jpg
]; then
63 convert
$serial.jpg tmp.png
64 mogrify
-resize 320x176 tmp.png
65 mogrify
-background transparent
-gravity center
-extent 320x176 tmp.png
66 mv tmp.png
$serial/ICON0.PNG
72 find $HOME/.config
/PCSX
2/snaps
/ -type f |
xargs rm .
touch
74 capture
=$
(find $HOME/.config
/PCSX
2/snaps
/ -type f |
sort)
75 if [ "$capture" ]; then
77 mogrify
-scale 1000x560 tmp.png
78 mogrify
-background transparent
-gravity center
-extent 1000x560 tmp.png
79 mv tmp.png
$serial/PIC0.PNG
86 # - file: USRDIR/ISO.BIN.EDAT
88 echo -n $title | xxd | xxd
-r -s 0x108 - $serial/PARAM.SFO
89 echo -n $CID | xxd | xxd
-r -s 0x188 - $serial/PARAM.SFO
90 echo -n $CID | xxd | xxd
-r -s 0x17- $serial/USRDIR
/ISO.BIN.EDAT
93 ps2classic e cex ps2.key
"$1" $serial/USRDIR
/ISO.BIN.ENC ISO.BIN.ENC
2P0001-
${CID}_00-0000111122223333