News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Mega Man 8, X4-6 (PSX) Data Archive Unpacker/Repacker  (Read 3667 times)

DarkSamus993

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
Mega Man 8, X4-6 (PSX) Data Archive Unpacker/Repacker
« on: April 16, 2016, 08:57:53 pm »
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 bytes
Blue = ARC file count
Purple = ARC file size
Red = I haven't figured out what this is for yet.
Green = Individual file sizes

NOTE: 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.
« Last Edit: April 17, 2016, 03:49:24 pm by DarkSamus993 »

acediez

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Mega Man 8, X4-6 (PSX) Data Archive Unpacker/Repacker
« Reply #1 on: April 17, 2016, 08:57:47 pm »
Sadly I don't know anything that could help, but I wanted to say how excited I am for the possibilities that having such tool will open  :woot!:
Thank you so much for being working on this!