Page 1 of 1

Valve XWV

Posted: Thu Sep 02, 2010 11:17 pm
by Omnicoder
Been working on the sound files from Valve's 360 games.

Here's what I got so far:

Code: Select all

DWORD id = 1482118688 "XWV " (Xbox Wave (Little Endian) or Valve Wave Xbox (Big Endian))
DWORD magic1 = 4
DWORD magic2 = 48
DWORD magic3 = (known values 156, 172, 192, 324) increases with file size
DWORD magic4 = 2048 (header size?)
DWORD magic5 = (filesize - magic4)
DWORD magic6 = (kv 268288, 204288, 243200, 471040) proportionally increases with file size (double file size doubles this)
DWORD magic7 = -1
DWORD magic8 = 0
DWORD magic9 = 16
DWORD magic10 = 17826305
DWORD magic11 = 1258356736
DWORD magic12 = (known values 6144, 7680, 5632, 2 files of vastly different sizes both had 7680)
DWORD magic13 = (kv 14848, 13312, 13824) (2 files of different sizes both had 13312, bigger files have had smaller numbers)
DWORD magic14 = (kv 20992, 19968)
<more magics, always seem to be similar between files and slightly bigger in bigger files>

At offset of magic4: Always "<" 
I'm assuming its somehow related to the WAV file format but haven't really noticed any correlation.
Pretty much shooting in the dark here so any help would be appreciated.

Example file

Re: Valve XWV

Posted: Fri Sep 03, 2010 6:37 am
by Apollo
I'd say its good bet its XMA and seemingly some blocking/filler in the data. No sign of sample rate values in quick look, possibly held elsewhere or defined differently.

Re: Valve XWV

Posted: Fri Sep 03, 2010 2:01 pm
by Liandril
Omnicoder wrote:Been working on the sound files from Valve's 360 games.

Here's what I got so far:

Code: Select all

DWORD id = 1482118688 "XWV " (Xbox Wave (Little Endian) or Valve Wave Xbox (Big Endian))
DWORD magic1 = 4
DWORD magic2 = 48
DWORD magic3 = (known values 156, 172, 192, 324) increases with file size
DWORD magic4 = 2048 (header size?)
DWORD magic5 = (filesize - magic4)
DWORD magic6 = (kv 268288, 204288, 243200, 471040) proportionally increases with file size (double file size doubles this)
DWORD magic7 = -1
DWORD magic8 = 0
DWORD magic9 = 16
DWORD magic10 = 17826305
DWORD magic11 = 1258356736
DWORD magic12 = (known values 6144, 7680, 5632, 2 files of vastly different sizes both had 7680)
DWORD magic13 = (kv 14848, 13312, 13824) (2 files of different sizes both had 13312, bigger files have had smaller numbers)
DWORD magic14 = (kv 20992, 19968)
<more magics, always seem to be similar between files and slightly bigger in bigger files>
One thing I noticed: the file seems to be divided into blocks of 2048 B size. Not only the header has 2048=0x800 B:
from 0x800-0x1000 is (I assume) the 1st data packet (the end is "padded" with 0xff Bytes),
from 0x100-0x1800 is then the 2nd data packet (again: filled up with 0xff bytes at the end) .... and so on.
So you have a data size of (magic5=)94208=2048 * 46. If this is correct, then the sample file has 46 data packets
And if you look at the DWORDS from 0x30(magic12) to 0xe8, then you have there 46 (similar and 'accumulative' looking) entries... so one entry for each of the 46 data packets.

This strongly reminds me of the DPDS-Chunk from the xWMA-Format: there you have as well ONE DWORD for each data packet... each entry describes the buffer size needed for the according data packet in an accumulative way. I.e. entry0=size needed for decompressed data packet 0(in the example: 0x2a00), entry1=size needed for decompressed data packets 0 AND 1 ( in the example: 0x4400) and so on.

If this assumption is correct, then the last entry (at Pos. 0xe8) should contain the size of the whole decompressed data of the file... in case of the sample file, this would be 0x3fc00=261120 Byte.... but that's just an assumption :D
BTW: at Pos 0x18 (magic6) you have the same value: 0x3fc00=261120 ... so magic6 would be the size of the decompressed data of the file.

Re: Valve XWV

Posted: Fri Jan 14, 2011 4:05 pm
by Gromber
Hi, good work, i wanted to add spanish voices from pc to 360, but i cant do it because i dont know how to work with this audio and to repack the *.360.zip

Re: Valve XWV

Posted: Wed Jan 04, 2012 9:25 pm
by Gromber

Re: Valve XWV

Posted: Thu Mar 01, 2012 7:31 pm
by Gromber
Any progress?

Re: Valve XWV

Posted: Sat May 19, 2012 7:17 pm
by Gromber
Gromber wrote:Any progress?
someone interested in add pc voices to 360 english version?

Re: Valve XWV

Posted: Thu Oct 11, 2012 7:53 pm
by Gromber
I can convert valve XWB to xma to use with towav thanks to XMA transform script, but now i want to know how convert xma created from .wav with xma2encode to XWB to try to test in the console.

Thanks

Re: Valve XWV

Posted: Thu Dec 20, 2012 9:22 pm
by Gromber
any idea?

Re: Valve XWV

Posted: Fri Feb 01, 2013 8:28 pm
by Gromber
Gromber wrote:any idea?
[bruce]