VGMusic - Source Code
A utility for playing the music and sound files from Vanguard: Saga of Heroes.

For binaries and information about the application, go back here.


0.6a Source Download


Useful Information!

First, I'd like to offer a quick apology for anyone trying to read through this project's source. It was mostly a quick one-off experiment, and so you may find some strange coding patterns used solely for the purpose of seeing whether they were viable or not. An example of this is that, unlike most "games" (and this application is built on a library intended to be used for games), there's not a single "main loop", and instead various bits of blocking code just render the whole scene themselves. Secondly, parts of it were written years apart (first the basic player with a buggy UI, then later a slightly-fixed-up UI), so you may find pieces of newer C++11 syntax mixed with older C++ styles. Lastly, the format itself was a lot of reverse-engineered guesswork, so in the parser you'll find a handful of hacks to "work past" data that I didn't understand.

The application itself, while currently only set up to build for windows, can be trivially ported to other platforms that the foundation library (mpma, included) supports. Currently this is only linux in addition to windows. The windows build uses a visual studio (2013) project file. Note that I have been lazy, and you'll need to alter the project include/library directories to point to where you have the dependencies on your machine. Speaking of dependencies, you'll need the following libraries (not included):

If you're looking at the source, you probably don't actually care about the ghetto UI I've built for it, and are more interested in just loading the music files yourself. In this case you can ignore the dependencies listed above (except Ogg Vorbis, which Vanguard uses to store the audio samples), and look at two sets of source files: FileIsb.h/.cpp and IsbPlayer.h/.cpp. The first pair are used to parse out Isb (and Icb, which shares the same format) files into memory. They contain no logic for actually turning that data into sound/music. The last pair contain a set of classes used to interpret and piece together the loaded data as an audio stream. The most interesting of those classes is IcbIsbSdriPlayer, which makes use of all of the others in order to generate the actual fully-assembled themes, given an Isb/Icb file pair. Note that this is coded to play using mpma's audio player (based on OpenAL), but it would not take a lot of work to rip that portion out and write those audio samples elsewhere. Similarly the audio stream classes (AUDIO::Source) are from mpma, though that only contains an interface for how to obtain samples from a generic source, so could be kept around if desired.

If you're attempting to use this source directly, and are trying to further analyze the contents of Isb/Icb files, then you should consider uncommenting the #define near the top of FileIsb.cpp. This will cause the loader to dump a "human readable" representation of those files out to disk (files prefixed with _debugLoad-). This was my primary means of "figuring out" what everything meant.