Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
0xdeafcafe

Modding
Let's Make Some Noise

5 posts in this topic

Over the past few day's I've been working on Halo 3 Sound Extraction (should work in other games, if the plugins are mapped out). Now I've hit a point I'm stuck at, so let's hold hands and do it together! I'll post all the research/progress I've made below.

Special Thanks:
Gravemind.


Stage 1: Raw Table Resource Allocation
In any snd! tag, there is a DatumIndex (int32) labelled as the Raw ID or Raw Identifier. This is used to find the data of the object in the raw table. This thread really isn't to do with how the Raw Table works, so let's just skip over that for now.
 
Stage 2: Extract Sound from Raw Table
The Raw table is split between a Primary Page and a Secondary Page. If there is content in both Pages, you need to concatenate the second page on to the end of the first page.
  
Stage 3: Get Playback Index
In a snd! tag, there is an int16 called Playback Index, this relates to finding sound data in the `sound_cache_file_gestalt`.
  
Stage 4: Get the Permutation Data
In the ugh! class, there is 1 tag, the `i've got a lovely bunch of coconuts`, this contains everything we need to extract permutations from raw sound sections. Go to the index in the `Playback` reflexive that we got in the previous stage, and get the uint16 `First Permutation`, and the  int16 `Encoded Permutation Data` (this is encoded and you need to do this to it to get it to be a readable number, (value >> 4) & 63). Now go to the index of the `Sound Permutations` table we got from `First Permutation`, and the next n entries are also permutations from the same sound (n being the number we decoded from `Encoded Permutation Data`. 
  
Stage 5: Get the Raw Offset and Length
For each (lol vb) entry in the `Sound Permutations`, the int16 `Sound name Index` is the index in the `Sound Names` reflexive that has the StringID of the name of the permutation. Now, we need to get the int32 `Raw Chunk Index` and the uint16 `Chunk Count` (we'll come to this later), this is the index in the `Raw Chunks` reflexive that says where in the raw sound data to start the permutation (int32 `File Offset`), and the size of it (uint16 `Size`).
  
Stage 6: There is where the party starts
Riiight, so if you followed this, and took the outputted sound data and added the XMA header and footer, and converted it to WAV, you might see that the permutations are, well, to put it mildly, completely fucked up. Something is causing the permutation data to get screwed up, and I think (well, pretty sure) it's to do with that phantom uint16 `Chunk Count` in the `Sound Permutations`.
 
 
So, let's get this done.

Share this post


Link to post
Share on other sites

I should point out that not very many people know how the raw table works. Unless you're only expecting staff members to help, you should probably explain it.

Share this post


Link to post
Share on other sites

I should point out that not very many people know how the raw table works. Unless you're only expecting staff members to help, you should probably explain it.

Yes, that would help. :P

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0