Shrek the Third/Superslam *Sound.dat/hdr (Multiplatform)

Codecs, formats, encoding/decoding of game audio, video and music
JackTheRipper
Posts: 51
Joined: Mon Jan 10, 2022 12:12 am

Shrek the Third/Superslam *Sound.dat/hdr (Multiplatform)

Post by JackTheRipper »

This format was seen in SEGA Soccer Slam, some Black Box devs made an unusual format.
Speaking of Soccer Slam, it is packed in DATA.BIN/DIR on PS2
Microsoft Xbox is XboxSound.dat/hdr, it uses RIFF IMA (0x69)
Microsoft Xbox 360 is XenonSound.dat/hdr, it uses RIFF XMA
Nintendo GameCube is GCSound.dat/hdr, it uses GCub header
Nintendo Wii is WiiSound.dat/hdr, it is the same as Gamecube
Sony PlayStation 2 is PS2Sound.dat/hdr, it uses VAG
Windows is PCSound.dat/hdr, it uses OGG vorbis

WiiSound.dat
WiiSound.hdr

Shrek 3 uses 0x1 subinterleave, sample rate is at 0x8 32-bit BE, channels is at 0x4 32-bit BE, datasize is at 0xc 32-bit BE, possible left coef is at 0x10, possible right coef is at 0x30, data start at 0x60.
Last edited by JackTheRipper on Sat Sep 03, 2022 2:11 am, edited 4 times in total.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Shrek the Third/Superslam *Sound.dat/hdr (Multiplatform)

Post by AlphaTwentyThree »

Well, the hdr file doesn't contain any useful information as everything needed is already in the .dat archive. There's no TOC, so I wrote a scanner that automatically gets the file names in the process. The thing is that the output format isn't recognized correctly by vgmstream so maybe an update is in order there. I don't have any stereo .dsp files at hand otherwise I'd write a converter.
Anyway, here's the script for extraction. All files with the same name are byte-identical duplicates, I checked beforehand. The script first runs through the whole file to create a TOC so it will first look as if nothing is happening.

Code: Select all

# SEGA Soccer Slam (Wii)
# WiiSound.dat - GCub extractor

# (c) 2022-01-20 by AlphaTwentyThree of Zenhax
# script for QuickBMS http://quickbms.aluigi.org

set SEARCH 0
for i = 1
   goto SEARCH
   FindLoc GO string "GCub" 0 ""
   if GO == ""
      break
   endif
   xmath OFFSET "GO - 0x70"
   goto OFFSET
   FindLoc OFFSET string "\x0\x0\x0\x4" 0 ""
   xmath NPOS "OFFSET + 0x10"
   goto NPOS
   get NAME string
   putArray 0 i GO
   putArray 1 i NAME
   xmath SEARCH "GO + 4"
next i
xmath FILES "i - 1"
for i = 1 <= FILES
   xmath k "i + 1"
   getArray OFFSET 0 i
   getArray NAME 1 i
   if i != FILES
      getArray SIZE 0 k
   else
      get SIZE asize
   endif
   math SIZE -= OFFSET
   string NAME += ".gcub"
   if SIZE != 0
      log NAME OFFSET SIZE
   endif
next i