Converting VGZ to VGM
It’s rather simple to import and play music in your game using SGDK, as I’ve explained previously. However, one of the things you have to keep in mind is that SGDK only supports files in the format of VGM, XGM or XGC. No problem, right? Well…when you look around the web you’ll see that many Mega Drive music files are actually in VGZ format. That’s a bit of an issue, because SGDK doesn’t know how to deal with those. But there’s a trick to convert VGZ to VGM files, which SGDK can process happily!
I’m going to show you how to convert these files and it doesn’t even require audio software or anything. And that has to do with the fact that VGZ files are in fact VGM files! Kind of.
VGM is pretty much the default music format for a lot of retro game systems nowadays, and when you compose your own chiptunes you’re usually exporting them as VGM files. But when these files are distributed online, they are often compressed using gzip. This would give these files a file extension of
track.vgm.gz. However, since file extensions with periods in them can sometimes cause problems, the extension
.vgz is used instead.
So what does it all mean? This: A
.vgz file is just a compressed
.vgm file, and by uncompressing it we can get back the original
.vgm file for use in our SGDK projects!
How To Convert VGZ to VGM
It’s a simple two step process:
- Rename the
.vgzextension of your desired file to
.vgm.gz, so that you end up with a filename like
- Open the renamed file in your favorite file archiver program (Winrar, Winzip, 7zip…) and extract the
.vgmfile contained within.
And that’s it! Now you can easily turn all those VGZ files into regular old VGM files. I guess it’s not even really a conversion, but it’s a neat trick that I only found out about recently myself, so I wanted to share it!
If you've got problems or questions, join the official SGDK Discord! It's full of people a lot smarter and skilled than me. Of course you're also welcome to just hang out and have fun!
Take It to the Next Level!Become an excellent patron on Patreon and snatch yourself some kickass perks such as early access, early builds, exclusive updates and more!
You will also be added to the Wall of Excellent People!
Check out the rest of this tutorial series!