Rayman 3 (Xbox) *.h00/h01/h02

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Hi,

So I was looking inside the files of Rayman 3 (Xbox), and it seems the music is inside the Streams.h00, .h01 and .h02 files.

Now I'm not sure if there is a way to unpack them, but I'm still asking.

Here are samples: (expired)

Thanks in advance.
Last edited by Mygoshi on Thu Feb 18, 2021 9:37 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by aluigi »

There is nothing to extract because there are no headers.
They are just a long Xbox adpcm file at 22050, but there are both mono and stereo mixed so it's not possible to play everything.
For example Stream.h00 starts with multilanguage mono voices and then continues in stereo.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

If I understand do I have to check other small files to see if they can be useful?
Last edited by Mygoshi on Thu Feb 18, 2021 9:38 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by aluigi »

Yes, check if you have an index file there.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

I think I found them:

Samples: (expired)

Thanks again.
Last edited by Mygoshi on Thu Feb 18, 2021 9:40 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by aluigi »

Staff.hxx seems the good one.
Try the following:

Code: Select all

get EXT extension
if EXT != "hxx"
    print "Error: you must open the files with HXX extension"
    cleanexit
endif
for
    findloc OFFSET string "STREAM."
    math OFFSET -= 4
    goto OFFSET

    get NAMESZ long
    getdstring NAME NAMESZ
    open FDSE NAME 1

    get NAMESZ long
    getdstring NAME NAMESZ
    getdstring DUMMY 8
    get OFFSET long
    get SIZE long

    string NAME += "/"  # autoguess
    log NAME OFFSET SIZE 1
next

It's enough to open just staff.hxx and it will extract all the streams.
I have not seen references to the number of channels but the format is not simple (that's why I use the findloc trick).
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

:o This is amazing! Thanks so much.
Last edited by Mygoshi on Thu Feb 18, 2021 9:46 pm, edited 2 times in total.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

It correctly worked on the files I sent here.
Last edited by Mygoshi on Thu Feb 18, 2021 9:46 pm, edited 2 times in total.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Oh, unfortunately it didn't do it for the rest of the files... Do you have some clue?
Last edited by Mygoshi on Thu Feb 18, 2021 9:47 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by aluigi »

There are many hxx files and I have updated the script to allow you to select multiple hxx files.
I don't see other offset and size fields so I have no other ideas.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Nice! Thanks.
Last edited by Mygoshi on Thu Feb 18, 2021 9:44 pm, edited 2 times in total.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Are there any other tools which would permit to fully extract the music?
Last edited by Mygoshi on Thu Feb 18, 2021 9:45 pm, edited 2 times in total.
Droolie
Posts: 7
Joined: Wed Feb 25, 2015 3:28 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Droolie »

I wrote some very complicated tools for a lot of the other versions of Rayman 3 (and Rayman Arena, which uses the same file system), you can find them here: https://mega.co.nz/#!SY1ARZ4D!nndgAEUcg ... FYk2ihdtoc
They're really messy scripts (I had little programming knowledge when I made that, so forgive me for that), but they work perfectly.

It basically uses a bat file to run a QuickBMS script that extracts all audio files without filenames. Meanwhile, the QuickBMS output, which is useful for applying the correct names, is printed and stored in a *.txt file. A Java program called RayAudio uses these *.txt files to link all elements of the hxd/hxg/hx2/hx3/hxx files together and apply the correct filenames.

I think I implemented the Java part for the Xbox version, but I never did the QuickBMS part, at least not for Rayman 3. There are only a few modifications necessary from the existing scripts though. :) I would do it myself for you but it doesn't really seem necessary as the audio is the same as the PS2 version's...
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Not the same, the quality is better and some of the tracks aren't segmented
Last edited by Mygoshi on Thu Feb 18, 2021 9:41 pm, edited 2 times in total.
Droolie
Posts: 7
Joined: Wed Feb 25, 2015 3:28 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Droolie »

Mygoshi wrote:Not the same, the quality is more good and some of the tracks aren't sequenced.

Both versions have equal quality (22kHz, PS2 even has a higher bitrate) and there are some tracks that aren't sequenced in the PS2 version as well...
In any case, if you're looking for quality then you should try the PS3 version. ;)
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Is it normal your script gives me error on some other files though?
Last edited by Mygoshi on Thu Feb 18, 2021 9:47 pm, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by aluigi »

The script that I posted before worked with the samples I worked on.
I don't know what content they have, I just got an offset and size for extracting something.
Mygoshi
Posts: 654
Joined: Mon Oct 27, 2014 1:49 pm

Re: Rayman 3 (Xbox) *.h00/h01/h02

Post by Mygoshi »

Right, thanks for answering.