Skip to content

VGM Ripping Help

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

  • User avatar
  • RichterEX2 Offline
  • Posts: 191
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

VGM Ripping Help

Post by RichterEX2 »

I wish there was a proper tutorial. The only one I keep finding is for Sega Genesis rips, and is very outdated. I'll give you a rough tutorial.

Step One: Obtain a VGM logging-capable emulator/player.
http://vgm.mdscene.net/forum/viewtopic.php?t=107

I recommend using M1 if you can, you'll be fine as long as you know how to use DOS-ish command lines. I don't recommend MAME for beginners, as it requires splitting a giant VGM file into smaller chunks afterward. But sadly it seems to be the only way to get Skull & Crossbones

Step Two: Trimming & Optimizing
For this step you'll need VGM Tools. It has a readme explaining what each program does.
http://vgm.mdscene.net/forum/viewtopic.php?t=207

Generally, here's what you'd do. Use vgmlpfnd to find the loop point in each track you logged in M1, then use vgm_trim with the loop points you found to trim the file and make it loop properly. (To get a good estimate of where loops are, some record them as WAVs then load into Audacity. I just do it by ear and Winamp's timer). Afterwards you'd run vgm_sro to optimize any samples, followed by vgm_cmp to compress the VGM further.

Step Three: Tagging
Once you have all the nice, optimized VGM files. You should tag them with Composer, Track Title, Game Title, etc. This can be done in VGM Toolbox. There are standards to this. Namely...

1. No using composer "nicknames", VGMdb has a listing of them. So if you come across any, just be sure to use their actual name when it comes to tagging. Most of the time it also has their proper Japanese symbols, which is good if you're also doing Japanese tags.

2. Track Titles. OST Listing>Game Stage Title>Generic Level #
Again, if it has an OST. It's usually recommended to go by that. I know M1 will tag a bunch of these fields for you, but it's a very good idea to double check on your own. :3

3. Game Release Date. The more precise the better, but just do the best you can.

Once you have that, there's a few more topics to tend to such as filenames, and how to make a pack suitable to upload to the site. Which is already covered by this -> http://vgm.mdscene.net/forum/viewtopic.php?t=135

EDIT by VB: Moved into a seperate topic.
  • User avatar
  • jrlepage Offline
  • Posts: 32
  • Joined: 2012-10-07, 3:33:28
  • Location: Canada

Post by jrlepage »

This needs to be its own topic. Thanks a lot for your help! I've actually successfully logged one track from each one of those two games, but I'm having a hard time making them loop properly. vgmlpfnd.exe couldn't find any loop point in the Skulls 'n' Crossbones track, and the one from Bucky O' Hare only listed two lines, neither of which had an exclamation mark. I'm rather miffed to tell the truth; I'm not sure where I'm supposed to go at this stage.

Here are the two (untrimmed) files, both logged using MAME.

skullxbo
bucky

If you could give me a hand with those I'd be very grateful. :)
  • User avatar
  • RichterEX2 Offline
  • Posts: 191
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

Yeah, again. With MAME you have to split all this stuff into its own tracks before you can do vgmlpfnd or anything else. Let's just stick with M1 and Bucky for now, otherwise you'll have to use vgm_spts or vgm_sptd to split what you have there.
  • User avatar
  • jrlepage Offline
  • Posts: 32
  • Joined: 2012-10-07, 3:33:28
  • Location: Canada

Post by jrlepage »

Okay, I'll give it a go and report back.

EDIT: I'm on the IRC channel right now if you prefer helping out in real time. :)

EDIT2: Okay, here's the result with M1. An even larger file and the loop finder still can't do anything with it (it doesn't even list anything). I'm at a loss. :(
Last edited by jrlepage on 2012-10-07, 8:43:00, edited 2 times in total.
  • User avatar
  • Raijin Offline
  • Posts: 41
  • Joined: 2012-08-15, 6:24:35

Post by Raijin »

Heh, I've been trying this out myself with MAME. Indeed it is complicated.
I had an idea last night. How useful would a tool that lets you see and interact with the waveform of a VGM file? Kind of like an audio editor, but with the functions of all of these VGM tools, you could slice the unwanted parts out, trim the VGM as needed, normalize the volume and set the loop points all in a minutes time.
That would be pretty cool.
  • User avatar
  • dissident93 Offline
  • Posts: 204
  • Joined: 2012-02-17, 5:54:01
  • Location: USA

Post by dissident93 »

Excuse my ignorance, but would VGM files even have waveform data akin to a WAV? I thought VGMs were just data/binary/coding that the plugin read and played back as sound?
  • User avatar
  • jrlepage Offline
  • Posts: 32
  • Joined: 2012-10-07, 3:33:28
  • Location: Canada

Post by jrlepage »

That was my reckoning too, but Raijin seemed adamant on saying it's possible somehow to make a VGM waveform editor. :p
  • User avatar
  • Raijin Offline
  • Posts: 41
  • Joined: 2012-08-15, 6:24:35

Post by Raijin »

I am not all that knowledgeable on the matter, but what you say about VGM's not having waveform data is probably correct. However, in my mind, at least since it is possible to dump a .wav file, it also seems likely to me that coders can somehow take a VGM and have it go through a process similar to dumping as .wav, and show it inside a program as a waveform while you work on the timing/splitting and whatnot.
Of course, I could be completely wrong.
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

I can only speak with certainty about Gen/MD VGMs, but the format allows for uncompressed raw samples like a .wav, but the way it's stored (eg, little- vs big-endian, 8 vs 16 vs 32 bit, etc) is chip-dependent. Most often the stored waveforms are used like a sampler does (eg, Q-Sound, Sega CD, 32X, etc).

If one was intrepid enough, one could theoretically write a tool that takes, say, a .it file and converts to a Q-Sound VGM. There are higher VGM development priorities than that, however.
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

Some time ago I thought about making a converter from 8-Channels XM files to the RF5C164, there are even some IRC logs that prove that, but I never felt like doing that for real (not so much for the XM part, which I can easily handle, it's the RF5C164 that scares me with all those weird commands and whatnot).
Also known as nineko.
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

I vaguely remember one of those convos; I think I also said that if we're heading in that direction we might as well jump straight to Q-Sound for the allowance of better quality samples.
  • User avatar
  • rainwarrior Offline
  • Posts: 19
  • Joined: 2013-01-22, 13:42:04
  • Location: Toronto, Canada
  • Contact:

Post by rainwarrior »

Hi, I'm new to this board but I want to say thanks for this thread, and also offer some information about MAME VGM ripping that I couldn't find on the board and took me several minutes to deduce from the source diffs.


1. Run MAME from the commandline as: MAME -createconfig

This creates a mame.ini file.

2. Find the vgmwrite line in mame.ini, and change its setting from 0 to 1.

MAME will now output a file in the form romname_0.vgm when you run it.


I don't know if there are any other details to this, but this + your info was enough to get me started. It always seems to overwrite xxx_0.vgm, is there a way to increase the number so I don't have to restart each time? Or is it outputting 1 file per hardware unit when I run MAME so if there were multiple sound chips, there would be a _0, _1, etc?
  • User avatar
  • Knurek Offline
  • Posts: 84
  • Joined: 2011-12-30, 1:01:56

Post by Knurek »

There's one thing I haven't mentioned anywhere that speeds up the logging process immensely. Both MAME and MESS have an option to disable frame limiting, you just need to press F10.

Not having used M1 for logging, I can't say whether it has that option as well.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

rainwarrior wrote:Hi, I'm new to this board but I want to say thanks for this thread, and also offer some information about MAME VGM ripping that I couldn't find on the board and took me several minutes to deduce from the source diffs.
Sorry. Usually I include mame.ini/mess.ini, but I forgot it this time.
Also thanks for reminding me to mention that it needs to be enabled by editing the ini-files. It works the same as wave logging, so I didn't think of noting that anywhere.
The only time I said it was when I released the first MAME VGM mod (v0.136) and that was on the SMSPower.org board.
rainwarrior wrote:It always seems to overwrite xxx_0.vgm, is there a way to increase the number so I don't have to restart each time? Or is it outputting 1 file per hardware unit when I run MAME so if there were multiple sound chips, there would be a _0, _1, etc?
It starts to write to _1 if the logged chips don't fit into one VGM. For example, if you have 3xAY8910, there will be an _0 with 2xAY and an _1 with the third AY chip.


@Knurek: M1 has no speed up feature.
When logging OutRunners, I just edited the lst-file to make every track play at least 2 minutes, started M1 and muted it. (thanks to Win7, which can mute single applications)
While it was logging, I worked on other things and closed it after one or two hours.
  • bluemonkey Offline
  • Posts: 5
  • Joined: 2013-01-22, 1:19:42

Post by bluemonkey »

It's me again, Ok, got a little further this time. Got a vgm with several tracks using MAME. Then used vgm splitter tool to create vgm's from each song. That was pretty easy actually, but now I need a little help with finding loops and setting the correct length.

Some of the tracks plays indefinitely in the game, so I let them play for a few minutes before closing the emulator. I think the right tool to use now is vgmlpfnd (or something like that), but I don't really understand the ouput and how to use it. Could someone help me here?

BTW, how do you trim a file at certain position? For instance I have a recorded file that lasts 5 minutes but I want to make it 3:18 minutes long? Is there a way to do that?

Thanks in advance.

Note: Moved to the correct topic. -VB
Post Reply