Donald Duck Quack Attack/Goin Quackers [Gamecube] SM3

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Donald Duck Quack Attack/Goin Quackers [Gamecube] SM3

Post by Warthog1336 »

Hi! I need a script for unpacking the streams inside that big SM3 archive which seems to contain all the sounds from the game.

Actually, there are three files in the "sound" directory: GAMESND.SP3, MAPS.SM3 & STRM.SM3

While STRM.SM3 contains all the data, I think MAPS.SM3 has the references for the files (I think, because the format seems a bit complex)

Streams may use the DSP codec.

Samples: GC

Thanks!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Donald Duck Quack Attack/Goin Quackers [Gamecube] SM3

Post by aluigi »

The format of MAPS is quite boring but I noticed that in STRM.SM3 there are many patterns with the bytes 02 b3 56 01 that may be used to dump the various streams without any knowledge.
It's lame but if nobody else comes with a solution... :)

Code: Select all

findloc OFFSET binary "\x02\xb3\x56\x01"
do
    goto OFFSET
    get DUMMY long
    findloc NEXT_OFFSET binary "\x02\xb3\x56\x01" 0 ""
    if NEXT_OFFSET == ""
        get SIZE asize
    else
        math SIZE = NEXT_OFFSET
    endif
    math SIZE -= OFFSET
    log "" OFFSET SIZE
    math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""

MAPS.S3M has GC DSP data in it while the one is STRM.S3M is something else.
Warthog1336
Posts: 140
Joined: Mon Feb 05, 2018 5:45 pm

Re: Donald Duck Quack Attack/Goin Quackers [Gamecube] SM3

Post by Warthog1336 »

Thanks for helping me.

Bnnm said MAPS is divided into sections, with each section being similar to Ubi's SBx format. (https://github.com/kode54/vgmstream/blo ... a/ubi_sb.c)

Infos about Ubi MAP:
Ubi MAP (.sm0..7): database format similar to Ubi BANK
base header, points to sections (ex. a level with all of its sounds and music)
0x00: version
0x04: section size
0x08: entries
rest is padding inside size (can be blank, 0x0c, etc)>
for each entry: 0x30 (varies with version)
0x00: unk (0=audio, 1=config?)
0x04: null
0x08: absolute offset to header
0x0c: size of header
0x10: name (null terminated and with garbage) (size 0x20)
section header ex 026BACA0 0000BA60
0x00: null?
0x04: section1 offset
0x08: section1 num
0x0c: section2 offset
0x10: section2 num
0x14: entries size?
0x18: section3 entries?
0x18: section3 size?
0x1c: extra section offset
0x20: extra section size
subsection1, ex size 0x40 (varies with version)
subsection2, ex size 0x68, similar to sbx header portion
Example version/games
00000003: Disney's Donald Duck - Goin' Quackers (GC) [2000]

I hope this was useful.

Thank you.