Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

Multiformat universal(?) Playstation/PSX rom loader - deals with zipped and ecm roms


stigzler

Recommended Posts

Hi folks. I made this to solve a problem I was having with my PSX roms. Thought I'd share to spare others in similar situation the pain!

Scenario: You have a bunch of psx roms you've sourced to match the ones you own for your console. All zipped, but with varying contents (some have .bin and .cue; others with .sub, .img, .cue etc). Furthermore, some are further sub-compressed with a .ecm extention (e.g. tekken.bin.ecm). This .bat file tackles these multi-format roms and launches them from GameEx. Furthermore, there is the option to create a separate 'quicklaunch' folder so you don't have to unzip the same game in the future.

Limitations: ROM root folders must be zipped. Also, you will need at least one .cue, .mds or .ccd file in the zip. (however, it is OK if these are ".ecm" at the end too - for e.g. "tombraider.cue.ecm)

Below, the zipped multi-format roms in the top window and various content to the right. Bottom left window, the auto generated unzipped + processed roms. :

Screenshot%20-%2014_12_2013%20%2C%2014_4

You'll need to set up two emulators - one for the zipped roms and one for the quicklaunch. Configs:

Launch Zipped Games:

[Emulator]
Enabled=True
System=Sony Playstation
Category=Console
Emulator=ePSXe
Version=1.9.0
Rating=8.3
DownloadUrl=http://www.gamesdbase.com/setupwizard/emulators/download/epsxe.7z
RequiredFiles=scph1001.bin (512kb)
Website=http://www.epsxe.com/
Info=Sony Playstation Emulator
TitleText=Sony Playstation
StartPageName=Sony Playstation (ePSXe) Slowload
StartPageLogo=Sony Playstation
Command=ePSXe.bat "[rompath]" "[romfile]"
RomFilter=*.cue;*.mds;*.ccd
Database=[Console] Sony PlayStation
ConfigFile=[Mapping Off] Exit (Process Close)
MapFile=[Console] Sony Playstation.map
RomPath=J:\Sony Playstation\psx_mixed_set
SnapPath=I:\Assets\Sony_Playstation\Snap
TitlePath=I:\Assets\Sony_Playstation\Title
BoxPath=I:\Assets\Sony_Playstation\Box
CartPath=I:\Assets\Sony_Playstation\Box_3D
ManualPath=I:\Assets\Sony_Playstation\Manual
ControlPanelPath=\Sony Playstation\Controls
WorkingPath=C:\Emulators\PLaystation\ePSXe190
MapKeys=True
WaitBeforeKeys=
SendKeys=
ReplaceDash=False
ReplaceUnder=True
Capitals=False
RemoveBrackets=True
ShowDesktop=True
Debug=False
AlsoLaunch=
LaunchBefore=
LaunchAfter=
ExcludedFiles=
CustomBackground=
PlayMusic=False
DontShowInfo=
PlaySelectionMusic=False
SelectionMusicFolder=
PCGame=False
GamesIn7Zips=True
PlayInScreenSaver=False
ShowMostPlayed=True
RandomMostPlayed=True
CDCheck=False
CDCheckFile=
VideoSnapPath=I:\Assets\Sony_Playstation\Video_MP4_HI_QUAL
UseDbName=True
TVAdPath=
GameExtenderCustomArtPath=I:\Assets\Sony_Playstation\Box
RomsInFolders=True
lastgame=



Launch Quicklaunch Games:

[Emulator]
Enabled=True
System=Sony Playstation
Category=Console
Emulator=ePSXe
Version=1.9.0
Rating=8.3
DownloadUrl=http://www.gamesdbase.com/setupwizard/emulators/download/epsxe.7z
RequiredFiles=scph1001.bin (512kb)
Website=http://www.epsxe.com/
Info=Sony Playstation Emulator
TitleText=Sony Playstation
StartPageName=Sony Playstation (ePSXe) Quicklaunch
StartPageLogo=Sony Playstation
Command=epsxe.exe -nogui -loadmemc0 "memcards\[rom]"
RomFilter=*.cue;*.mds;*.ccd
Database=[Console] Sony PlayStation
ConfigFile=[Mapping Off] Exit (Process Close)
MapFile=[Console] Sony Playstation.map
RomPath=J:\Sony Playstation\psx_quicklaunch
SnapPath=I:\Assets\Sony_Playstation\Snap
TitlePath=I:\Assets\Sony_Playstation\Title
BoxPath=I:\Assets\Sony_Playstation\Box
CartPath=I:\Assets\Sony_Playstation\CD
ManualPath=I:\Assets\Sony_Playstation\Manual
ControlPanelPath=\Sony Playstation\Controls
WorkingPath=C:\Emulators\PLaystation\ePSXe190
MapKeys=True
WaitBeforeKeys=
SendKeys=
ReplaceDash=False
ReplaceUnder=True
Capitals=False
RemoveBrackets=True
ShowDesktop=True
Debug=False
AlsoLaunch=
LaunchBefore="C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount scsi, 0,"[rompath]\[romfile]"
LaunchAfter="C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount scsi, 0
ExcludedFiles=
CustomBackground=
PlayMusic=False
DontShowInfo=
PlaySelectionMusic=False
SelectionMusicFolder=
PCGame=False
GamesIn7Zips=False
PlayInScreenSaver=False
ShowMostPlayed=True
RandomMostPlayed=True
CDCheck=False
CDCheckFile=
VideoSnapPath=I:\Assets\Sony_Playstation\Video_MP4_HI_QUAL
UseDbName=True
TVAdPath=
GameExtenderCustomArtPath=
RomsInFolders=True
lastgame=



Place this bat file in your epsxe directory:

@echo on
set directory=%1
set directory=%directory:~1,-1%
set file=%2
set file=%file:~1,-1%
set gamename=%file:~0,-4%
set intReturn2==9


:: User Variables - SET HERE!

:: Location of Quicklaunch Folder:
set quicklaunchdir=J:\Sony Playstation\psx_quicklaunch

:: Location of PakkISO Folder:
set PakkISOdir=C:\Program Files (x86)\PakkISO

:: Location of DaemonTools Folder
set DTexe=C:\Program Files (x86)\DAEMON Tools Lite/DTLite.exe

:: Enable/Disable Quicklaunch folder creation (Set to 1 to enable):
set qlaunch=1

:: Enable/Diable unzip (of any zipped within original zipped folder) - Set to 1 to skip:
set 7zskip=0

:: Code

mkdir %temp%\Gameex_temp
cd %temp%\Gameex_temp

echo Set objArgs = WScript.Arguments >> messagebox.vbs
echo Set objShell = CreateObject("Wscript.Shell") >> messagebox.vbs
echo intReturn = objShell.Popup(objArgs(0), 1, "Recreating Playstation image") >> messagebox.vbs

messagebox.vbs "Copying Files...."

copy "%directory%\*.*" %temp%\Gameex_temp
copy "%PakkISOdir%\*.*" %temp%\Gameex_temp
cd %temp%\Gameex_temp

:7zunpack
if %7zskip% ==1 goto ecmproc
messagebox.vbs "Extracting 7z...."
7za e "%directory%\*.7z"

:ecmproc
messagebox.vbs "Decompressing ECM..."
unecm.exe *.ecm
del "*.ecm"

:apeproc
messagebox.vbs "Uncompressing APE audio..."
for %%i in ("%directory%\*.ape") do mac "%%i" "%%~ni.wav" -d && sox.exe "%%~ni.wav" -t raw -s -c 2 -w -r 44100 "%%~ni.bin" && del "*.wav"
del "*.exe"

:makeqlaunch
if %qlaunch% ==0 goto mountstart
messagebox.vbs "Creating new quicklaunch files..."
Echo Deleting extra files
cd %temp%\Gameex_temp
del "*.txt"
del "*.dat"
del "*.bat"

%quicklaunchdir:~0,2%
cd %quicklaunchdir%
mkdir "%gamename%"

set fullpath=%quicklaunchdir%\%gamename%
copy "%temp%\Gameex_temp\*.*" "%fullpath%"

:mountstart
%temp:~0,2%
cd %temp%\Gameex_temp
messagebox.vbs "Mounting image and starting emulation..."
"%DTexe%" -mount scsi, 0,"%temp%\Gameex_temp\%file%"
cd C:\Emulators\PLaystation\ePSXe190
start/wait epsxe.exe -nogui -loadmemc0 "memcards\%gamename%"
ping -n 3 localhost > nul
"%DTexe%" -unmount scsi, 0
cd %temp%\Gameex_temp

messagebox.vbs "Tidying up......."
if %qlaunch% ==0 goto delgamextemp
%quicklaunchdir:~0,2%
cd %fullpath%
del "*.vbs"
%temp:~0,2%
cd %temp%\Gameex_temp

:delgameextemp
rmdir /s /q %temp%\Gameex_temp

:: NOTES
:: By Stigzler (Search "Mago 20.13a" for cab) 8:)
:: Thanks to Chal021 for original code (search "ECMTools ePSXe gameex")
:: For use with GameEx and Zipped psx roms
:: Functions:
:: - Accesses GameEx's "Unzipped7-Zip" Folder
:: - Removes any .ecm and .ape compression and converts into original format (e.g. bin or img)
:: - If option chosen, copies unzipped, converted files into new folder (for quicklaunch folder)
:: - Mounts, launches game and unmounts on exit of emu
:: - Removes any temporary files.
:: Pre-Requisites:
:: PakkISO - (Google)
:: DaemonTools Lite - (Google)
:: EPsxE - (Google)
:: Drive 0 of Daemon Tools set up as SCSI drive (you'll have to figure this!)
:: Setup:
:: Save this file as epsxe.bat into the root directory of epsxe (same folder as epsxe.exe)
:: GameEx Settings:
:: Command line: ePSXe.bat "[rompath]" "[romfile]"
:: 7-Zip Support: On
:: Scan Subfolders: On
:: Rom Filters: *.cue;*.mds;*.ccd
:: NO commands in "launch before" or "launch after"
:: Works with following file types in zipped folders (any permutation):
:: all .ecm
:: .bin .cue
:: .ccd .img .sub
:: .mds .mdf



Further notes about setup at bottom of .bat file:


:: NOTES
:: By Stigzler (Search "Mago 20.13a" for cab) 8:)
:: Thanks to Chal021 for original code (search "ECMTools ePSXe gameex")
:: For use with GameEx and Zipped psx roms
:: Functions:
:: - Accesses GameEx's "Unzipped7-Zip" Folder
:: - Removes any .ecm and .ape compression and converts into original format (e.g. bin or img)
:: - If option chosen, copies unzipped, converted files into new folder (for quicklaunch folder)
:: - Mounts, launches game and unmounts on exit of emu
:: - Removes any temporary files.
:: Pre-Requisites:
:: PakkISO - (Google)
:: DaemonTools Lite - (Google)
:: EPsxE - (Google)
:: Drive 0 of Daemon Tools set up as SCSI drive (you'll have to figure this!)
:: Setup:
:: Save this file as epsxe.bat into the root directory of epsxe (same folder as epsxe.exe)
:: GameEx Settings:
:: Command line: ePSXe.bat "[rompath]" "[romfile]"
:: 7-Zip Support: On
:: Scan Subfolders: On
:: Rom Filters: *.cue;*.mds;*.ccd
:: NO commands in "launch before" or "launch after"
:: Works with following file types in zipped folders (any permutation):
:: all .ecm
:: .bin .cue
:: .ccd .img .sub
:: .mds .mdf



Before I'm flamed - I aint no coder, so it aint the tidiest or most eloquent, but it bloody works!!

Hope this is of some use to someone!

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...