First, I'm fairly new to this but I've been able to do some extracting. I was able to extract the 360 version Bad Company's 2 sound effects using tools posted on hcs64.com and a well explained post on a battlefield mod forum. So I'm familiar with the tools and the code on how to extract and convert. However for kicks and giggles I wanted to extract the sound effects from the first bad company.
I did my research and found the method was not that different. Except I can't get any .res files to convert and I don't know what I'm doing wrong. At first I thought it was simply the wrong offset, so I went into HxD to search for the offset. In Bad Company 2 you could figure it out by finding the hex value 48 00 00 0C, but none of the .res files for bad company 1 have that hex value.
These are the codes I used:
Code: Select all
for %%i in (*.res) do "%CD%\ea_multi_xma.exe" %%i -o 0x00 ren *.res_stream1 *.str for %%i in (*.str) do "%CD%\xma_test.exe" %%i -1 -r %%~ni.xm del *.str for %%i in (*.xm) DO "%CD%\quickbms.exe" -o "%CD%\addXMARIFFHeader.bms" %%i "%CD%" del *.xm @towav.exe *.xma del *.xma
Code: Select all
# add a XMA stereo RIFF header to any headerless file set MEMORY_FILE binary "\x52\x49\x46\x46\xb8\x59\xa7\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x20\x00\x00\x00\x65\x01\x10\x00\xd6\x10\x00\x00\x01\x00\x00\x03\xe3\x9a\x00\x00\x44\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x64\x61\x74\x61\x00\x58\xa7\x00" get NAME basename get SIZE asize string NAME += ".xma" append log MEMORY_FILE 0 SIZE append math SIZE += 60 log NAME 0 SIZE MEMORY_FILE
No dice, (pun not intended) the process doesn't produce a .wav file. If I use quickbms and load up the xmaRIFF header I get a .xma from the .res but towav just spits out a garbled mess no matter what I do.
What am I doing wrong, does the .res files for BC1 have the hex 48 00 00 0C, or is there another value that I need to look for, or is the code or the method wrong? Or is it just my copy of BC1 doesn't support the method posted.
If a sample is needed I can upload one if anyone is grateful enough to help me out. Thanks.