Mario Party DS Archives

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
gamemasterplc
Posts: 2
Joined: Mon Nov 20, 2017 3:36 pm

Mario Party DS Archives

Post by gamemasterplc »

Can someone write a script to extract the attached file. Compressed sub-files are marked by a 0x10 beginning the sub-file which are compressed with LZ10.
The first 4 bytes in little endian describes the number of sub-files in the file. Each sub-file is marked by an offset-4 and length in little endian.
There are no names in the archives either. I have been able to extract the sub-files manually using a hex editor.
leovoel
Posts: 12
Joined: Thu Apr 05, 2018 7:08 am

Re: Mario Party DS Archives

Post by leovoel »

this?

Code: Select all

comtype lz77wii
get FILE_COUNT long
for I = 0 < FILE_COUNT
    get OFFSET long
    math OFFSET + 4
    get ZSIZE long
    savepos NEXT_FILE
    goto OFFSET
    get MAGIC byte
    get SIZE threebyte
    if MAGIC == 0x10
        string NAME P "%OFFSET|x%.decompressed"
        clog NAME OFFSET ZSIZE SIZE
    else
        string NAME P "%OFFSET|x%.dat"
        log NAME OFFSET ZSIZE
    endif
    goto NEXT_FILE
next I
Gota7
Posts: 1
Joined: Sat Sep 01, 2018 8:33 pm

Re: Mario Party DS Archives

Post by Gota7 »

Here's a program that should do it.
Attached is the program and source code.
Note: Requires lzss.exe.
gamemasterplc
Posts: 2
Joined: Mon Nov 20, 2017 3:36 pm

Re: Mario Party DS Archives

Post by gamemasterplc »

https://www.romhacking.net/utilities/826/ contains the required lzss.exe you need to download for gota's program which you can use as a standalone alternative to the BMS script.