[Mostly Solved] Help with further decompression on Mario Party 6 files

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Freakanoid
Posts: 5
Joined: Sat Sep 09, 2017 7:27 pm

[Mostly Solved] Help with further decompression on Mario Party 6 files

Post by Freakanoid »

UPDATE: Mostly figured it out, check the first reply for the script

Hi all,
Firstly I'd like to apologize in advance for making another Mario Party 6 thread :P

Using the currently available script for Mario Party 6, .bin files can be decompressed no problem. However, I've found that two of the files from w01.bin look to be compressed themselves. After using the comtype_scan2 script on the first of these files (00000000.dat), I've found that LZSS and some of its variants put out something that is partially correct to what I've found in the game's memory:

Image
Though the further you get in the file, the less and less it seems to match.
Ideally, I'd love for a way to get this decompressed "correctly" into what you see on the right, if possible.

Some context on this file: it contains the amount of, the type of, and the location of the spaces on the playing board, among other things about individual spaces. I'm not sure whether it contains data related to anything else.

Strangely, the length of the "decompressed" file in memory is hardly any bigger than the original 00000000.dat itself. In fact, if you cut off the last 34 or so bytes, they'd share the exact same length.

TL;DR: I've got a file that's compressed, a file of what I believe it looks like decompressed, and I'm trying to figure out how to get from the former to the latter (and hopefully back again)

I've attached the original 00000000.dat, the partially correct lzss0 decompression, and the relevant snippet of memory from Dolphin's memory dump feature. The w01.bin where I got the 00000000.dat from can be found in the OP of my original Mario Party 6 thread here.

Any tips or ideas would be greatly appreciated! Just let me know if you'd like any more files from me.
Last edited by Freakanoid on Fri Jun 28, 2019 1:47 am, edited 2 times in total.
Freakanoid
Posts: 5
Joined: Sat Sep 09, 2017 7:27 pm

Re: Help with further decompression on Mario Party 6 files

Post by Freakanoid »

Sorry to double post, but I think I actually managed to get it by tinkering with the lzss variables:

Code: Select all

comtype lzss "10 6 2 2 0"
get ZSIZE asize
get NAME basename
clog NAME 0 ZSIZE ZSIZE

For now I'm decompressing to the same size as the compressed file. I'll update this post if I find anything else out.

EDIT: recompressing to the same size leaves quite a bit of empty space...I'm guessing this file probably contains multiple files within it, or more info than I previously thought. However, I can copy paste this back into the original .dat using the same offsets, and it works just fine, even with modifications. I'm satisfied with this for now, but once again, I'll edit this post if I find anything else out.
lemurboy12
Posts: 265
Joined: Fri Oct 17, 2014 2:57 am

Re: [Mostly Solved] Help with further decompression on Mario Party 6 files

Post by lemurboy12 »

While you're at it, you think you could look at the compression in Mario Party 4?
https://puu.sh/DMu5B.zip
Freakanoid
Posts: 5
Joined: Sat Sep 09, 2017 7:27 pm

Re: [Mostly Solved] Help with further decompression on Mario Party 6 files

Post by Freakanoid »

lemurboy12 wrote:While you're at it, you think you could look at the compression in Mario Party 4?
https://puu.sh/DMu5B.zip

Sure, I can't promise anything but I'll definitely take a look at em.
Do you know which .bin these are extracted from?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Mostly Solved] Help with further decompression on Mario Party 6 files

Post by aluigi »

As far as I can see from the script, the files are compressed with zlib, why here some files use lzss?