Parsing sounds.map and bitmaps.map and datatypes

Everything about HD, MD, and their mods.

Moderator: Halo Moderators

Post Reply
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Parsing sounds.map and bitmaps.map and datatypes

Post by Sparky » Tue Oct 02, 2012 11:18 pm

I'm dabbling in trying to figure out how the sounds.map and bitmaps.map files are formatted. Is Altimit01 or anyone else around who has learned anything about these map files?

All responses regarding how these work are welcome.

Best way to do this is to discuss the halo demo bitmaps.map and sounds.map files, providing offsets as examples.
Last edited by Sparky on Fri Oct 12, 2012 4:47 pm, edited 1 time in total.
Either you are groping for answers, or you are asking God and listening to Jesus.

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Parsing sounds.map and bitmaps.map

Post by Modzy » Wed Oct 03, 2012 12:24 am

Bitmaps and Sounds files are easily parsed. They are a separate cache-file format from normal maps, meaning both are of the same structure.

The files go as such:

Header:
0x0 -- Cache file identifier/number (For bitmaps, it is 1, for sounds, 2.)
0x4 -- Name array offset (similar to the name array of the index in normal halo maps. All names are terminated with an 8-bit 0x0)
0x8 -- data array offset (offset to the data structure that I will explain further down.)
0xA -- array count (the number of images/sounds/raw data entries in the cache file.)

Data Array:
At the very beginning of the array, there are four zeros:
*key: 0x0 is relative to the array beginning, not file beginning.

0x0 -- zeros
0x4 -- size/length of data (data = image/sound)
0x8 -- offset to data (offset to the data, size/length listed above)
0xA -- second image/sound size/length of data
0xE -- second image/sound offset to data
0x ...And so fourth.

The size/offset pattern will repeat based on the array count from the cache-file header.

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Parsing sounds.map and bitmaps.map

Post by nil » Wed Oct 03, 2012 11:02 am

Modzy wrote: Header:
0x0 -- Cache file identifier/number (For bitmaps, it is 1, for sounds, 2.)
I wish I had known this in the past, but when I asked you long ago how to differentiate between bitmaps and sounds, you didn't really tell me this :|.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Parsing sounds.map and bitmaps.map

Post by Modzy » Wed Oct 03, 2012 11:53 am

nil wrote:
Modzy wrote: Header:
0x0 -- Cache file identifier/number (For bitmaps, it is 1, for sounds, 2.)
I wish I had known this in the past, but when I asked you long ago how to differentiate between bitmaps and sounds, you didn't really tell me this :|.
Don't even remember you asking about those files. Oops. xP

Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: Parsing sounds.map and bitmaps.map and datatypes

Post by Sparky » Fri Oct 12, 2012 4:56 pm

I wonder if you have any suggestions about how to display each datatype. Enum's can use selection lists, Bitmask's can use checkboxes... any fancy ideas for reflexives or structs? If it is similar to Guerilla, I would use indentation and different background color shades to indicate hierarchy of <struct> reflexives. Eschaton uses lots of dropdown lists in it classic view, but I prefer its similarity to Guerilla in the newer scrolling view.

There is a lot of screen space to fill, and this means being able to display values horizontally rather than only listing them vertically in a single column.

At some point, I might convert the table layout for the tag index (metadata editor) to a sectionalized layout with <div> and <span> elements.
Either you are groping for answers, or you are asking God and listening to Jesus.

Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: Parsing sounds.map and bitmaps.map and datatypes

Post by Sparky » Fri Oct 12, 2012 5:03 pm

Since Luigi gave it his best effort in converting his C application to PHP, I wonder if you C-savvy folks could explain in detail to me what this program does:

TXboxAdpcmDecoder C 0.1.3 - http://aluigi.org/papers.htm#xbox

Header File

C File
Either you are groping for answers, or you are asking God and listening to Jesus.

Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests