Previous Page | Next Page
- by hcs at 4:03 AM EST on November 30, 2009
- toWav doesn't have entirely correct support for XMA2 streams, in particular they have trouble with certain phenomena at block boundaries, and xmaencode.exe doesn't seem to support XMA2 at all. Today I added a bunch of functionality to my experimental XMA parser xma_parse (0.4), among which is the ability to rebuild XMA2 streams as plain XMA, making them correctly playable with toWav.
As an example, consider 217 - Keiki Kobayashi - FIRES OF LIBERATION.xma from Ace Combat 6, notable for its skipping when decoded by toWav. (On megaupload courtesy of pietastesgood) We'll call it ace.xma for short.
1. Rebuild the XMA2 stream as plain XMA
xma_test ace.xma -o 800 -b 10000 -d 1401800 -r ace.bin
2. Stick a header on the front (this works)
3. Decode with toWav!
In 1:
-o 800 is the start of the first stream (the front channels, bass is at 1000, and back channels are at 1800)
-b 10000 specifies a block size of 10000 (as specified in the header at 0x2c)
-d 1401800 gives the size of the data chunk (which starts at 0x800, for the other streams at 1000 and 1800 technically we should use -d 1401000 and -d 1400800 since there is less valid data after the start offset)
-r ace.bin says to rebuild to a headerless XMA stream in ace.bin
xma_parse has a few other new features now but I think this one is the most useful.
Note that it doesn't work on all files, for instance 316a - Keiki Kobayashi - ACE COMBAT 6 ENDING THEME ''A BRAND NEW DAY''.xma uses a totally nonstandard layout (interleaved original XMA). I'll try to add support for those later.
[edit]
xma_parse 0.5 with a few fixes and adjustments. It now has a much broader idea of what constitutes an original XMA stream, and this encompasses the Ace Combat 6 Ending Theme, so yay. I had to loosen up the check somewhat, and make some corrections to the stream in order for xmaencode to handle it right (particularly I needed to set sequence numbers, which toWav ignores). There's a -s switch to disable the fixing and perform somewhat stricter checks.
For the AC6 ending (and possibly other tracks in AC6 with the same layout):
xma_test endtheme.xma -1 -o 800 -b 10000 -d 1b81000 -x ace_ending.bin
Note the -1 to indicate that this is original XMA, XMA1 rather than XMA2. Like the other it also has two other streams at 1000 and 1800. Note also the -x, which indicates an extraction rather than a rebuild. This produces a raw XMA stream in ace_ending.bin, which you can combine with the aforementioned header and decode with toWav.
To make a file that works with xmaencode.exe, prepend this header, append a dummy seek table, and correct the RIFF and data chunk sizes. All stuff that should be automated, I suppose.
edited 7:04 AM EST November 30, 2009
- by bcass at 4:43 PM EST on December 4, 2009
- Would anyone mind having a look at this XWB file:
click here
It's the menu music from Mushihimesama Futari on the 360. I've tried all the usual tools (toWAV, unXWB, etc.) but no luck. This tune is missing from the OST CD(s) - this is the only place it can be found.
edited 4:46 PM EST December 4, 2009
- by hcs at 7:57 PM EST on December 4, 2009
- This is stereo big endian 16-bit PCM, you can import it into an audio editor like Audacity starting at offset 0xAC = 172.
- by bcass at 1:38 AM EST on December 5, 2009
- Excellent, thanks for that.
edited 2:07 AM EST December 5, 2009
- by bcass at 5:18 PM EST on December 8, 2009
- Any chance you could help me find the settings for this next rip hcs? It's Pac-Man C.E. (XBLA - XWB):
click here
You'll need to use unXWB to extract all the files (toWAV wouldn't extract them all). Or, maybe that's the problem (unXWB isn't extracting the files properly)?
- by hcs at 8:41 PM EST on December 8, 2009
- Run unxwb -l (lowercase L), it will tell you the properties of each stream. The important thing is channel count.
If you use unXWB -R it will just export the streams. You can run the multi-stream ones (those with > 2 channels) through xma_parse like so:
4 channels:
xma_parse in.dat -b 10000 -r out1
xma_parse in.dat -o 800 -b 10000 -r out2
6 channels:
xma_parse in.dat -b 10000 -r out1
xma_parse in.dat -o 800 -b 10000 -r out2
xma_parse in.dat -o 1000 -b 10000 -r out3
Then attach the appropriate header to each. The 1 and 2 channel ones you can just attach a mono or stereo header to directly.
Only 26, 27, and 28 are actually music, though.
edited 8:42 PM EST December 8, 2009
- by bcass at 10:23 PM EST on December 8, 2009
- Thanks for the info. Do you have header files for 4 and 6 channel XMA files? Also, once the header has been prepended to the files, how do I convert the resulting files to single-file multichannel PCM/WAV?
edited 1:24 AM EST December 9, 2009
- by hcs at 11:39 AM EST on December 9, 2009
- I don't know of a header that works for 4 and 6 channel files. The commands I gave you will extract the 2 channel streams (out1, out2, sometimes out3) which you can use with an ordinary stereo header.
- by bxaimc at 2:16 PM EST on December 21, 2009
- Using hcs' xma parser to help me in trying to figure out the xma from Tekken 6, I've rebuilt the stream as XMA1 because ToWav sucked in decoding the original XMA2. Here are the results:
Original File: Tekkek 6 - 0001.xma
Decoded Wav: Tekken 6 (x360) - 0001.wav
It's nice that Namco decided to use XMA but then made it even better by making a custom header for these. Oh joy =/
- XMA looping points by Link0x at 3:26 PM EST on January 3, 2010
- Well.. what I wondered.. I realize the XMA format is pretty difficult to decode thus no XMA support for in_vgmstream.. what I wonder though.. XMA files contain looping points.. and in_vgmstream supports logg files.. would it be possible to extract the looping points from an XMA file.. to convert a file to WAV, then to OGG and attach the looping information to it?
If yes: where in the header or where else is the actual looping information stored?
Previous Page | Next Page
Go to Page 0 1 2 3 4 5 6 7 8 9 10 11
Search this thread
Show all threads
Reply to this thread:
HCS Forum Index
Halley's Comet Software
forum source