Kippykip / SBITools

Conversion between Sony PlayStation .SBI LibCrypt files
The Unlicense
59 stars 5 forks source link

CUE file: Add "Track mode" line to the Track 1 when that it's DATA #10

Open cjuniorfox opened 2 years ago

cjuniorfox commented 2 years ago

This utility became very useful for converting the Sega Saturn's BIN/CUE images to CCD/IMG/SUB/CUE to properly use with the Saturn's ODE emulator Fenrir-ODE (loading games through SDCard and over Network with the Wifi WIP). The only downbreak it's about the created CUE file. The information of the "TRACK MODE" at the first track (data track MODE1/2352) it's not declared. The workaround it's manually opening the created CUE file with some text editor and adding the kind for the TRACK 1. Details below:

Command:

sbitools.exe -cue2ccd "Alien Triology (USA).cue"

Behavior: The cue file it's generated like bellow:

FILE "Alien Trilogy (USA).img" BINARY
    INDEX 1 00:00:00
  TRACK 2 AUDIO
    INDEX 0 11:58:50
    INDEX 1 12:00:50
...

Expected:

FILE "Alien Trilogy (USA).img" BINARY
    TRACK 1 MODE1/2352
    INDEX 1 00:00:00
  TRACK 2 AUDIO
    INDEX 0 11:58:50
    INDEX 1 12:00:50
...

Regards

synrais commented 2 years ago

Notepad++ will save you time Find and replace in files *.cue Find what? (\n^(.+)$) Replace with TRACK 01 MODE1/2352$1

Regular expressions on Matches newline on

or

Just reuse your old cue file, and replace .bin in files with .img, you will need to for the titles it fails to add correct pregap and ends up with access error

cjuniorfox commented 2 years ago

I did a ¨sed" script to batch replace those files and it worked ok. I just judged worth mentioning because fells like a requirement for the .cue file to work correctly at all

synrais commented 2 years ago

If you're using it for Saturn all .ccd generated will be wrong, the first mode is forced as 2 for all the PS1 games, where Saturn needs this mode as 1. Some other stuffs probably wrong too. Open up the .ccd and take a look.

synrais commented 2 years ago

For Saturn just use DiscoHawk. Batch is kinda broken, just search for all your cues and drop them onto the window, i've done 1000s at once. DiscoHawk fix's everything BUT if DiscoHawk increases the image size then delete the old bin/img and make a new cue sheet with CDmage and the hawked_ccd.