added psp and wonderswan generators

This commit is contained in:
Rudis Muiznieks 2022-11-19 14:04:50 -06:00
parent 6d069696c7
commit 5b7262c6ab
Signed by: rudism
GPG key ID: CABF2F86EF7884F9

View file

@ -96,6 +96,24 @@ case "$sys_type" in
core_name="Sony - PlayStation (PCSX ReARMed)"
db_name="Sony - PlayStation.lpl"
;;
'psp')
rom_ext="iso"
core_path="$CORE_PREFIX/ppsspp_libretro.so"
core_name="Sony - PlayStation Portable (PPSSPP)"
db_name="Sony - PlayStation Portable.lpl"
;;
'ws')
rom_ext="ws"
core_path="$CORE_PREFIX/mednafen_wswan_libretro.so"
core_name="Bandai - WonderSwan (Beetle Cygne)"
db_name="Bandai - WonderSwan.lpl"
;;
'wsc')
rom_ext="wsc"
core_path="$CORE_PREFIX/mednafen_wswan_libretro.so"
core_name="Bandai - WonderSwan Color (Beetle Cygne)"
db_name="Bandai - WonderSwan Color.lpl"
;;
*)
echo "Don't recognize system for roms in $sys_type directory..."
exit 1
@ -107,7 +125,6 @@ cat > temp.json <<EOF
"version": "1.5",
"default_core_path": "$core_path",
"default_core_name": "$core_name",
"base_content_directory": ".com/assets/cores/.index-dirs",
"label_display_mode": 0,
"right_thumbnail_mode": 0,
"left_thumbnail_mode": 0,
@ -123,15 +140,14 @@ for rom in "$rom_dir"/*."$rom_ext"; do
mame_name="${rom_file%.$rom_ext}"
rom_label="$(jq -r '.[] | select(.name=="'"$mame_name"'") | .description' mame2003plusdb.json | sed 's/\( ([^)]\+)\)*$//')"
else
rom_label="$(echo "$rom_file" | sed -e 's/\( ([^)]\+)\)*\.[^.]\+$//')"
rom_label="$(echo "$rom_file" | sed 's/ \?\[[^]]\+\]//g' | sed 's/\( ([^)]\+)\)*\.[^.]\+$//')"
fi
rom_path="$ROM_PREFIX/$sys_type/$rom_file"
cat >> temp.json <<EOF
$comma{
"path": "$rom_path",
"label": "$rom_label",
"core_path": "$core_path",
"core_name": "$core_name",
"crc32": "DETECT",
"db_name": "$db_name"
}