Megaman X Collection streams by DChronos at 7:45 PM EDT on March 30, 2009
I'm starting a new thread for this.

As I said, I'm gonna rip Megaman X Collection.

I'm looking at the bin files, and have found out that the music is set up just like Gradius V, having the same ending marker on the last 2 lines, and the code looks the same, so I'm guessing these are the same kind of files as Dual VAG music.

The music IS all split into 2 tracks, one for left audio and one for right audio. I took a few minutes last night to use PSound to make WAVs out of the left and right audio tracks of a song, and then assigned them to left and right and played back the full stereo track in Audacity, and it matches.

The problem is this: All the music for each game is combined into a single BIN file, and none of the tracks have any header info, and nothing in particular stands out in the BIN file header, just the word "PACK" at the start.

I have to ask, first, what would be the likely place to find the music info that's needed, if you guys have a good guess.

Or, second, can genh add a header to each file, and have them labeled with an _L and _R to indicate left and right and have it play that way?

I'll screw around with it later, but if you guys have the solution already from another game that had the same thing, it would be really great.

EDIT:
I just found that you have a program to read those bin files, says they are Ogg Vorbis, except, if there's this program already, how come they aren't ripped yet, and why do they look just like the VAG files in Gradius V, with the same ending marker, same look to the hex code, and same split left and right audio?

Oh, and they don't play by just adding .ogg as a file extension, probably already know this.


EDIT 2:

Hey, I got something that plays, just don't think this is how it should really be done... I took the 2 files that contain each channel, combined them together in a single file, and made a genh file out of it.

I used these settings:
PS2 AdPCM
0 header
2 channels
playback rate of 32000
interleave 2377744 (The size of each individual channel file)

Hey, it works, and loops without a hitch, but what do you think...?

MMXC Test

EDIT 3:

Sorry about all the edits... Scratch that file, it isn't right, seems these are put in reverse stereo, so I also have to cut and paste the bottom channel on top of the one above it in order for it to play out the correct speaker. After flipping, though, it sounded exactly as it does on the OST.

All of em have worked fine so far, just has a lot to load when played.

edited 12:18 AM EDT March 31, 2009
by manakoAT at 6:27 AM EDT on March 31, 2009
Hi DChronos,

more important for me is to know the offset where you ripped it from!

Further, have you looked at the game for a VFS (Virtual File System)? near every game uses it, if everything is stored in larger files, like the AFS filesstem found on most dreamcast games!

if there is one, i'm willing to write you an extractor, but i need the game executable and, let's say, the first 400kb from a binary file to determine the system.

Are you sure that there are no headers? if there are some, you can use the new VGMToolBox feature to rip them, it's really easy for everyone now!

by DChronos at 11:31 PM EDT on March 31, 2009
Well, I have no idea how to say the offset value, or what it'd be... I just learn stuff as I mess with it.

And yeah, they have no headers. From the end of each song at that marker, it goes straight into silent nothing 00 for a short bit, and then goes right into the next song. At the top f each bin file is a jumbled mess that doesn't look like anything in particular having to do with the music, just looks like the header for the bin file.

What I did was pretty simple, I just opened up the Megaman X3 BGM BIN file in a hex editor (it was the smallest one at 89Mb, so it loaded fastest), scrolled through it and recognized seeing the line at the end of the music that went:
00 07 77 77 77 77 77 77 77 77 77 77 77 77 77 77

I remembered seeing it from the Gradius V files I looked at like this and then just had an idea.

I already had opened the file in PSound and found out it had doubles of all the music and that it played at a forced rate of 32000, so I come to the conclusion it must have the left and right audio seperate, which is what led me to think Gradius V in the first place.

Anyway, I just copied the 2 blocks of music code at the end of the file from right under the 3rd to last line of the hex code I stated above down to the last line of that same 07 77- code, saved that by itself in a single file, set the interleave to half the file (or the size of each half), tried PS2 Ad PCM, 2 channels, set the rate to 32000 and made a working file, though the channels are reversed throughout.

