Sounds like fun =D I might join in unpacking it for the ride....Sure would make a decent start into unpacking tutorial writing. :)
But seriously, they should have used something like ASProtect SKE to pack it. That can sure be a bitch to unpack manually sometimes, especially when the dev decides to use crypt markers.
Cool, that would've saved me some time manually importing some crap. Might yet come in handy. Mini-status report: I'm making my way slowly through the format recognition and loading routines, want to see how everything is set up before attacking the decoder itself.
a) it is something, but I already have it b) what game was it? This format is just raw XMA, will be easy to handle when we can decode it at all.
edited 8:12 PM EDT April 22, 2009
Header by OrangeC at 9:48 PM EDT on April 22, 2009
The tool does not support headerless XMA, the XMA you posted was headerless, i have decoded this file with this custome FSB container header.
Add this at the beginning of the first couple bytes.
http://www.zshare.net/download/59048596efc0149d/
Also note that XMA has different decoding id's mainly right after a header table if its present, but im hoping someone can make a custom header out of this, this header is not mine, its by a member named kataah from gamingforce and ffshrine.
Forgot to mention this header only works for xma files 5mb and smaller, but lets hope we can manipulate that, i am not a header creator though lol.
Sounds great.. finally XMA is going down.. you happen to have a small progress information - and no hurry, no hurry, no rushing, it's just I officially admit I've been waiting for this since ages ;)
In case of Sonic Next I had to swap XMA files on the disc, burn big DVD+R DLs just to get access to some beta files.. it would be awesome to hear that these tortures are over!
Yes, HCS has been progressing through the code. Based on his findings so far, it sounds like the Russians had very good reason for hiding the source to their program. In one way or another, it's likely that the code they used was used without permission (whether it be from ffmpeg, or from somewhere else). Nothing useful yet, but some very interesting things overall. Not much of a "progress report," but at least you know there is progress. Mouser X over and out.
I'm not 100% conclusive about that (particularly the ffmpeg interpretation seems less likely), but there are some odd scenarios where MS's error return codes are used.
Guys i just got info that i wsn't suppose to leak this tool to other sites. But Xporer the creator doesn't know yet about that, so im afriad im gonna have to remove the tool from the front page.
sorry, but you can still google it, btw HSC i would keep a low profile if your gonna edit the code.
Hmm cant seem toe dit my front post. HSC can u plz remove the link.
mudlord, I'm curious, how were you able to get results out of DeDe? All I got was an uninteresting disassembly with unpacked.exe and nothing with towav.exe. I wasn't able to attach to the running processes, but I'm not sure if this is a problem with Wine or DeDe.
Hm... ffmpeg I guess would be okay to use.. kinda.. the final project probably has to be Open Source then seeing ffmpeg would be GPLed.. but well, if they used the actual XDK for that.. then yeah, in that case I fear the project shouldn't really exist seeing that this would be copy-righted code. Not that typical internet users would care but still.
That set hasn't been made available yet. Apparently it's been ripped and there are people who have it, but it's not actually available at this time. Maybe someone will upload it the HCS tracker if you ask nicely enough. I don't have it (and even if I did, I wouldn't be able to upload it), so I can't help, and I don't know who else has it, or if they're willing/able to help either. Sorry to be fairly useless in this exchange. Mouser X over and out.
Not sure, but you might want to chat to Luigi Auriemma (aluigi.org)
His FSB extractor can read XMA headers from what I see. Plus, with his reversing knowledge with anything to do with this stuff, he might be able to give some hints.
I don't get why it really matters, all you'll do is convert streams to mp3s and put them up on ffshrine (and you can already do that with your gamerips thread, so I don't really see why it's even necessary to you)
Does this mean we'll be able to get the music out of Super SF2 Turbo HD Remix?
Reason I ask is because I'm hoping to end up using the fan remixed tracks for Super Turbo on Dreamcast (I'm hoping the 360's music has better looping than the MP3s do).
ToWAV is far from perfect, it doesn't support Multichannel XMA files, so it doesn't work with the decrypted FSB files from Guitar Hero: World Tour and above. I hope someone else makes a proper XMA decoder sometime.
I can post a decrypted FSB containing a Multichannel XMA file as a sample if needed (and allowed).
Doesn't Guitar Hero: World Tour contain .xen files for audio? Yes, this think sucks with deinterleaving multichannel streams (i.e Ace Combat 6). I tried FSB and it works fine if the streams within are all the same size and not as a bank.
The .XEN (FSB.XEN) extension in Guitar Hero: World Tour is just bogus, they're normal encrypted FSB files (with multichannel XMA files inside). The multichannel files are extractable from the decrypted files with FSBEXT, but the multichannel files don't work with ToWAV.
XWB extraction? by hufman at 3:40 PM EDT on September 25, 2009
What tools do you recommend for extracting XWB files? The only tool that I could find to extract these Kameo files that I just extracted is toWave, but I want to keep looppoints. unxwb is terribly old, and very hard to find, and it can't figure out what type of codec is used, and so it extracts to plain dat files. What other tools do you use?
As this thread says, use toWave. I don't know about extraction, but my understanding was that toWave worked on Kameo just fine. However, since toWave is currently the only PC tool that can decode XMA, and it decodes to WAV, you're out of luck on the loop points. As it is right now, there's no way to preserve those. Mouser X over and out.
Yes, I discovered toWave from this forum, and it converts Kameo's soundtrack beautifully. However, I would like to extract the files out of the XWB files, without converting them, to be ready for when vgmstream can play them. So, what tools do you guys prefer for merely extracting?
The Microsoft Cross-Platform Audio Creation Tool (XACT) 3.0 can be used to create XMA Wave Banks and Sound Banks. This application comes with Microsoft Game Studio 3.1. This could be used to recreate loop points while maintaining the original format (dump XWBs then recompile with loop information in an XACT project file).
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):
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.
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.
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)?
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?
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.
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:
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?
I'm ripping music from an Xbox 360 game at the moment and just wanted to say that all is going well thanks to unxwb, xma_parse, towav, and all the awesome info posted in these forums!
I do have a question though, and hopefully it's not a stupid one. Is there a header I can use for a 1 channel mono file? The stereo header that hcs posted worked perfectly for everything I've ripped so far, even the 6 channel files, just not for this one stubborn mono track. I tried using the stereo header and got 2 seconds of ear abuse. It's probably not gonna be worth the trouble since it's most likely a sound effect or something, but I'd like a complete set.
I uploaded the file (with xsb) here if anyone wants to take a look:
http://www.sendspace.com/file/tsh8s8 (1.56MB)
Also, just to confirm what I did so far, I used this command with unxwb:
unxwb.exe -R -b bgm.xsb 0xd9d bgm.xwb
and then this command in xma_parse:
xma_test.exe bgm00.dat -b 10000 -r bgm00.xma
That's for the 2 channel files. For the 6 channel files I did -o 800 and -o 1000 and they sound fine.
Does all that look good? The files sound perfect when played, just looking for some confirmation that I did it right since this is uncharted territory for me.
Thanks! This site rocks so hard!
GW RE2 by Brownondorf at 1:33 PM EDT on June 5, 2010
Hello
Can someone explain me how to decode the Geometry Wars 2 XMA? Because i don't understand anything on how to do it (like how to remove the first 100 bytes of the files ;) )
But now instead of getting 2 seconds of ear torture, I get 5, haha. I'm beginning to think bgm24.dat is just junk data. Can someone please download it and see if they can figure something out? It's the only BGM file off the whole disc that I can't get to play properly. :(
You may have to change the sample rate. XMA can be 22050, 32000, 44100, or 48000 Hz (iirc) and it does affect the encoding. Here's a 48khz mono header which may be what you need.
Did anyone ever tell hcs that he's the man? That 48khz mono header did the trick. Ended up being a real song too, 2:17 in length, so I'm glad I didn't just disregard it. THANK YOU!
"The Microsoft Cross-Platform Audio Creation Tool (XACT) 3.0 can be used to create XMA Wave Banks and Sound Banks. This application comes with Microsoft Game Studio 3.1. This could be used to recreate loop points while maintaining the original format (dump XWBs then recompile with loop information in an XACT project file)."
Did anyone ever successfully do this? I have XACT 3.0 installed but not sure how to go about dumping my XWB (from a retail game disc) into a format that XACT can import as wav files while keeping the loop info. Any ideas?
Edit: I'm guessing I need to have xmaencode.exe decode the XMA files to PCM and then those PCM wavs will keep the loop info, which I can then import into XACT. So I'm now asking how to get xmaencode.exe to recognize the XMA files dumped with unxwb and/or xma_parse.
Also, thanks OrangeC for the info, next time I'll try that. ;)
I was told there was some XMA files in this file. http://www.mediafire.com/?jminn3ymca5
I use the XMA_Phrase and got this. "filename: VOBTL.spb version: XMA2 offset: 0 block size: 8000 data size: 4fd7800 output filename: file.xma ------------------
Parse error: skip bits (18728) did not match previous frame overflow (0)"
Ok, I've had my fun and you seem persistent. Get VGMToolBox r654 and use the Wav/RIFF extractor under Misc. Tools -> Extraction Tools -> Generic -> Advanced Cutter, and select the RIFF Style Header. Do note that this will only work correctly on files with RIFF headers that need the 8 byte extension. There are some files (other XMA,xWMA, etc.) that need a higher or lower byte extension to the cut size.
You said use use the RIFF/Wave option right? When I do that, it exports as a .wav. Should I have it extract as a .XMA? Also, is there a XMA to WAV tool on HCS's main site?
We have everything we need to write a decoder for xma but it requires too much work than it's actually worth. That's why it's taking such a long time. It's due to a lack of motivation now....
I'd be really glad if there was a universal XMA decoder for even multichannel XMA-s. In addition, I have motivation to write a decoder, but I don't even know how to start. You wrote that you have every information that's needed. If you can tell me those infos, I could try to write the decoder. (I don't promise I'll succeed, but I could give it a try.)