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

ECM Tools Within' Game Ex (ePSXe)


Visitor Q

Recommended Posts

New version of the script:

@echo on
set directory=%1
set directory=%directory:~1,-1%
set file=%2
set file=%file:~1,-1%

mkdir %temp%\Gameex_temp
copy "%directory%\*.cue" %temp%\Gameex_temp
copy ..\packiso\*.* %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), 3, "Recreating Playstation image") >> messagebox.vbs

messagebox.vbs "Extracting 7z archive with binary data. Please wait..."
7za e "%directory%\*.7z"
messagebox.vbs "Adding ECM..."
unecm.exe *.ecm
del "*.ecm"
messagebox.vbs "Uncompressing APE audio tracks..."
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"
messagebox.vbs "Mounting image and starting emulation..."

"%programfiles%\Daemon Tools Lite\daemon.exe" -mount 0,"%temp%\Gameex_temp\%file%"
cd %programfiles%\GameEx\Emulators\epsxe
start/wait %programfiles%\GameEx\Emulators\epsxe\epsxe.exe -nogui -analog1
ping -n 3 localhost > nul
"%programfiles%\Daemon Tools Lite\daemon.exe" -unmount 0
rmdir /s /q %temp%\Gameex_temp

The original code had one big disadvantage: The temp directory got too big because the there was the copy, the non-ECM file and finally the ECMed bin track - and additionally the ape, the wav and the wav-bin files. Furthermore, copying the 7z archive as well as the ape tracks took unnecessary time - this new script does the un-7z-ing and APE-2-wav conversion "on-the-fly" without using the temp folder.

Furthermore, I added self-closing message boxes to get at least some status messages. I am not satisfied with them but maybe they are better than nothing.

Last-but-not-least: You don´t need the packiso package anymore, you can use 7za, unecm, mac and sox from their project websites. However, packiso contains all those tools, so it is still worth downloading.

Nevertheless: The epsxe parameter -analog1 still seems not to work as expected... :(

Many thanks to Google who helped my find more information about DOS and VBS syntax. ;)

Link to comment
Share on other sites

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