I did look into another file's code having to do with the sound and found lines stating it was, in fact, PS AdPCM.

I think I came across one song that's in mono, though, for some reason... got it playing fine with 1 channel and no interleave, but it has no accompanying channel. The OST has it in stereo, so maybe it's a fuck up by the guy converting them from the originals.

As for the rest, like I said, I'm a beginner at this, and don't know what the VFS file would be called. I just use what I've figured out. Just lucky it's something I can use!

The Packthis tool actually does rip all the different separate pieces from the files, but it it also deletes some extra code, making them uneven. I'm trying to keep it intact and all. Also, as I said, the channels are reversed, so I gotta take the part at the bottom and make it the top for each song so the channels are right.

If you know what file the VFS would be called, I can get it for you to look at.

All in all, though... I do have to say, ripping these with the hex editor is pretty easy. I can create a new genh every 45 seconds or so. Just cut, paste, cut, paste, save, and go make a genh.

The only concern I got about these is that, when ran in winamp, the amount of ram it takes jumps from 3Mb to 11Mb for me. That's why I was wondering if having them play as genh like this was good, or if you wanted it a different way... but since there's no header for each song, and adding one would mean changing the size of the data, or crc, whatever it is, I only see genh as an option.

Sorry if this wasn't very helpful, if it wasn't. I don't know the terminology, just how to do it. And again, if you have a general idea what the VFS file(s) is called, I'll get it for ya.

EDIT:
There IS a collection of files in the root directory of each game name (MMX3.BIN for example), and I did find a whole bunch of path names within the file, including one leading to the BGM file, though I didn't get what the code was after it.

edited 11:49 PM EDT March 31, 2009
by Mouser X at 3:30 AM EDT on April 1, 2009
Loosely speaking, a VFS is anything that stores multiple files into one big file. While that's not exactly correct, it's close enough for the usage here. In other words, those BIN (MMX3.BIN for example) files you're loading into the HEX editor are the VFS files that manakoAT is asking for. That file may not contain all the data you're looking for, but it's a start in the right direction. Sometimes developers split the VFS into multiple files. Occasionally the headers are located in a file separate from the actual audio data. If you could provide a list of names on the disk, that might help locate additional useful data (or it might not).

As it stands right now though, you've already found what I would expect to be the majority (entirety?) of the useful VFS files, and are fiddling with one of them (MMX3.BIN). As manakoAT said:

if there is one, i'm willing to write you an extractor, but i need the game executable and, let's say, the first 400kb from a binary file to determine the system.

So send him the game executable, and a small portion of the BIN files. This should at least enable him to get a better grip on the system you're dealing with (which would also help in ripping the data properly).

Hope that helps. Mouser X over and out.
by DChronos at 5:44 PM EDT on April 1, 2009
Well, I can take care of that in awhile, the MMX3.BIN and others are only Kb in size, and the whole disc's system seems like a big mess of jumbled files that somehow work fine. :P

Anyway, after making these for awhile, I'm not sure how much help it could be if I have to flip the audio around anyway, and it seems that all the songs on this whole disc are un-looped, so the headers won't help anyway. I already know where each song begins and ends, got the playback rate, and there's no interleave because the channels are separate, and there's no loop points. The song goes through its thing, maybe plays 2 or 3 loops (or 6 minutes worth if in X6), and then fades out and starts over again.

I hate that they did that. I knew X4, X5, and X6 would be that way, especially X4 because those all have a beginning and end, but didn't think they'd also take the easy route on X1, 2, and 3...

But yeah, I'll upload that in awhile, so you can look at it. There's music for X1, 2, 3, 4, 5, 6, Battle and Chase, and even the menu system, all exactly the same way.

EDIT:
I've come across another problem that I'm having to manually fix, too... apparently, there's a lot of tracks that have differing amount of data for the left and right channel due to either one or the other getting extra blank space at the beginning... I'm having to manually adjust whatever channel happens to have the blank space, as it seems to be there randomly, either in left or right, and sometimes it's already fine.

