So I've been thoroughly examining how Capcom packed the data for MM8 & MMX4-6 and decided I wanted to write a tool for unpacking/repacking that data. With BioFat no longer supporting MM8 & MMX4-6 archive unpacking (and the fact it wasn't completely accurate when it did support it), I guess it's about time we got a new utility.NOTE:
I should point out that MM8 & MMX4-6 use the same data structure (though MMX5-6 have their archive files concatenated together into one DAT file).
Examining the data archives shows they all start with a similar type of structure. It turns out this is a header, and contains the important information needed to split the archives. So let's take a look at LOAD_U.ARC from MMX4 as an example:Header
= 0x800 bytesBlue
= ARC file countPurple
= ARC file sizeRed
= I haven't figured out what this is for yet.Green
= Individual file sizesNOTE:
Remember to read as little endian!
From this we get that LOAD_U.ARC:
- contains 3 files.
- is 0x18800 in length.
- File #1 is 0x8000 in length.
- File #2 is 0x8000 in length.
- File #3 is 0x8000 in length.
There is no padding between the files in this example, but some archives do contain padding (yet another thing to take into consideration). So, once I figure out how it handles padding as well as what the red section is for in the header, I should be all set to program this thing. If anyone has some insight on what's going on with these issues, I'm all ears.EDIT:
Okay, the padding is actually quite simple. Each file must be divisible by 0x800 bytes. If it's not, the file is padded with 0's until it is. I still have no clue what the red section in the header is for, but it looks like that information won't be necessary to what I'm trying to accomplish.