Re: The Wonderful 101 [WWise, WEM]
Posted: Sat May 02, 2015 1:48 pm
Well, i've made a script. First of all you need to interleave files with ima_rejigger, then run this script to get playable .wav. Didn't work with music from your archieve, only with voices, don't know why (maybe because of 6 channels?).
Code: Select all
endian big
goto 0x16
get CHANNELS short
reverseshort CHANNELS
get FREQ long
reverselong FREQ
get BPS long
reverselong BPS
get UNK1 short
reverseshort UNK1
get UNK2 short
reverseshort UNK2
goto 0xC
do
getDstring CHUNK_NAME 4
get DATA_SIZE long
savepos DATA_OFFSET
getDstring DUMMY DATA_SIZE
while CHUNK_NAME != "data"
set FULLSIZE long 0x30
math FULLSIZE += DATA_SIZE
reverselong DATA_SIZE
set RIFF_SIZE long FULLSIZE
math RIFF_SIZE -= 0x8
reverselong RIFF_SIZE
log MEMORY_FILE 0 0
set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x14\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x41\x00\x64\x61\x74\x61\x00\x00\x00\x00"
putVarChr MEMORY_FILE 4 RIFF_SIZE long
putVarChr MEMORY_FILE 22 CHANNELS short
putVarChr MEMORY_FILE 24 FREQ long
putVarChr MEMORY_FILE 28 BPS long
putVarChr MEMORY_FILE 32 UNK1 short
putVarChr MEMORY_FILE 34 UNK2 short
putVarChr MEMORY_FILE 44 DATA_SIZE long
append
reverselong DATA_SIZE
log MEMORY_FILE DATA_OFFSET DATA_SIZE
get NAME basename
string NAME += ".wav"
log NAME 0 FULLSIZE MEMORY_FILE