Neo TeAm Forum

NEO Team's Project for the PC-Engine => NEO Power PC-E Flash Cart => Topic started by: mic_ on July 25, 2010, 07:28:04 PM

Title: VGM to HES converter
Post by: mic_ on July 25, 2010, 07:28:04 PM
After I had written my SNES VGM player I was thinking that it shouldn't be that hard to write a playback library for the PC-Engine as well, since the PCE PSG is a wavetable synth just like the SPC.
So a couple of days ago I started writing a HuC6280 version of the playback library, and a utility program that splits VGM files into 32kB banks and combines them with the player into a HES file (the format used for PCE music rips. You can play them in winamp with nezplug++, or in an emulator like mednafen).

Now the first version is finished and available for download (http://jiggawatt.org/badc0de/vgm2hes-1.zip).
The playback source code is included in the zip.
Title: Re: VGM to HES converter
Post by: Conle on July 25, 2010, 08:01:42 PM
 :P
Great work!!   :D
Title: Re: VGM to HES converter
Post by: mic_ on July 26, 2010, 03:59:37 AM
And here it is running on an actual TurboGrafx:  http://www.youtube.com/watch?v=CBJOw0KyXJ8
Title: Re: VGM to HES converter
Post by: Conle on July 27, 2010, 12:05:05 AM
Just posted it on the news page  :D

ps -- The next player is going to be for GB/GBC ?  :)
Title: Re: VGM to HES converter
Post by: mic_ on July 27, 2010, 12:30:45 AM
Quote
ps -- The next player is going to be for GB/GBC ?
Who knows. It wouldn't be that difficult to do a VGM player on the Gameboy. But I've got a few other projects that I'd like to work on before that.
Title: Re: VGM to HES converter
Post by: Conle on July 27, 2010, 01:33:25 AM
Who knows. It wouldn't be that difficult to do a VGM player on the Gameboy. But I've got a few other projects that I'd like to work on before that.

Cool  8) , i'll have my gb/gbc flashcart ready when that time comes   ~sm-42.gif~
Title: Re: VGM to HES converter
Post by: mic_ on July 28, 2010, 04:01:22 AM
I've released an updated version (http://jiggawatt.org/badc0de/vgm2hes-2.zip) that can generate .PCE files that you can put on a flash card and run on a real TurboGrafx/PC-Engine.  The command to use is vgm2hes -pce filename.vgm filename.pce
Title: Re: VGM to HES converter
Post by: markwolfe on December 23, 2010, 07:57:37 AM
I tried to get a music file to run on the LT using the flash card and it did not work, I noticed a lot of roms with just the music, I have not tried yours though.

how hard would it be to make a player that would trigger the sounds independently using the controller buttons and allow the selection of which track to play with the directional pad? for that matter a tracker program as we discussed in private message.  I got your email so we'll talk more about this but even if we had something that could trigger the individual sounds in a game sounds file, that would be a great thing.
Title: Re: VGM to HES converter
Post by: mic_ on May 21, 2011, 05:41:41 PM
Quote
ps -- The next player is going to be for GB/GBC ?

Said and done: http://www.youtube.com/watch?v=16RwIPPifJc (http://www.youtube.com/watch?v=16RwIPPifJc)

No download yet.
Title: Re: VGM to HES converter
Post by: mic_ on May 22, 2011, 05:59:01 AM
Here's an archive (http://jiggawatt.org/badc0de/dmvgm-1.zip) containing the Gameboy VGM player + source code.
Title: Re: VGM to HES converter
Post by: ChillyWilly on May 22, 2011, 08:08:58 AM
Good stuff! These music players of yours are really ice.  ;D
Title: Re: VGM to HES converter
Post by: mic_ on May 22, 2011, 06:19:07 PM
An updated version of the Gameboy VGM player is here (http://jiggawatt.org/badc0de/dmvgm-2.zip)
Source code for the vgm2gb tool is now included as well, and should hopefully compile on Linux/OSX (with some minor changes).

Youtube video (http://www.youtube.com/watch?v=gx7bho3-6S4)
Title: Re: VGM to HES converter
Post by: Conle on May 23, 2011, 02:12:55 AM
This is epic  8)
I'll have to try it on my gb/gbc  :D

Edit : By the way , when you get the chance , create a proper release thread(in the offtopic section for example) so that i can post it on the news page  ~sm-42.gif~
Title: Re: VGM to HES converter
Post by: Conle on May 23, 2011, 02:32:36 AM
Source code for the vgm2gb tool is now included as well, and should hopefully compile on Linux/OSX (with some minor changes).

Here's how to compile it on linux :

0.Make sure that you have the latest zlib development libraries (should be installed by default anyway)

Now , open up main.cpp and do the following changes :

1.Include extra headers:
Code: [Select]
#ifdef UNIX_BUILD
#include <stdio.h>  //fopen
#include <string.h> //strlen
#endif

2.Wrap fopen_s :
Code: [Select]
#ifdef UNIX_BUILD
int fopen_s(FILE** handle,const char* filename,const char* modes)
{
*handle = fopen(filename,modes);
return *handle != NULL;
}
#endif

3.Finally compile the tool and pack stuff!:
Code: [Select]
g++ -DUNIX_BUILD main.cpp -lz -O2 -o tool
:D