For example, the left channel data may have 30 lines of blank space between the end of the previous track and the start of its audio, but then the right channel data that goes with it has 50 lines of blank space, meaning I have to adjust the right channel so it also only has 30 lines, to correctly line the audio up with the left channel, if you get what I mean. I'm trying to keep the data as intact as possible, though I don't really count extra space of nothing as anything.

This was the reason I thought I had a track that was mono earlier. It was actually stereo, but it barely had a gap in one channel, but had a huge gap of space at the start of the other. Didn't seem like it went together.

Anyway, after adjustment, each half of the audio is exactly the same size and works perfectly as genh. I guess it's more weird junk from how it was cobbled together. A mess.

edited 7:36 PM EDT April 1, 2009

EDIT 2:

I found something weird for you guys to wonder about, seems like a really REALLY odd coincidence. I found this string of characters in the middle of the music in 2 different files at points where you hear a slight pop or pause, almost unnoticeable:



By the way, which file would be the executable? I have a file called SLUS_213.70, another called SYSTEM, and another called LAUNCHER, though I think that's actually the menu bin file that's like these individual game ones, all in the root directory.

If anything, I'll just throw up MMX3.bin, which is the music I'm doing first since it's the smallest, and all 3 of those. It's only a couple Mb total.

edited 8:50 PM EDT April 1, 2009
by DChronos at 7:30 PM EDT on April 2, 2009
Sorry to double post, but here's something new for you.

Here's what I like to call progress.

This is all the music from the Megaman X3 bin file, all checked and labeled, plays perfectly, aside from the fact that whoever made these did a half-ass job and didn't check for bumps in the music, namely pops and ever so slight pauses you can kinda tell when the beat just sorta has a hiccup. It's blatantly obvious, but since it's part of the music data, I left it there.

None of the music loops. It plays through, fades out, and ends. I gave it no loop for this reason.

Anyway, this went pretty fast and easy, only took maybe 2 hours tops, barring all the distractions and other stuff I had to do while I was trying to get it done, especially after I decided "fuck it" with all that random blank data that's just used to separate the tracks. All the music data from beginning to end is intact, I only removed the randomly sized lines of 0s between each track.

Megaman X3 may not be the choice music from this set, but I ripped it because it was the fastest loading. I'm doing X6 and X5 next.

For ManakoAT:

Random junk to look at

I'm not sure what file you needed that was the executable, so I just stuck in what I thought it could be, and also added the VFS MMX3.BIN file that points to all the other files in the MMX3 folder, as well as the header for the bin file containing the music, in case it's useful.

None of the tracks have a header. It's exactly the same as Wild Arms 3, except that there's a header for the bin itself, all tracks are separated into right and then left audio (in that order, scrolling down from the top), and every track has an end marker of:
00 07 77 77 77 77 77 77 77 77 77 77 77 77 77 77

I think the missing tracks are in the PSS movie files. They are all the demo openings for each stage. I don't know if you can rip the audio, but if you can, can you show me how?

If you need any specific files, or can give me a better idea of any you need, like saying it might say this or that as the name, let me know.
by manakoAT at 8:13 PM EDT on April 2, 2009
Okay, we are definetely dealing with a "VFS" here, an easy one too...
I'll explain it to you:

if you look at this value 0x3C and convert it to a decimal value you'll get "60", this is the filecount in the file, means how many files are stored after the VFS header.


Right after this value is the start offset for the first file, in this case 0x800 (which means 2048 in decimal)


Here you can see the filesize of the first file, in this case stored as a 32 bit Little Endian value 0x1CA840 (1878080 in decimal),
if you calculate now your start offset + the filelength you have the exact end position of the first file, in this case 0x1CB040 (decimal 1880128)


This is the start offset for the second file 0x1CB800, followed again by the size...


We know now that every file entry has a size of 12 bytes, we can check this with your ripped header size, if we substract the 12 bytes where our first file starts from the filesize and if we remove the last 4 bytes which are redundant we have a size of 720 bytes, 720 / 12 = 60 (remember 0x3C = 60)

