Jump to content
LaunchBox Community Forums

PS1/PSX : Batch combine multiple .bin (and then .pbp)


Ariakan

Recommended Posts

Yeah I went for them after reading they handle disc swapping automatically. I've not played far enough into any game yet to test. If it turns out its the same usage as M3U I may rethink it in the future. I dont have Riven as the PS1 version doesn't seem like the ideal version and since everything is running on a PC anyway I figured I'd just get the PC version of those.

@SentaiBrad My testing is far from thorough, more just me not knowing any better one way or the other and its the core I ended up playing with after watching one of simplyaustins tutorials. But from the maybe 10 games I messed with unless I messed with settings I couldn't tell the difference.

Edited by spectral
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 4 months later...

I know this is a few months old now, but its the first post I found in Google search.  What I did for my collection is use chdman from Mame to batch convert my cue/bins (with mutliple bins/wavs/etc) into a chd, and then you can then extract a single cue/bin for the entire disc from the chd using the chdman "extractcd" option.  This adds 1 extra conversion step, but depending on your computer speed you are only talking about a difference of a few hours over an entire batch run.  I just wrote this script below from memory, so you may need to debug and adjust to your env. 

What I can't find is a Windows command line exe to make compressed PBPs.  The gui versions are just annoying for batch use.  Maybe I should start a bounty on it if I knew how to do that.  It would have to be simple to do if you know C since the source code ships with the PSX2PSP program in the "popstation_src" directory.

 

@echo on

SET "SourceDir=D:\PS1"
SET "WorkDir=D:\PS1\In_Progress"
SET "DestDir=D:\PS1\Completed"

mkdir "%WorkDir%"
mkdir "%DestDir%"

for /f "tokens=*" %%a in ('dir /b /a-d "%SourceDir%"') do (

	7z.exe x "%SourceDir%\%%a" -o"%WorkDir%\%%~Na"
	
	for /f "tokens=*" %%b in ('dir /b /a-d "%WorkDir%\%%~Na\*.cue"') do ( 
		chdman createcd -i "%WorkDir%\%%~Na\%%b" -o "%DestDir%\%%~Nb.chd"
		
		if exist "%DestDir%\%%~Nb.chd" (
			chdman extractcd -i "%DestDir%\%%~Nb.chd" -o "%DestDir%\%%~Nb.cue" -ob "%DestDir%\%%~Nb.bin"
			del "%DestDir%\%%~Nb.chd"
			rd "%WorkDir%\%%~Na" /S /Q
		)
	)
)

pause

 

Edited by gt46l
  • Thanks 1
Link to comment
Share on other sites

I just tried one with this method...  had 20 cdaudio tracks, and they seem to be playing fine in game in the pbp I created....  no problems with sound effects, music, audio.  I suspect though that it could depend on how well chdman reads your cue file when it creates the chd.  Also, for those not familiar with chdman, it only works with wav or bin audio tracks to make a chd.  If you have ogg, flac, mp3 tracks you'd need to convert them first to wav and then update your cue file first before creating a chd.  If you do run into an issue with a pbp you create using this method I would suggest you verify your cue is well formed and that you are using the most updated chdman (195 i believe).

Edited by gt46l
Link to comment
Share on other sites

I tried it with "Street Fighter Alpha - Warriors' Dreams (Europe)". (The game we all have an issue with here)

With the .cue and .bin file, it seems to work fine. But when I convert it into .pbp, the music in the introduction doesn't work and the music in the character selection "freeze".

Can you try it too with chdman 195? I'm using 185 or 187, I don't remember... If it works fine, tell me what parameters in PSX2PSP you use and what emulator/core!

If we can found a solution to make this game works, I will be able to test other games, and then I will be able to batch .bin&.cue > .pbp for all games!

Edited by Ariakan
Link to comment
Share on other sites

I don't have the Euro version of that one, just the USA version, but I just converted my version here and had no issues.  All audio and music works fine playing the pbp, no freezing or anything, game plays fine.  Maybe the Euro version has a bad rip, bad cue, or psx2psp just doesn't like it for some reason.  PAL versions can require patches I believe (in psx2psp).  You'd think only for graphic related reasons, but video timing can affect audio timing in emulators.  I don't have any PAL stuff, only NTSC, but perhaps if you patch the graphics on PAL stuff it would fix the audio??  I am using the libretro psx rearmed core, chdman 191 (the version I have on hand), and of course PSX2PSP 1.4.2.  Here are all the PSX2PSP settings, and of course the chdman command is:

