Page 1 of 1

VGM player

Posted: Sat May 21, 2011 1:58 pm
by mic_
I decided to write a VGM player for the Gameboy.

You can download it and the source code here
And you can see/hear it in action here

It obviously doesn't cover all the chips supported by the VGM format. Only the SN76489 is emulated (used in Sega Master System and Game Gear).

Since the waveform channel on the Gameboy only has 4 different volume settings it'll probably sound weird in some songs. Loading new waveforms dynamically to simulate 16 volume settings didn't seem like a good option.

Posted: Sat May 21, 2011 4:23 pm
by tokumaru
"The system cannot execute the specified program."

Really? Is this a .NET thing?

Posted: Sat May 21, 2011 5:59 pm
by Hamtaro126
tokumaru wrote:"The system cannot execute the specified program."

Really? Is this a .NET thing?
It also may be that it's not 32/64-bit, I'll test it later.

Posted: Sat May 21, 2011 11:51 pm
by mic_
tokumaru wrote:"The system cannot execute the specified program."

Really? Is this a .NET thing?
Nope. Regular C++, and it's 32-bit.
It's compiled with Visual Studio 2008, so the only thing I can think of right now is that you're missing the correct RTL (msvcrt90.dll).

Posted: Sun May 22, 2011 12:58 am
by Banshaku
I have VS2008 and it's not working. Could the uploaded file be corrupted?

Posted: Sun May 22, 2011 1:26 am
by mic_
Could the uploaded file be corrupted?
Not unless winrar corrupted it when I zipped everything. The same exe is working fine on my machine (running 32-bit Vista). I can upload a new archive later, along with the source of the tool.

Posted: Sun May 22, 2011 3:15 am
by mic_
Ok, I made some fixes to the player. I also recompiled the tool with VS2005, and it's now statically linked against the RTL. The source code for the tool is now included as well.

Download link
Youtube video

Posted: Sun May 22, 2011 8:47 am
by tokumaru
I still couldn't run the EXE after installing the runtime files... Will try the new package now!

EDIT: Still the same error. This is really weird... I'll try it on my other PC sometime.

Posted: Sun May 22, 2011 9:48 am
by mic_
I checked the latest exe (the one from dmvgm-2.zip) with DependencyWalker, and it only listed MSVCR80.DLL and KERNEL32.DLL.

Here's what VS puts in the manifest when it builds the program:

Code: Select all

    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.4053' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
That's the only dependency in the manifest.

EDIT: I added the exact DLL I'm using to the archive. Download here

Posted: Sun May 22, 2011 10:04 am
by thefox
mic_ wrote:I checked the latest exe (the one from dmvgm-2.zip) with DependencyWalker, and it only listed MSVCR80.DLL and KERNEL32.DLL.

Here's what VS puts in the manifest when it builds the program:
I'm pretty sure you also have to include the file "Microsoft.VC80.CRT.manifest" in the release.

Posted: Sun May 22, 2011 10:14 am
by mic_
thefox wrote:
mic_ wrote:I checked the latest exe (the one from dmvgm-2.zip) with DependencyWalker, and it only listed MSVCR80.DLL and KERNEL32.DLL.

Here's what VS puts in the manifest when it builds the program:
I'm pretty sure you also have to include the file "Microsoft.VC80.CRT.manifest" in the release.
Alright. Added all of those files and re-uploaded

Posted: Sun May 22, 2011 11:03 am
by tokumaru
Ah, it finally worked! It's pretty interesting to listen to SMS songs on the GB! Some songs end up losing important channels, but it's still very cool!

Posted: Sat May 28, 2011 9:32 am
by B00daW
I don't know how well this would work for volume slides, but you could have a table of different height pulse waves for the other pulse channel via the GB WAV channel.

Good work. :)

Posted: Sat May 28, 2011 12:08 pm
by mic_
Already tried that. It sounded awful. :P