BTW: if you post screens from you hexeditor, please post it with the numbers like mine, i can't do anything with symbols only :o)

edited 8:31 PM EDT April 2, 2009
by DChronos at 10:13 PM EDT on April 2, 2009
Thanks for the tutorial on that! I had no idea what those where for.

Looking at it, I see it still ends up the same way I ripped and put them together, the music data for the first song does start right at 0x800, and the file end for all of them is way easy, since they all contain that end marker. I just used the Find function to skip to it, block select from the file end, skip up the the end of the next file (twice to get both channels), and cut that out, paste and save it by itself, after flipping the channels around, and removing the extra 0 space that serves only to space the files. It ends up right, so that's cool. Real easy!

About the screenshot, I was only posting the characters so you could see the incredibly odd coincidence. Though I did wonder if you'd ever seen it before. Happens at those points where the beat has its hiccup, like the song pieces where just kinda slapped together without smoothing it out.

One more thing I just realized that is really fucked up here... I'm finding out that, at random, some of these songs actually have the left and right audio correct, even though most of them have it flipped around. I'd go do my thing, rip the song, flip the channels and check it with the originals on the OST, and find out that its backwards, and have to change it back to how it was already.

This is a real screwed up mess... how the hell... seriously? At least it isn't a real big time waster, or anything. I just flip it back around, save, and hit the "create genh" button again.

Anyway, I'm using what I learned to rip X6 really fast now, though the audio quality is making my ears bleed... damn them, ruining the sound.

EDIT:
Megaman X6 is done... and for your listening agony...

Infinity Mijinion

My god, I want to shoot whoever downgraded the quality in the port, there's 2 GIGS left on the damn game disc morons!!

Also, I guess X3 had a few random backwards ones with the audio already correct, and X6 was all correct, having the channels set up right already. And another thing, I guess the music data started on the next line right after 800... it's just 0s, and makes no difference whether its there or not, and since there's no headers and the files have to be messed with anyway, flipped and crap, I'm just calling it good enough.

edited 12:14 AM EDT April 3, 2009
by manakoAT at 7:47 AM EDT on April 3, 2009
BTW: just in case you don't know it...
There's no need to append 2 files together and set a large interleave, make mono GENH files out of the pieces and append _L or _R to this file, for example MMX1_L.GENH and MMX1_R.GENH.


edited 3:19 PM EDT April 3, 2009
by nensondubois at 9:13 PM EDT on April 3, 2009
I have all the files from MMX Collection wich one(s) do you want hex screenshots for?
by DChronos at 1:01 AM EDT on April 4, 2009
I didn't know that, Manako, I'll try it out. Last time I tried to make it work that way I must have set something wrong because it wouldn't load.

Personally, though, I'd rather have a single entry for each track in the playlist when I go to play the folder of music, and it plays music the same either way. It takes no time at all, anyway, as I don't gotta append anything. I just take the entire data for both channels at once.

For nensondubios, I don't need any, and Manako was talking to me about the screenshot I posted of the coincidence.
by Sir-Sabin at 9:34 AM EDT on July 7, 2009
the ps2 version of this uses mono, i looked at about a year and a half ago and the GC version uses ogg, you can extract them both with PAKthis
by Sir-Sabin at 10:02 PM EDT on September 26, 2009
oops, it seems i made a mistake when i was looking at them via mfaudio and fail to note there were two of the same, i found this out when i put a header on them and was able to play them in winamp. they might be stereo after all
by the_miker at 11:12 AM EDT on August 11, 2011
Probably a long shot since this thread is two years old, but..

Has anyone ever attempted to rebuild MMX3_BGM.BIN and MMX3_SE.BIN (PS2 version) with the SNES music and sound effects? If possible, the result would be the ultimate version of this game. I know it's possible to extract the individual track files with PAKthis, so I'm wondering if there's a way to reverse that process and rebuild?
by Sir-Sabin at 5:34 AM EDT on August 16, 2011
i have no clue, dunno if it's been done


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