chdman createcd -i "sfawd.cue" -o "sfawd.chd"

chdman extractcd -i "sfawd.chd" -o "sfawd.cue" -ob "sfawd.bin"

 

I am using max compression in

image.thumb.png.4dbdb445c6bc994ac6862ec637ec4cf0.png

 

image.png.67ca6d35658c19b467928bc8157c8a97.png image.png.95fa68d983ea5d479276848c19b35e84.pngimage.png.b47b64035221d980a279a3a79791a0bc.png

image.png.a4092aa6e61faa5f74c959aec0899bc6.png

image.png.a73a78d45ee07531f05bf1cee33df494.png

 

 

 

Edited by gt46l
Link to comment
Share on other sites

Ok, I will try this tonight and will make a feedback from all my tests, thank you! :)
(And for information, my version a the game is a Redump one, so it's clean, the problem is somewhere else. I will test with your version of the game, of the chdman, etc...)

Link to comment
Share on other sites

Well, I tried (with .pbp) :

  • Street Fighter Alpha - Warriors' Dreams (Europe) + Bettle PSX HW : Nope 
  • Street Fighter Alpha - Warriors' Dreams (Europe) + PCSX ReARMed : Nope
  • Street Fighter Alpha - Warriors' Dreams (USA) + Bettle PSX HW : Nope
  • Street Fighter Alpha - Warriors' Dreams (USA) + PCSX ReARMed : Yep

It seems a little random and risky to compress everything to .pbp ... :( We should try a loooot of other multi-disc games to be sure the problem is isolated to this game... 

Link to comment
Share on other sites

  • 8 months later...
On 6/1/2017 at 11:55 PM, Ariakan said:

I have 3000 games for 1.4 To

For 100 games I've tested i've been from 43Go to 28Go with .pbp compression! When we have a lot of games, that's not insignificant...

--------------------------------------------------------

I'm trying something with Isobuster that seems to work but there is something strange.

The script use Isobuster and 7zip :

  1. I have to compress all my games in .7z
  2. The script decompress the .7z in a folder TEMP
  3. It combines .bin files and generate a new .cue file
  4. Sometimes I have to press "no I don't want to buy IsoBuster now" :P 
  5. It compress back the files in a .7z file
  6. I have to decompress the 7z :D 

Well, well, well...... if we can take away the 7zip part, it could be great ! But I don't understand everything in this script... Maybe someone can give it try?


@echo off
cd %~dp0
set mypath=%~dp0
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% **************************************************
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2%                    Starting Job
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% ************************************************** 
>>Log.txt echo.

if [%1]==[] goto :eof
:loop

pushd %mypath%


7za.exe l %1>contents.txt

set file=contents.txt
set /a cnt=0
for /f %%a in ('type "%file%"^|find ".bin" /c /i') do set /a cnt=%%a
echo *******************************************************************************
echo File %~n1 has %cnt% .bin files!
echo *******************************************************************************
echo.
echo.

if %cnt% GTR 1 (goto extraction)

echo *******************************************************************************
echo File %~n1 WILL NOT be repackaged!
echo *******************************************************************************
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% %~n1 has only %cnt% .bin file and will NOT be repackaged.
>>Log.txt echo.

GOTO skipped 

:extraction
echo *******************************************************************************
echo File %~n1 WILL be repackaged!
echo *******************************************************************************
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% %~n1 has %cnt% .bin files and WILL be repackaged.

7za.exe e -y %1 -o.\TEMP
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% -- Archive extraction to 'TEMP' folder completed.

IF NOT EXIST "%mypath%FIXED" MD "%mypath%FIXED"

isobuster.exe "%mypath%TEMP\%~n1.cue" "/ei:%mypath%FIXED\%~n1.bin" /et:r /ep:oea /ep:owr /c /m /nosplash /nodrives
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% -- Consolidated .bin and new .cue file created sucessfully.

7za.exe a -t7z "%mypath%FIXED\%~n1.7z" "%mypath%FIXED\%~n1.bin" "%mypath%FIXED\%~n1.cue" -ms -mx7 -mmt
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% -- Recompression to 'FIXED' folder completed.

echo *******************************************************************************
echo *******************************************************************************
echo *******************************************************************************
echo Sucessfully repackaged %~n1
echo *******************************************************************************
echo *******************************************************************************
echo *******************************************************************************
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% -- Sucessfully repackaged %~n1
>>Log.txt echo.

del /Q "%mypath%FIXED\%~n1.bin"
del /Q "%mypath%FIXED\%~n1.cue"
rmdir /Q /S "%mypath%TEMP"
md "%mypath%TEMP"




:skipped

shift


if not [%1]==[] goto loop




:EOF
echo *******************************************************************************
echo THE END!!!!
echo *******************************************************************************
>>Log.txt echo(%Date:~10,4%-%Date:~4,2%-%Date:~7,2% %time:~0,2%:%time:~3,2%:%time:~6,2% -+::SUCESSFULLY COMPLETED EXECUTION ON ALL FILES::+-
>>Log.txt echo. 
>>Log.txt echo. 
exit

I put the files in the attachment of this post.

You have to install 7zip first. Launch Isobuster.exe, say "not now" for the registration, go to "Options > Images files" and for the option "select when a cue sheet file will be created" select "Never after a CD, DVD or BD image is created". (you will not have to say "ok" pour every game !)

After that, simply drop your .7z files into the "DROP FILES HERE1.bat" file.

I hope someone will understand the .bat script and will remove all the useless 7zip parts!!

WIP - Fix Multi Tracks (Bins PS1).zip

When I tried this all I got was a 7zip file that was completely empty. Did anyone else get that?

Link to comment
Share on other sites

  • 2 months later...

Just to add some useful information...

when doing the chdman createcd/extractcd method to merge multiple bin into a single bin, you can add

-c none

to the end of the command line, which means it will not compress the chd and greatly speeds up the processing
(only use this if you don't want keep the chd around afterwards)

In other news, converting games with CD Audio tracks to EBOOT

I have had success with these apps:

  • popstationgui 3.00 beta
  • psx2psp 1.4.2

I have not had success with:

  • icetea
  • popstation (macOS command line)
  • popstationr (macOS command line)
  • copstation (macOS command line)

For Street Fighter Alpha - Warriors' Dreams using popstationgui 3.00 beta:

  • (Europe) EBOOT.PBP file is 518,820,777 bytes, MD5 c0ea8b8a6249113b30bb1990dd311947
  • single BIN/CUE pair + popstationgui + video fix + Beetle : YES, intro correct
  • single BIN/CUE pair + popstationgui + video fix + PCSX ReARMed : YES, intro correct
     
  • (USA) EBOOT.PBP file is 518,789,849 bytes, MD5 d4252169d531510996f2f27708e132eb
  • single BIN/CUE pair + popstationgui + Beetle : YES, intro correct
  • single BIN/CUE pair + popstationgui + PCSX ReARMed : YES, intro correct

Notes:

  • With popstationgui you can tell the audio conversion is OK because it forgets to delete the TOC file it uses for CD Audio.
  • On PSP I have to make sure to use cdda-enabler.prx seplugin in order to hear CD Audio in POPS/PS1 games.
  • In RetroArch on macOS my EBOOT files work fine with CD Audio, my test games have between 5 and 60 audio tracks.
  • I do not recommend using EBOOT.PBP as the only source of your game. Please keep original BIN/CUE or CHD around.
Edited by gingerbeardman
Street Fighter Alpha WD details
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

For anyone who is interested, there is a VERY easy to use Python script on GitHub called 'binmerge' that was created by 'putnam'. I tried it with a couple of PS1 games that have multiple bin files, and it worked perfectly. Additionally, it only took seconds to create the new bin file (probably because it is not actually modifying any of the data but rather just merging the files and creating a new cue sheet). The description specifically mentions its use in merging PSX bin files.

https://github.com/putnam/binmerge

Just click on the 'binmerge' file, click raw, and then right click and 'Save As'. Make sure to click the 'Save as type' dropdown in the save dialog and change it from 'Text Document (*.txt)' to 'All Files (*.*)' and then change the filename to 'binmerge.py'. You need to use Python 3 (probably 3.4+, although I used 3.7 32-bit). To use it is really simple.

python binmerge.py "PATH\TO\ORIGINAL\CUE\FILE.cue" "NewBinCueFileNameWithoutExtension" -o "PATH\TO\OUTPUT\NEW\MERGED\BIN\AND\CUE\FILE"

The '-o' option is not required, but obviously if you want to keep the name the same as the original file, you're going to need to provide a different output directory so that it doesn't try to overwrite one of your existing files. Just to make it extra clear, I will provide an example below using 'Castlevania - Symphony of the Night (USA)'.

Original CUE File Location:
"C:\roms\ps1\Castlevania - Symphony of the Night (USA)\Castlevania - Symphony of the Night (USA).cue"

New BIN/CUE Name (without extension):
"Castlevania - Symphony of the Night (USA)"

Output Directory ('-o' option):
"C:\roms\ps1\Castlevania - Symphony of the Night (USA)\merged"

python binmerge.py "C:\roms\ps1\Castlevania - Symphony of the Night (USA)\Castlevania - Symphony of the Night (USA).cue" "Castlevania - Symphony of the Night (USA)" -o "C:\roms\ps1\Castlevania - Symphony of the Night (USA)\merged"

Before:
image.thumb.png.2498525a94b902ab079f6a865b9f8a3e.png

FILE "Castlevania - Symphony of the Night (USA) (Track 1).bin" BINARY
  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
FILE "Castlevania - Symphony of the Night (USA) (Track 2).bin" BINARY
  TRACK 02 AUDIO
    INDEX 00 00:00:00
    INDEX 01 00:02:00


After:image.thumb.png.89265a042c293079079fcd79a3371caf.png

FILE "Castlevania - Symphony of the Night (USA).bin" BINARY
  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    INDEX 00 50:53:45
    INDEX 01 50:55:45

I didn't really intend to do an enormous writeup on this, but as usual, it looks like I went a bit overboard... Hopefully it will be useful for someone! Oh, and in case someone wants to use this but doesn't want to mess with installing Python and getting all of that setup correctly, I converted the Python script into an EXE (using 'pyinstaller') to make it really easy to use. In the example above, just replace 'python binmerge.py' with 'binmerge.exe'.

Zip file containing 'binmerge.exe':
binmerge.zip

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

Hi!

I just wanted to say that, since I created this topic, Beetle PSX HW and PSX-Rearmed cores support CHD format using chdman.exe from MAME.
So now we can have one .cue + one or multiple .bin combined inside only one .chd file, with a better compression size than .pbp !

I haven't try your solution, but thank you posting it!

Link to comment
Share on other sites

3 hours ago, Ariakan said:

Hi!

I just wanted to say that, since I created this topic, Beetle PSX HW and PSX-Rearmed cores support CHD format using chdman.exe from MAME.
So now we can have one .cue + one or multiple .bin combined inside only one .chd file, with a better compression size than .pbp !

I haven't try your solution, but thank you posting it!

Very interesting! I've never even heard of the .chd file format, but then again, I don't mess with MAME emulation very much... It sounds like its simply a compressed hard drive image ("Compressed Hunks of Data"). Unless .chd offers some big advantage in terms of compression or something (I can't imagine there is any real significant difference) , I think I personally prefer to stick with .pbp since it is supported by most PS1 and PSP emulators, as well as modded PSP devices. Thanks for the useful information though... I'm sure it will prove to be useful to others. 

Edited by Lahma
Link to comment
Share on other sites

18 minutes ago, Lahma said:

Very interesting! I've never even heard of the .chd file format, but then again, I don't mess with MAME emulation very much... It sounds like its simply a compressed hard drive image ("Compressed Hunks of Data"). Unless .chd offers some big advantage in terms of compression or something (I can't imagine there is any real significant difference) , I think I personally prefer to stick with .pbp since it is supported by most PS1 and PSP emulators, as well as modded PSP devices. Thanks for the useful information though... I'm sure it will prove to be useful to others. 

Oh yes, for PSP we have to stick to the .pbp format.
But for those who want to play on RetroArch cores, the .chd format is waaaay more better than everything ! 
Only one file, no problem with multiples .bin files, less space on the disk (there is a real difference !)... and easy to compress all our games with only one script. If anybody read this and play on RetroArch, do the .chd compression instead of the .pbp one !1

Example of total space after a compression (from reddit) :

"Driver - You Are the Wheelman (USA) (v1.1)".

  • bin/cue : 747,030,480 bytes.
  • PBP (maximum compression) : 517,187,964 bytes.
  • CHD : 465,566,193 bytes.

When we have a lot of games, it's a real difference. :D

Edited by Ariakan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...