Jump to content
Sign in to follow this  
Tursi

VGM Compression Tool

Recommended Posts

Unrelated to the above, though good timing, I updated the archive for the compressor with a port of the old 'quick player' tool - you can now run a Windows program and use it to load a compressed VGM (SPF) format , and it will spit out an EA#5 program for emulation or hardware.

 

  • Like 4

Share this post


Link to post
Share on other sites

I've been working on the update to this compressor when I can, as per the top of my todo list. 

 

At the moment, I've finished the suite of VGM importers that I'll be supporting: PSG, AY-3-8910, Gameboy, Atari Pokey, and NES. Now the easy stuff is done so I need to actually write the compression part and players. ;)

 

But, since I also have an ID tool and a test player, I thought I'd do a quick stream with the progress so far. I demonstrate converting from all of those:

 

AfterBurner (Master System - PSG)

Tetris (Arcade - Pokey)

Contra (Gameboy)

Street Fighter (Gameboy)

Mega Man 2 (NES)

Mr Robot (Atari 8-bit - Pokey)

Punch-Out (Arcade - NES)

Journey to Silius (NES)

Super Mario Bros 3 (NES)

Super Mario World (Gameboy)

Tetris 2 (Arcade - Pokey)

TMNT (Gameboy)

Time Pilot (Arcade - AY-3-8910 x2)

Vampire Hunter (Arcade - PSG /and/ AY-3-8910)

Wonder Boy (Arcade - PSG x2)

 

For the most part, they convert okay. SMB3 needs a little external tuning on the DMC channel (or just drop it). Good enough to start with anyway.

 

 

(Might need a high res display to read it, apologies).

 

Eagle eyes will observe that not all of the tunes can be played on the TI PSG - my intent here is to break the process into smaller pieces to improve the flexibility a bit, and reduce the complexity of maintenance. Each converter's job is just to extract the data and write out tracks that are more or less compatible with the TI PSG. This means simulating the envelope and sweep hardware (where it exists), splitting out noise and tone (where they are shared), and so forth. This, along with the possibility of multiple chips in the VGM, can lead to more channels than we can play.

 

The intent is to have a set of tools that are used between the initial conversion and the compression to tune the data - whether it is shifting frequencies, adjusting volumes, or combining channels. In addition, the intermediate format is simple text files, easily edited. Removing an unwanted channel is just deleting the file.

 

The testplayer is thus a TI sound chip without limits - any number of channels of any type, and no bass tone restrictions, so you can test your progress at each step.

 

Further to that, this allows the flexibility of outputting for multiple sound chips - like say the FourTI. ;)

 

The compression tool is next and that's where I'll see if the notes I took are any good. I'm aiming for less CPU usage with at least comparable compression by changing up the timestream concept a bit.

 

Anyway, just wanted to share now that I've finally had a little time for code. ;)

 

  • Like 7

Share this post


Link to post
Share on other sites

I'm looking forward to trying this. How are you converting the NES DPCM samples?  What does the file format look like?  It might be fun to try a few samples with my own compression tools.

Share this post


Link to post
Share on other sites

This is really exciting news!  I for one am totally psyched about the possibility of playing chiptunes from all those different systems on the TI!  I was actually in touch with Tursi just a month or so ago about this very thing.  He was kind enough to get me up and running with his .VGM quick player (which he actually created at that time as I was still using his older/now obsolete EPSGMOD quick player which was much more limiting on the size of the music files it could play).  The new quick player is great and seems to handle anything I throw at it size wise.  I built up quite a collection of Sega tunes and they sound great coming out of real iron!  I couldn't stop there though--I knew Tursi was working on a NES playback routine but I was impatient and started converting .NSF files to .VGM by copying the data out of FamiTracker and pasting into a SN76489 compatible tracker.  The results are not perfect and vary from track to track but some music actually came out pretty decently using this method.  Especially music from the Mega Man series--all that stuff sounds great, almost like the original and does not suffer too badly on the SN76489.  I even converted some Gameboy stuff using this same method.  Some of that stuff sounds amazing too, other times certain tracks have bizarre tuning issues I haven't worked out yet.

 

But I only did all this cause I didn't actually think Tursi would get around to updating his routines anytime soon.  Let alone include support for Gameboy, Atari and MSX! :)   I can't wait for the converter as it totally antiquates my previous method, firstly by simulating envelopes etc. which my method has no provision for, but also automating the entire process (no more endless copy and pasting)! :) 

 

Also I like the idea of that testplayer outputting for different sound chips other than just the TI's.  I have a good few vintage computer systems and chiptunes are an interest for me across the board.

 

Share this post


Link to post
Share on other sites
21 hours ago, PeteE said:

I'm looking forward to trying this. How are you converting the NES DPCM samples?  What does the file format look like?  It might be fun to try a few samples with my own compression tools.

I'm not.. they are just played as either noise channel or tone channel with an averaged volume. It's the same thing my MOD converter does. This works really well in Journey to Silius, pretty much not at all in Super Mario 3. ;) My VGM player is a 60hz format, so samples are a non-starter.

 

Share this post


Link to post
Share on other sites
8 hours ago, ruthven said:

But I only did all this cause I didn't actually think Tursi would get around to updating his routines anytime soon.  Let alone include support for Gameboy, Atari and MSX! :)   I can't wait for the converter as it totally antiquates my previous method, firstly by simulating envelopes etc. which my method has no provision for, but also automating the entire process (no more endless copy and pasting)! :) 

 

Also I like the idea of that testplayer outputting for different sound chips other than just the TI's.  I have a good few vintage computer systems and chiptunes are an interest for me across the board.

 

It's still going to be a while - I have a lot left to do. But this has been years coming in my eyes. ;)

 

The Testplayer is still a TI sound chip, I only removed the limitations. The idea is to come reasonably close to the final - the noise frequencies will possibly shift, and the number of channels will be restricted, but otherwise the data is already in TI PSG format. The expanded capability makes it easier to test the results of various conversion options one step at a time, without needing to go all the way to the end product.

 

Also, there aren't very many Pokey files in VGM format - at least not at VGMRips.net. And fewer NES than I expected - NSF is still the dominant format there. But one step at a time.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...