|
Luigi Auriemmaaluigi.org (ARCHIVE-ONLY FORUM!) |
|
It is currently 19 Jul 2012 12:54
|
View unanswered posts | View active topics
Author |
Message |
bowtie
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 14 Mar 2011 01:15 |
|
Joined: 23 Oct 2010 00:29 Posts: 35
|
Nerd42 wrote: In tmp2FSE.tmp.xma, the "d" in "data" occurs at hex 558. Adding 8h gives us 560. Adding 800h to that gives us d60. Adding 800h again gives us 1560. I used hxd to find the "d" and this online calculator to do the math. Here is the output I got: ...stuff in between... track-1.bin is 0 bytes. track-2.bin is 2.64 MB. track-3.bin is 2.00 MB. My understanding was that they were all supposed to come out as the same size. Where did I screw up? Here are the commands you used.. Code: xma_test.exe tmp2F5E.tmp.xma -o 558 -r track-1.bin xma_test.exe tmp2F5E.tmp.xma -o 560 -r track-2.bin xma_test.exe tmp2F5E.tmp.xma -o 1560 -r track-3.bin You did the math right and the offsets are 560, D60, and 1560 respectively. Unfortunately you didn't do the proper commands. The output track-2.bin is actually track-1.bin, so all you have to do is redo the second command and use the proper offset.
|
|
Top |
|
|
|
|
|
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 15 Mar 2011 03:54 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
Everything works for guitar hero 5...thanks guys!
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 15 Mar 2011 17:31 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
Thanks bowtie. That step appeared to work this time with the commands Code: xma_test.exe tmp2F5E.tmp.xma -o 560 -r track-1.bin xma_test.exe tmp2F5E.tmp.xma -o d60 -r track-2.bin xma_test.exe tmp2F5E.tmp.xma -o 1560 -r track-3.bin Except they're still not the same size. track-1.bin is 2.72 MB, track-2.bin is 3.56 MB and track-3.bin is 2.73 MB.
|
|
Top |
|
|
bowtie
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 15 Mar 2011 17:53 |
|
Joined: 23 Oct 2010 00:29 Posts: 35
|
Now you have to add the XMA header. You can use "copy /b xma-header.bin+track-X.bin track-X.xma".
Remember, only the final WAV tracks should be the same size/duration.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 15 Mar 2011 20:36 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
bowtie wrote: only the final WAV tracks should be the same size/duration. Oh, I didn't understand that was the case. Thanks :)
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 22 Mar 2011 17:36 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
I've found it's useful to put these sorts of instructions into batch files rather than trying to type them at the prompt. The following instructions seem to work. I don't hear any skips and all three WAVs come out the same size: Code: REM tmp304.tmp.xma is "Linkin Park - When They Come For Me" from DJ Hero 2 DLC.
REM In tmp304.tmp.xma, the "d" in "data" occurs at offset 50C. Adding 8h to that gives us 514. Adding 800h to that gives us d14. Adding 800h to that gives us 1514.
xma_test.exe tmp304.tmp.xma -o 514 -r track-1.bin xma_test.exe tmp304.tmp.xma -o d14 -r track-2.bin xma_test.exe tmp304.tmp.xma -o 1514 -r track-3.bin
copy /b xma-header.bin+%track-1.bin track-1.xma copy /b xma-header.bin+%track-2.bin track-2.xma copy /b xma-header.bin+%track-3.bin track-3.xma
convall "convall" is of course just convall.bat which comes with towav, and all it says is, "@towav.exe *.*" However, this code doesn't work: Code: rem Trying to convert Linkin Park - Pts.of.Authority from DJ Hero 2 DLC.
rem In tmp6E18.tmp.xma, the "d" in "data" occurs at offset 608. Adding 8h to it gives us 610. Adding 800h to that gives us e10. Adding 800h again gives us 1610.
xma_test.exe tmp6E18.tmp.xma -o 610 -r track-1.bin xma_test.exe tmp6E18.tmp.xma -o e10 -r track-2.bin xma_test.exe tmp6E18.tmp.xma -o 1610 -r track-3.bin
copy /b xma-header.bin+%track-1.bin track-1.xma copy /b xma-header.bin+%track-2.bin track-2.xma copy /b xma-header.bin+%track-3.bin track-3.xma
convall
rem WARNING: This still skips! It still skips. What did I do wrong there?
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 02:50 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
Code: xma_test.exe tmp304.tmp.xma -o 514 -r track-1.xma Try keeping the file the same type and extract as .xma instead of .bin as above. Then use VGMToolbox / XMA Converter (with djhero2 preset) to convert your xma to wav. Works flawlessly for me and no skips. I also had problems with riff headers and skipping files until I used the XMA Converter.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 03:00 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
OK thanks. Apparently towav works for some files but not others. Any idea how to get "Human After All" out of the disc0 files?
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 06:28 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
I had tested the extraction methods on a DJ Hero2 image, and they worked perfectly. The only problem was the file structure was changed so the names of the songs were replaced by numbers on the music files, making it difficult to know what song I was extracting. I tried 3 files at random and they all worked. Do you happen to know the number of that song as it is stored in the image?
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 12:30 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
No. But don't they contain XML files that have the song title within them?
Also, what the heck is your extraction method? :)
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 14:53 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
I don't recall seeing the song titles anywhere, but I didn't look that hard. Anyways, my extraction method is: Extract .xen from image, rename to fsb, decrypt fsb. Extract multichannel xma from fsb, identify offsets in xma and extract each channel one by one. Convert to wav. Done.
Back on the first page of this thread, MDawg posted a DJ Hero file. I just extracted and converted that file without any problems. Try converting that exact same file and we can compare results to see where your problem is. I haven't tried DLC yet so I'm unsure of it's structure.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 15:33 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
alfke, I know what to do once I get an FSB file because I've converted some DLC, and if .xen files are just .fsb files with a different extension, that makes sense, but how did you extract the .xen files out of the image? That's what I'm not clear on.
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 19:14 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
Oh that's easy. Use Xbox Backup Creator 2.9. It has image tools which easily allow you to view game images and extracting files is a simple right click. No command line...easy to use gui....it's sweet.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 19:37 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
Are we opening the disc image itself with Xbox Backup Creator 2.9 or are we opening the results of "copy DISC0.IMG.part0 /b + DISC0.IMG.part1 /b DISC.IMG" or what?
Are you saying we must use only the XBox 360 disc or does it matter?
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 19:52 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
Open the disc image itself. No need to copy anything to or from the image to extract your tracks.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 20:10 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
alfke wrote: Open the disc image itself. No need to copy anything to or from the image to extract your tracks. Thanks ... although that answers the first question but not the second one.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 23 Mar 2011 22:19 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
alfke, are we even talking about the same game? I'm talking about DJ Hero 2, like the thread title says! Not DJ Hero 1. Even on the XBox 360 disc, the DJ Hero 2 tracks are contained inside DISC0.IMG.part0 and DISC0.IMG.part1 just like on the Wii. (unlike in DJ Hero 1) The Image Browser in XBox Backup Creator is no more able to get at the tracks on the XBox 360 DJ Hero 2 disc than WiiScrubber is on the Wii disc!
Man, this is disappointing. I thought you knew something I didn't and couldn't wait to get home to try out Xbox Backup Creator, but now I find out it's just like the tool I've got, which will get us inside the Xbox 360 disc's file system but not into DJ Hero 2's internal file system.
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 24 Mar 2011 03:03 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
Everything I've referred to is for xbox, not the wii. Everything for the wii is fully cracked except for rockband 2 DLC from dec 09 to present, including any full game releases like beatles, green day, rockband 3, etc. ALL guitar hero, INCLUDING guitar hero 6 and DJ hero 2 is cracked for wii. The problem is the wii versions have less multitracks per song and MUCH poorer quality sound than xbox. For me, I have always been able to get at xbox files, but I couldn't figure out how to decrypt and then convert to a wav file. This thread helped me figure it all out so I want to help you do the same. I have never seen a multi disc release of any guitar hero game or dj hero. Each game has only 1 disc image, and that is the same for the wii AND xbox360. When I deal with xbox files, it's all fsb.xen files. With the wii, it's .bik files that contain the multitracks. I downloaded a djhero 2 image (for xbox because its better quality) and made my comments throughout this thread based on that image because I knew the djhero 2 image would be similar (but not exact) to guitar hero 5....and it was, except for the names of the files for djhero 2. At no point in time was I referring to wii images. I was easily able to extract sound files and convert them to wav from djhero 2, the only problem was i didn't know the name of the song I was extracting. I have DLC content for the wii, but haven't figured out how to decrypt as of yet. I am puzzled as to how you managed to get 2 images for the same game. Every music game is always one disc. Perhaps you are using PAL discs and those happen to be 2 discs per game? Everything is NTSC for me. If you have multiple NTSC images of DJ Hero 2, they are either incorrect, or the image file was split in 2 when it's not necessary. You should have one image for xbox around 7 gigs in size, and under 5 gigs for wii.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 24 Mar 2011 05:35 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
Inside the XBox 360 DJ Hero 2 ISO I've got (7.29 GB) which I have opened with the Image Browser in XBox Backup Creator (and other similar tools) there is the root directory which contains the files "AvatarAssetPack", "Default.xex" and "nxeart". There are two folders, "$SystemUpdate" and "X360". Inside the "X360" folder is two files, "DISC0.IMG.part0" and "DISC0.IMG.part1" and they are the only files on the disc big enough to have the multitracks in them.
Similarly, on the Wii DJ Hero 2 ISO I've got (4.37 GB) which I have opened with WiiScrubber, there are two partitions: "UPDATE" and "DATA". Inside the "DATA" partition there is a "Wii" folder and inside that is "DISC0.IMG.part0" and "DISC0.IMG.part1". So I haven't gotten any further on the XBox 360 version than on the Wii version.
Up to this point I've been operating on the assumption that DJ Hero 2 has it's own cross-platform file system inside those two files and that the FSBs must be in there.
How do I find out whether I've got NTSC or PAL?
Also, does the Wii DJ Hero 2 have less tracks than the XBox 360 DJ Hero 2? I know that is the case for some games but is it for DJ Hero 2?
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 25 Mar 2011 01:22 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
My apologies, I honestly thought I was looking at a DJHero 2 image, when I realized it was labelled incorrectly and was , in fact, a DJ Hero 1 image. I have since grabbed a DJ Hero 2 image and I am now in the same boat as you. Blame beer for my oversight :(
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 25 Mar 2011 01:51 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
alfke wrote: My apologies, I honestly thought I was looking at a DJHero 2 image, when I realized it was labelled incorrectly and was , in fact, a DJ Hero 1 image. I have since grabbed a DJ Hero 2 image and I am now in the same boat as you. Blame beer for my oversight :( Ah, well then as they say in Keith Laumer's "Placement Test", "welcome to the Club." :)
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 26 Mar 2011 16:59 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
I think these instructions are what we need: bowtie wrote: So I finally discovered how to extract the FSB files from the DJ Hero 2 filesystem image. Thanks to mDaWg for providing an FSB file from the DJ Hero 2 DLC, I was able to understand why I was unable to find the tracks in DISC0.IMG. The reason I wasn't able to find the tracks was because the FSB files are encrypted, unlike those in the original DJ Hero. And now having access to an FSB from the DLC, I now know what to look for in DISC0.IMG.
First you will need HxD installed on your computer.
## Extracting the encrypted FSB files (Sorry, but I'm assuming you already combined DISC0.IMG.PART1 & DISC0.IMG.PART2 into DISC0.IMG)
1. Open HxD and load the DISC0.IMG 2. Search for hex value "14 3C 8C C0" and take a note of this values starting offset (for the first FSB, it will be hex offset 0B100000). 3. Search for hex value "00 00 00 00 00 00 00 00" and take a note of this values starting offset and subtract 1 (for the first FSB, it will be 0BC43E40 -1 which leaves you with 0BC43E3F). 4. Press CTRL+E and insert the first offset value (0B100000) in the top box. Insert the second offset value (0BC43E3F) into the next box. 5. Press CTRL+C (to copy), CTRL+N (to create a new file), CTRL+V (to paste), then CTRL+S (to save). 6. Repeat steps 1 through 5 for the rest of the encrypted FSB files. There are a total of 106. I would recommend that you name the files ascending numerically.
Note: There is probably a way to automate steps 1 through 5, and if you know a way, please share it with us. I've already extracted the 106 files, but it would certainly save time for everybody else that wants to extract them. So far I've only done stuff with sequential file access and haven't done any programming that uses binary file access yet but I'm gonna try. :)
Last edited by Nerd42 on 26 Mar 2011 20:14, edited 1 time in total.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 26 Mar 2011 19:02 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
I am working on a Python script right now to automate FSB extraction. The "14 3C 8C C0" hex value is "\x14\x3c\x8c\xc0" in Python. My script reads DISC.IMG one megabyte at a time and searches each megabyte for that string. Based on the assumption that the value never falls inbetween two of these megabytes, I get 108 instances of that hex value in the file. Here is my code: Code: def bigFileSearch(f, target, start=0): # Warning: This function won't find strings if they fall inbetween the boundaries of the buffer it uses! f.seek(start) currentMeg = start found = 0 megabyte = f.read(1000000) # Not really a megabyte I confess while megabyte and found == 0: result = megabyte.find(target) if result != -1: found = 1 currentMeg += 1000000 megabyte = f.read(1000000) if found == 1: result += currentMeg return result
# Main program starting here!!
with open("DISC.IMG", "rb") as f: a=list() # Make a an empty list cursor = bigFileSearch(f, "\x14\x3c\x8c\xc0") while cursor != -1: a.append(cursor) cursor = bigFileSearch(f, "\x14\x3c\x8c\xc0", cursor+1) print "We got " + str(len(a)) + " results!"
soFar=0 for x in a: soFar += 1 endOfFSB = bigFileSearch(f, "\x00\x00\x00\x00\x00\x00\x00\x00", x) if endOfFSB != -1: f.seek(x) with open(str(soFar) + ".fsb", "wb") as fo: fo.write(f.read(endOfFSB - x - 1)) fo.close() print "Sucessfully wrote " + str(soFar) + ".fsb" f.close() I'm using http://portablepython.com/ to run this script on Windows XP When I press "?" in fsbext on the resulting files, I do see the password, but when i tell it the password, it says it's wrong. So what am I doing wrong?
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 27 Mar 2011 11:15 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
I successfully extracted and converted the example song from the image using those instructions. No skipping, everything is perfect.
I don't use fsbext to decrypt, even though it is able to. I found it usually works when you give it the pwd.txt file to decrypt (pwd.txt needs to be saved with an encoded password, not plain text). However I kept running into issues decrypting some, but not all files. I now use the decrypter in guessfsb to decrypt only because I can paste a plain text password in it. After that I use fsbext to remove the multichannel file from the decrypted fsb. No matter what, what you posted above works perfectly!
I don't know anything about scripting so I cannot be much help.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 27 Mar 2011 18:46 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
Can you check whether the files created by my script (which you can run using the portable python I linked to) match the FSB files that worked for you?
|
|
Top |
|
|
bowtie
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 27 Mar 2011 23:04 |
|
Joined: 23 Oct 2010 00:29 Posts: 35
|
You can use dd in linux (or a windows port) to extract the individual FSB files. I have all the offsets and can possibly create a batch file to extract all of them.
|
|
Top |
|
|
bowtie
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 27 Mar 2011 23:04 |
|
Joined: 23 Oct 2010 00:29 Posts: 35
|
Sorry for the double post.
|
|
Top |
|
|
alfke
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 28 Mar 2011 01:31 |
|
Joined: 05 Mar 2011 22:34 Posts: 15
|
I got confused tring to run your script with portable python...nothing worked for me. Scripts are not my specialty.
|
|
Top |
|
|
Nerd42
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 28 Mar 2011 14:46 |
|
Joined: 28 Dec 2010 23:54 Posts: 51
|
bowtie wrote: You can use dd in linux (or a windows port) to extract the individual FSB files. I have all the offsets and can possibly create a batch file to extract all of them. what's "dd" ?? A batch file would be good :)
|
|
Top |
|
|
aluigi
|
Post subject: Re: Extracting WAV files from DJ Hero 2 FSB files Posted: 28 Mar 2011 21:55 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
you don't need complex solutions like that. you can figure the file format of this archive or use a generic ripper tool or use the following script fo my QuickBMS tool: Code: # dump FSBs # script for QuickBMS http://aluigi.org/papers.htm#quickbms
for findloc OFFSET string "FSB" 0 "" if OFFSET == "" cleanexit endif goto OFFSET getdstring FSB_SIGN 3 get FSB_VER byte get DUMMY long get HEADER_SIZE long get DATA_SIZE long if FSB_VER == '4' math SIZE = 0x30 elif FSB_VER == '3' math SIZE = 0x18 elif FSB_VER == '2' math SIZE = 0x10 elif FSB_VER == '1' math SIZE = 0x10 math DATA_SIZE = HEADER_SIZE math HEADER_SIZE = 0 else #print "FSB version %FSB_VER% not supported" #cleanexit math SIZE = -1 endif if SIZE == -1 math SIZE = 4 else math SIZE += HEADER_SIZE math SIZE += DATA_SIZE log "" OFFSET SIZE endif math OFFSET += SIZE goto OFFSET next update: fixed
|
|
Top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|