What are the possibilities of extracting the music from MUSIC.DAT and/or STREAM.DAT?

Discussion in 'Gran Turismo 1' started by Bounkazz, Dec 27, 2018.

  1. Bounkazz

    Bounkazz

    Messages:
    830
    Hey guys, I recently got back into modding again after been away for years. It's good to be back.

    Over the last few months I've been particularly interested in background music of games I've played. I know a lot of it is illegally downloadable from online, but there's no challenging in that. Plus, the sound quality is either MP3 or worse. I want lossless, directly extracted from the game files for the best possible quality commercially available. No doubt Sony and/or Polyphony have studio quality files stored somewhere.

    So far I've managed to extract quite a few music files from many games I've played over the years, convert them to a widely used lossless container, and play them at will. All of which is unavailable anywhere else in both retail and online.

    Gran Turismo-wise, in the last few days, I've managed to extract and convert:

    - Gran Turismo 2 (PAL, NTSC-U with NTSC-J is ordered and the way)

    - Gran Turismo 3 (PAL, NTSC-U with NTSC-J is ordered and on the way)

    I'm currently also working on Gran Turismo 4 (PAL/NTSC-J). I have the feeling that I'm getting quite close, as I only need a few more parameters to convert them from GENH to WAV to get it right (using VGMToolbox, if that's going to work in the first place). Anyone any ideas? If not I'll have to start over and find another way to convert ADS to WAV. The NTSC version is ordered and on the way.

    Now, as for Gran Turismo (1), I am at a loss. I have no idea how to open the MUSIC.DAT or STREAM.DAT files...

    After some searching on the GTPlanet forums I encountered some big names in the Gran Turismo modding scene unpacking car and course DAT files, quite interesting, gives me hope. Unfortunately the links to these tools are expired and no longer working. :( Are there any such tools for the audio files?

    Any help would be much appreciated. Thank you very much.

    Merry Christmas and a Happy New Year to all!
     
    Last edited: Dec 27, 2018
  2. submaniac93

    submaniac93

    Messages:
    955
    Location:
    France
    Merry Christmas to you too! I've been able to extract most of the OST from GT1 and 2 (and also the PS2 games) with PSound (making sure to disable the forced fade out that gets saved when you extract the files)

    As for menu soundtracks, you'll probably know since it's done the same way it is in GT4, a bunch of samples programmed to play the various tracks. So those you can't "extract" (you can get the samples out though).
    GT1 unfortunately proves to be quite the tough guy to crack open. We've managed recently to successfully extract a good portion of it, but the music data is still a bit of a mystery.

    @pez2k might be able to help you more if he sees this? (Sorry, man. You're the expert in the filesystem here x) )
     
  3. Xenn

    Xenn Premium

    Messages:
    2,226
    Location:
    United Kingdom
    To get at these files, you'll need a program called jpsxdec. This can look at various music file formats, including the STREAM.DAT and MUSIC.DAT files.
     
  4. Bounkazz

    Bounkazz

    Messages:
    830
    Thanks, I didn't know PSound could read DAT files. I just ran my Gran Turismo NTSC ISO through PSound and all I got were 1856 WAV files of under 10 kb each... Not exactly what was hoping to see. The exact same thing happened with my PAL ISO. 1856 <10kb WAV files. Not a single full song. Any ideas? I set the fade out time from 1 to 0 like you said.

    Yeah I've read about the menu music being a tough cookie to crack. But I'm honestly not interested in the menu music.

    I actually ran into this program on my PC not long after posting this thread, I completely forgot it had already used it on Gran Turismo not to long ago. All I got where four 17:23 long audio clips and two other sound clips.
     
    Last edited: Dec 27, 2018
  5. pez2k

    pez2k

    Messages:
    241
    I don't know anything about the streamed audio files I'm afraid - DAT is just a meaningless extension and not a specific format. All I've worked with is PD's archive format (GT-ARC headers), but those two files are a different format.
     
  6. Bounkazz

    Bounkazz

    Messages:
    830
    I'm actually interesed in opening some GT-ARC files. What method do you use to open them?

    @Xenn and @submaniac93, I managed to split the files 17:22 minute long files. And just as I thought, not all songs are there, unfortunately. Missing all songs by Feeder and most, if not all other songs that can be heard during racing. It seems jPSXdec doesn't recognize all audio files. Are there any other programs that can unpack the DAT files and possibly convert them to WAV?
     
  7. submaniac93

    submaniac93

    Messages:
    955
    Location:
    France
    PSound will list every single sound it can find, including menu samples and especially car sounds (got over 13k of those in GT4 lol) However, for some reason (probably file order in the archives) the music will almost always be located at or near the bottom of the list. I was able to get most of those game's OST that way. I don't remember if any are missing or not however. Been almost a decade since I did that lol.
     
  8. pez2k

    pez2k

    Messages:
    241
    I wrote my own tool based on existing snippets of code. It's complicated by the fact that some of the files are compressed, and that the format doesn't store the original filenames, but just PM me for more details.