The Evil Within - uses headerless msadpcm. Follow the script instructions to get playable wav adpcm files (.streamed and .tangoresource can be unpacked with aluigi's script).
Code: Select all
# The Evil Within adpcm script (PC)
# Put .bsnd (extracted from .tangoresource) and .msadpcm (extracted from .streamed) files in the same dir and use .bsnd as input
# Written by spider91
# script for QuickBMS http://quickbms.aluigi.org
idstring "bsnf"
get BSND_NAME FILENAME
get WAV_NAME BASENAME
string WAV_NAME -= "_msadpcm"
string WAV_NAME += ".msadpcm"
open FDSE BSND_NAME 0
open FDSE WAV_NAME 1
get RIFFSIZE ASIZE 1
math RIFFSIZE += 70
set FMTSIZE long 50
get DATA_SIZE ASIZE 1
Goto -50 0
get CODEC_ID short
get CHANNELS short
get FREQUENCY long
get BPS long
get ALIGN short
get UNKNOWN1 long
get UNKNOWN2 long
get UNKNOWN3 long
get UNKNOWN4 long
get UNKNOWN5 long
get UNKNOWN6 long
get UNKNOWN7 long
get UNKNOWN8 long
get UNKNOWN9 long
putVarChr MEMORY_FILE 78 0
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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
putVarChr MEMORY_FILE 4 RIFFSIZE long
putVarChr MEMORY_FILE 16 FMTSIZE long
putVarChr MEMORY_FILE 20 CODEC_ID short
putVarChr MEMORY_FILE 22 CHANNELS short
putVarChr MEMORY_FILE 24 FREQUENCY long
putVarChr MEMORY_FILE 28 BPS long
putVarChr MEMORY_FILE 32 ALIGN short
putVarChr MEMORY_FILE 34 UNKNOWN1 long
putVarChr MEMORY_FILE 38 UNKNOWN2 long
putVarChr MEMORY_FILE 42 UNKNOWN3 long
putVarChr MEMORY_FILE 46 UNKNOWN4 long
putVarChr MEMORY_FILE 50 UNKNOWN5 long
putVarChr MEMORY_FILE 54 UNKNOWN6 long
putVarChr MEMORY_FILE 58 UNKNOWN7 long
putVarChr MEMORY_FILE 62 UNKNOWN8 long
putVarChr MEMORY_FILE 66 UNKNOWN9 long
putVarChr MEMORY_FILE 74 DATA_SIZE long
append
log MEMORY_FILE 0 DATA_SIZE 1
get NAME BASENAME
string NAME -= "_msadpcm"
string NAME += ".wav"
set FULLSIZE long RIFFSIZE
math FULLSIZE += 8
log NAME 0 FULLSIZE MEMORY_FILE
Wolfenstein: New Order - uses ogg vorbis with headers. Flenames are splitted in *.index files, so to get sound files with names just put quickbms.exe, wtno_snd.txt (the script below) and the batch files with this line
Code: Select all
for %%i in (*.index) do quickbms -Y wtno_snd.txt %%i unpacked_sounds
into Wolfenstein.The.New.Order\base directory and run batch file. If you want to extract main sounds or specific language voices just remove # before open commad with respective sound archieve and add it to other lines at the beginning of the script.
Code: Select all
#open FDSE streamed.resources 1 MAIN_SOUND
open FDSE english.streamed 2 ENG_SOUND
#open FDSE french.streamed 3 FRA_SOUND
#open FDSE italian.streamed 4 ITA_SOUND
#open FDSE spanish.streamed 5 SPA_SOUND
endian big
goto 0x24
get files long
get unk long
math TMP = files
math TMP - 1
for i = 0 < files
endian little
get FNsize1 long
getdstring FN1 FNsize1
get FNsize2 long
getdstring FN2 FNsize2
get namesize long
getdstring name namesize
endian big
get offset long
get size long
get zsize long
get unksize long
string FN2 -= ".wav"
string FN2 += ".ogg"
if unksize = 1
savepos pos
math pos += 0x10
goto pos
get offset long
get size long
if MAIN_SOUND = 1
log FN2 offset size 1
endif
elif unksize = 4
savepos pos
math pos += 0x10
goto pos
get offset long
get size long
if ENG_SOUND = 1
log FN2 offset size 2
endif
savepos pos
math pos += 0x10
goto pos
get offset long
get size long
if FRA_SOUND = 1
log FN2 offset size 3
endif
savepos pos
math pos += 0x10
goto pos
get offset long
get size long
if ITA_SOUND = 1
log FN2 offset size 4
endif
savepos pos
math pos += 0x10
goto pos
get offset long
get size long
if SPA_SOUND = 1
log FN2 offset size 5
endif
else
math unksize *= 0x18
getdstring unkdata unksize
endif
savepos pos
math pos += 0x5
goto pos
if i != TMP
get filenumber long
endif
next i
Rage - uses headerless wav adpcm. Filenames are stored into gameresources.resources. To unpack headerless .msadpcm files use sript below. You can choose betwen main sounds and specific language voices at the beginning of the script (just like in Wolfenstein TNO).
Code: Select all
#open FDSE streamed.resources 1 MAIN_SOUND
open FDSE english.streamed 2 ENG_SOUND
#open FDSE french.streamed 3 FRA_SOUND
#open FDSE italian.streamed 4 ITA_SOUND
#open FDSE german.streamed 5 GER_SOUND
#open FDSE spanish.streamed 6 SPA_SOUND
#open FDSE russian.streamed 7 RUS_SOUND
#open FDSE japanese.streamed 8 JAP_SOUND
endian big
get DUMMY long
get FOFFSET long
goto FOFFSET
get FILES long
for i = 0 < FILES
endian little
get FILENUM long
get STRLEN long
getdstring BLOCKNAME STRLEN
get STRLEN long
getdstring VALUE1 STRLEN
get STRLEN long
getdstring VALUE2 STRLEN
endian big
get OFFSET long
get SIZE long
get ZSIZE long
get EXTRA long
string VALUE1 -= ".wav"
string VALUE1 += ".msadpcm"
if EXTRA = 1
savePOS POS
math POS += 0x10
goto POS
get OFFSET long
get SIZE long
if MAIN_SOUND = 1
log VALUE1 OFFSET SIZE 1
endif
elif EXTRA = 7
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if ENG_SOUND = 1
log VALUE1 OFFSET SIZE 2
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if FRA_SOUND = 1
log VALUE1 OFFSET SIZE 3
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if ITA_SOUND = 1
log VALUE1 OFFSET SIZE 4
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if GER_SOUND = 1
log VALUE1 OFFSET SIZE 5
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if SPA_SOUND = 1
log VALUE1 OFFSET SIZE 6
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if RUS_SOUND = 1
log VALUE1 OFFSET SIZE 7
endif
savePOS POS
math POS += 0x10
goto POS
get offset long
get SIZE long
if JAP_SOUND = 1
log VALUE1 OFFSET SIZE 8
endif
else
math EXTRA *= 0x18
getdstring EXTRADATA EXTRA
endif
savePOS POS
math POS += 0x14
goto POS
next i
get SIZE asize
savePOS POS
if POS != SIZE
print "!! other footer data here !!"
endif
print "Completed!!"
To get playable wav adpcm (restore headers) put .idmsa (you can unpack them from gameresources.resources with this script) and .msadpcm files with the same name in same directory and use this script (same thing with main sounds and language voices at the beginning of the script).
Code: Select all
#set SHIFT 0x52 # main sounds
set SHIFT 0xE2 # english sounds
#set SHIFT 0x145 # french sounds
#set SHIFT 0x1A8 # italian sounds
#set SHIFT 0x20B # german sounds
#set SHIFT 0x26E # spanish sounds
#set SHIFT 0x2D1 # russian sounds
#set SHIFT 0x334 # japanese sounds
open FDDE idmsa 0
open FDDE msadpcm 1
idstring "mzrt"
get RIFFSIZE ASIZE 1
math RIFFSIZE += 70
set FMTSIZE long 50
get DATA_SIZE ASIZE 1
Goto SHIFT 0
get CODEC_ID short
get CHANNELS short
get FREQUENCY long
get BPS long
get ALIGN short
get UNKNOWN1 long
get UNKNOWN2 long
get UNKNOWN3 long
get UNKNOWN4 long
get UNKNOWN5 long
get UNKNOWN6 long
get UNKNOWN7 long
get UNKNOWN8 long
get UNKNOWN9 long
putVarChr MEMORY_FILE 78 0
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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"
putVarChr MEMORY_FILE 4 RIFFSIZE long
putVarChr MEMORY_FILE 16 FMTSIZE long
putVarChr MEMORY_FILE 20 CODEC_ID short
putVarChr MEMORY_FILE 22 CHANNELS short
putVarChr MEMORY_FILE 24 FREQUENCY long
putVarChr MEMORY_FILE 28 BPS long
putVarChr MEMORY_FILE 32 ALIGN short
putVarChr MEMORY_FILE 34 UNKNOWN1 long
putVarChr MEMORY_FILE 38 UNKNOWN2 long
putVarChr MEMORY_FILE 42 UNKNOWN3 long
putVarChr MEMORY_FILE 46 UNKNOWN4 long
putVarChr MEMORY_FILE 50 UNKNOWN5 long
putVarChr MEMORY_FILE 54 UNKNOWN6 long
putVarChr MEMORY_FILE 58 UNKNOWN7 long
putVarChr MEMORY_FILE 62 UNKNOWN8 long
putVarChr MEMORY_FILE 66 UNKNOWN9 long
putVarChr MEMORY_FILE 74 DATA_SIZE long
append
log MEMORY_FILE 0 DATA_SIZE 1
append
get NAME BASENAME
string NAME += ".wav"
set FULLSIZE long RIFFSIZE
math FULLSIZE += 8
log NAME 0 FULLSIZE MEMORY_FILE