Tekken 6 XMA by dork at 2:24 PM EDT on April 22, 2016
I'm trying to convert these Tekken 6 XMA files to WAV.

xma_parse keeps giving me this error: skip bits (3500) did not match previous packet overflow (0)
by Vector Harbor at 4:01 PM EDT on April 22, 2016
XMA Converter

edited 4:02 PM EDT April 22, 2016
by dork at 6:23 PM EDT on April 22, 2016
I already have that tool, but the XMAs have to be parsed first, so that doesn't help.

I'm using vgmtoolbox to do this. xmash.exe didn't work, it just hung.
by hcs at 5:07 PM EDT on April 25, 2016
Alpha23's XMA Transform script has a lot of logic for XMA parsing, you might try that.

[edit]
better yet, according to this thread, VGMToolbox can do this for you.

edited 1:07 AM EDT April 26, 2016

Well, anyway, you can parse the files with

xma_test file.xma -o 100 -r out.xma -B

but then you have to do crap with the header and blah.

[edit]

Here's what I did that finally worked:
1. I used the VGMToolbox XMA Converter preset at the end of this post (this one properly does the rebuilding)

2. In the .POS File Maker I used the following settings (there seems to be a space for presets but it is empty when I run it, maybe broken in r1013):
Output File Mask: $B.WAV
Loop Start is at Offset (second radio button): 0xc0 and has size 4 and byte order Big Endian
Loop End
Loop End is at Offset (second radio button): 0xc4 and has size 4 and byte order Big Endian
Compare Loop End to total WAV samples

and ran that on all the .xma with the .wav in the same dir.

It seems to have worked out ok, though I have not checked closely. It does not handle what I think are channels beyond the front 2.

---


<?xml version="1.0" encoding="utf-8"?>
<XmaConverterSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Header>
<FormatName>[XBOX360] Tekken 6</FormatName>
<Author>hcs</Author>
</Header>
<UseXmaParse>true</UseXmaParse>
<XmaParseParameters>
<XmaType>2</XmaType>
<RebuildXma>true</RebuildXma>
<IgnoreXmaParseErrors>false</IgnoreXmaParseErrors>
<UseStaticStartOffset>true</UseStaticStartOffset>
<UseDynamicStartOffset>false</UseDynamicStartOffset>
<SetStartOffsetAfterRiffHeader>false</SetStartOffsetAfterRiffHeader>
<StartOffsetStatic>0x100</StartOffsetStatic>
<UseStaticBlockSize>false</UseStaticBlockSize>
<UseDynamicBlockSize>true</UseDynamicBlockSize>
<BlockSizeStatic>0x1000</BlockSizeStatic>
<BlockSizeOffset>0x14</BlockSizeOffset>
<BlockSizeOffsetSize>4</BlockSizeOffsetSize>
<BlockSizeOffsetEndianess>big</BlockSizeOffsetEndianess>
<UseStaticDataSize>false</UseStaticDataSize>
<UseDynamicDataSize>true</UseDynamicDataSize>
<GetDataSizeFromRiffHeader>false</GetDataSizeFromRiffHeader>
<DataSizeStatic />
<DataSizeOffset>0x14</DataSizeOffset>
<DataSizeOffsetSize>4</DataSizeOffsetSize>
<DataSizeOffsetEndianess>big</DataSizeOffsetEndianess>
</XmaParseParameters>
<AddRiffHeader>true</AddRiffHeader>
<RiffParameters>
<UseStaticFrequency>false</UseStaticFrequency>
<GetFrequencyFromOffset>true</GetFrequencyFromOffset>
<GetFrequencyFromRiffHeader>false</GetFrequencyFromRiffHeader>
<FrequencyOffset>0xc8</FrequencyOffset>
<FrequencyOffsetSize>4</FrequencyOffsetSize>
<FrequencyOffsetEndianess>big</FrequencyOffsetEndianess>
<UseStaticChannels>false</UseStaticChannels>
<GetChannelsFromOffset>true</GetChannelsFromOffset>
<GetChannelsFromRiffHeader>false</GetChannelsFromRiffHeader>
<ChannelOffset>0x0c</ChannelOffset>
<ChannelOffsetSize>4</ChannelOffsetSize>
<ChannelOffsetEndianess>big</ChannelOffsetEndianess>
</RiffParameters>
<CreatePosFile>false</CreatePosFile>
<PosFileParameters>
<UseStaticStartOffset>false</UseStaticStartOffset>
<UseDynamicStartOffset>true</UseDynamicStartOffset>
<StartOffsetStatic />
<StartOffsetOffset>0xc0</StartOffsetOffset>
<StartOffsetOffsetSize>4</StartOffsetOffsetSize>
<StartOffsetOffsetEndianess>big</StartOffsetOffsetEndianess>
<StartOffsetCalculation />
<UseStaticEndOffset>false</UseStaticEndOffset>
<UseDynamicEndOffset>true</UseDynamicEndOffset>
<EndOffsetStatic />
<EndOffsetOffset>0xc4</EndOffsetOffset>
<EndOffsetOffsetSize>4</EndOffsetOffsetSize>
<EndOffsetOffsetEndianess>big</EndOffsetOffsetEndianess>
<EndOffsetCalculation />
</PosFileParameters>
<WavConversionParameters>
<UseXmaEncode>false</UseXmaEncode>
<UseToWav>true</UseToWav>
</WavConversionParameters>
<NotesOrWarnings />
</XmaConverterSettings>

edited 3:21 AM EDT April 26, 2016
by hcs at 3:55 AM EDT on April 26, 2016
To make things easy (for once), here's the decoded audio (key !zV1zMHR4_gF-Lkctj6v_7Lpm0psYCOnZ1v6VssQ4POo ).

As noted, this is only the stereo channels, it looks like VGMToolbox doesn't have a mechanism for dealing with more than one stream per file, so you'd have to run it with different start offsets for each pair of channels (and LFE might be mono), then reinterleave. 0x100 is the stereo pair seen here, 0x900 and 0x1100 are the others.

edited 4:17 AM EDT April 26, 2016
by dork at 5:01 PM EDT on April 26, 2016
Thanks, but how did you figure that all out?

Opening these XMAs in a Hex editor doesn't tell me anything at those offsets.
by hcs at 6:56 PM EDT on April 26, 2016
Let's just say I've been staring at XMA for a long time.
by dork at 10:58 AM EDT on April 27, 2016
Can you tell me then what the channels are for those offsets?

0x100 contains the L and R channels, 0x900 looks like LFE, but I have no idea what 0x1100 is.
by Infernus Animositas at 4:46 PM EDT on April 27, 2016
XMA2 arranges channels in the following order:

Front Left, Front Right, Centre, LFE, Rear Left, Rear Right.

0x100 - Front Left, Front Right
0x900 - Centre and LFE
0x1100 - Rear Left, Rear Right.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source