Page 1 of 1

vgmcheck - extract loop and time information from VGMs

Posted: Sun Nov 01, 2009 10:23 pm
by libertyernie
UPDATE: version 2.0, which is very very small and coded in C. Go to post 3 for download.

A while back, I wrote a little Linux script to help me get the loop point information from a VGM, so I could convert it to WAV and then to a special format for insertion into Super Smash Bros. Brawl (by way of hacking.) I then realized this would be useful for people working with VGMs in other ways as well, so I expanded it a bit. It now gives the total time, loop start, and loop time of a VGM, all in samples as well as minutes/seconds/hundredths of a second.
It also runs on Windows, thanks to Cygwin. The needed Cygwin apps are bundled in the zip archive. Per the GPL, I should tell you that if you want the source code to the Cygwin apps the Cygwin mirrors will have them under "release."

To use it, drag and drop a VGM/VGZ onto the .bat file (Windows) or run the .sh file from the terminal with the VGM/VGZ as an argument (Linux).

Download (Windows/Linux)
The script and everything else in the .zip file is open source, under varying licenses (see the file LICENSE for details.)

Example output (this is the Master System version of Green Hill Zone):

Code: Select all

--Raw VGM information--
Total samples: 2329215
Total time in mm:ss: 0:52.81
Loop start: 635775
Loop start in mm:ss: 0:14.41
Loop time: 1693440
Loop time in mm:ss: 0:38.40

--For Brawl BRSTM conversion--
Loop start divisible by 14336: 645120
Loop end will then be: 2338560


SMS Power! thread

Posted: Thu Nov 05, 2009 5:47 am
by Dark Pulse
Oh no. Now some of my incredibly weird loop points are going to be revealed. :p

Posted: Thu Nov 05, 2009 5:51 pm
by libertyernie
Here's version 2.0 of vgmcheck, written in C and based on Maxim's code. (Okay, it's pretty much all Maxim's code.) I also added the SSBB portion and compiled it for both Windows and Linux.

The .zip file contains:
*vgmcheck.c (source)
*vgmcheck (Linux binary)
*vgmcheck.exe (Windows binary)
*vgmcheck.bat (Windows batch file, for dragging and dropping .vgm files onto)
*Makefile (consists of two lines)
*README.txt (information)

HOW TO USE (from the readme)
From Windows:
*Drag and drop a .vgm/.vgz file onto vgmcheck.bat, or
*run vgmcheck.exe from a command line: "vgmcheck.exe <filename>"
From Linux:
*Run vgmcheck from a command line: "./vgmcheck <filename>"