PS1 Extracting (ATRAC3?) audio tracks from EBOOT.PBP

Wow it seems you are making great progress Heel, i hope you can get it working, Rebuilding the header would probably be hard, does it exist in the packed PBP or is it actually gone ? (i mean does psxtract just fail to extract the headers or are they cut off by sony during the conversion ?) Anyway good luck.
 
Wow it seems you are making great progress Heel, i hope you can get it working, Rebuilding the header would probably be hard, does it exist in the packed PBP or is it actually gone ? (i mean does psxtract just fail to extract the headers or are they cut off by sony during the conversion ?) Anyway good luck.

The headers aren't in the PBP, just the raw audio data. Consoles apparently have specialized hardware decoders for these ATRAC3 streams so they don't need them for playback, but I'm far from an expert here. The header is actually not so bad, the only tricky part was one undocumented field that appears to hold the size of the input (or likewise the desired size of the output) divided by 4, which is maybe the number of 4byte frames that the input represents when converted to PCM. I'm not really all that well versed in signal processing stuff but that's my rough understanding. In any case, the trick was just to figure out this value based on the number of frames as represented by difference in track offsets from the CUE section in the PSAR. I should have a working extractor/converter soon-ish..
 
Alright I think I sorted out most problems now. Going to re-rip and test all my eboots before cutting a release just to double check there are no other bugs left, but if anyone wants to jump on it already the code is published:

https://github.com/has207/psxtract-2

I updated the README so check that, it might have the answers.
 
Well the good news it works pretty well, I got close to 40 of my eboots converted without issues. Bad news is there are bugs in the original psxtract/isofix that now make me worry some rips may not be fully playable even though they appear to boot and run initially. I've squashed one minor isofix bug so far, but there are at least two maybe three more based on the handful of eboots I have that differ from disc dumps. I'm going deeper into the rabbit hole haha...
 
Keep in mind that there are several versions of the same games, like eg. premiere versions and platinum/greatest hits versions which have i.e fixed some bugs. So be sure that You checking sums of all revisions because it is possible that developer took i.e latest build for his PSS package.

BTW: Thank You for Your work!

If You provide compiled version I can check my games. ;] Linux build prefer (with libc6 dependent) but Windows is still fine. Well, actually I can on Linux compile it for myself but not for Windows (I don't have VS and last time I fighting with it I hate it ;]).

If I can suggest something, change app name for something unique i.e "psxtract finally audio decryption friendly" or "psxtract-at3" or whatever, but just different than "psxtract" to point the user it is modified psxtract in some way. ^^
 
Last edited:
Keep in mind that there are several versions of the same games, like eg. premiere versions and platinum/greatest hits versions which have i.e fixed some bugs. So be sure that You checking sums of all revisions because it is possible that developer took i.e latest build for his PSS package.

BTW: Thank You for Your work!

If You provide compiled version I can check my games. ;] Linux build prefer (with libc6 dependent) but Windows is still fine. Well, actually I can on Linux compile it for myself but not for Windows (I don't have VS and last time I fighting with it I hate it ;]).

If I can suggest something, change app name for something unique i.e "psxtract finally audio decryption friendly" or "psxtract-at3" or whatever, but just different than "psxtract" to point the user it is modified psxtract in some way. ^^

That's a good call in terms of different versions, unfortunately the two games I have with the most glaring diffs are JP Einhander and JP release of Rival Schools (Shiritsu Justice Gakuen: Legion of Heroes). And as far as I can tell both of these only had a single physical release, so I'm currently suspecting the isofix code but will try to track it down and find out why I'm seeing diffs. For Rival Schools it's especially strange as it's a single byte in the middle of the second disc. For Einhander there are many relatively short diffs throughout the file. There are 5 more games that have ECC data in the last empty sector that's only present in the official dumps, which I believe is harmless to be omitted, but I might start another thread on that topic.

I agree about the name, the repo I cloned was already named psxtract-2 so I'll just be going with that convention. And sadly no more Linux builds, the code has diverged significantly and I don't plan on supporting it, but I expect the Win binary will run on Linux with wine, and maybe a build target using wine libs could be added from the Win code..

But FWIW it's very easy to build on Windows, just click the .sln file and open in VS, then choose "release" from the dropdown at the top and build the exe. I don't want to start posting buggy builds for now, but if you're feeling adventurous go for it :)
 
More progress, CDDA support for multi-disc games almost implemented. Interesting findings include what I believe is a bad EBOOT for RE2 Dualshock Edition -- the eboot includes cue entries for audio tracks but there are no audio tracks in the eboot itself. This is kind of fine as the audio tracks on the actual discs are just empty and I can only assume the game doesn't make use of them. So it kind of makes sense to not include them in the package but the eboot structure is technically broken for that game as the audio track offsets point into random data, and it needs some special workaround in psxtract as a result. This damn thing had me chasing my own tail as I thought my code was busted until I tried another game and realized the problem is with this eboot itself.

On the positive side there are VERY few multi-disc games with CDDA audio, Alone in the Dark the New Nightmare might actually be the only western release unless I missed something, but there are a handful more in the JP store that I still need to check. Anyway, there are still some bugs I haven't figured out, and an interesting mystery with ECC data in the last sector for some games that I should document and see if anyone in the community can shed light on, but making some progress..
 
Back
Top