This is too good to be true! THANKS A HUGE BUNCH HCS - YOU'RE OUR MAN!!! :) :) :)
And BTW, the tool-collection OrangeC provided on Xentax can be used rather nicely to transform these files step by step. To make it even easier, I've rewritten the batch files into one single file. Below are links to all programs and both the bms and batch script!
However, it's not working properly with the BF:BC radio files! The end is cut - looks like at least a whole minute is missing! Maybe you have another idea, HCS?Here's one of the res files:
http://www.filefront.com/15936297/US_ra ... taSns_1.7zPrograms(extract all files into the folder you want to decode *.res files in):
01. ea_multi_xma:
http://hcs64.com/files/ea_multi_xma02.zip (if version has changed:
http://hcs64.com/vgm_ripping.html)
02. xma_parse:
http://hcs64.com/files/xma_parse08.zip (if version has changed:
http://hcs64.com/vgm_ripping.html)
03. quickbms:
http://aluigi.altervista.org/papers.htm#quickbms04. toWAV:
http://www.ctpax-x.ru/index.php?goto=files&down=24Scripts and batches05. addXMARIFFheader.bms (save text file as "addXMARIFFheader.bms"):
Code:
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\x80\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\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
06. the batch file to directly decode all *.res in one folder (save text file as .bat file):
Code:
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
Of course if you want to keep the XMA files (for backup reasons for example), just delete the last batch line.
If nothing happens...... you probably got the offset in the above batch file wrong (first line). Try decoding after successively adding 8 bytes (0x04, 0x08, 0x0C, 0x10, 0x14, 0x18...)
Changing the sample rate and channels in the xmaRIFF headerSample rate: Change the bytes at 0x24 of the data that's written to the memory file. It's the code "\x80\xbb" above (23rd and 24th place from the end). These are the most common sample rates:
48.000 Hz: \x80\xbb
44.100 Hz: \x44\xac
32.000 Hz: \x00\x7d
22.050 Hz: \x22\x56
16.000 Hz: \x80\x3e
Channels: 11th place from the end "\x02" = stereo, "\x01" = mono.