Try to bear with me here, because this might be kind of a long one. I recently discovered something strange, and immediately I knew I had to discuss this with other, perhaps more knowledgable, SNES music nerds. It's bothering me so much, I created an account here just so I could get to the bottom of this.

Now, I've never dabbled in dumping or otherwise creating SPCs myself, but I have an intense fascination with SNES music, creating authentically SNES-sounding music, and analyzing existing SNES music. Sometimes I like to like to convert SPC files to IT format using OpenSPC, so I can use OpenMPT to pick apart the song, play with its samples, etc.

Recently I discovered the game Tin Star, and instantly fell in love with its soundtrack. I knew I had to pick apart some of its music and see how it's put together, so the first thing I did was convert the title theme to IT. Right away I knew there was something kind of strange; 13 samples, most of them rather long and/or high in quality. I created a separate IT file that contains just the samples and a minimal amount of actual song data, and was dumbfounded. 172 kilobytes. There's no way that could be right! Never had I seen a single SPC with this much sample data. Even games generally considered to have high sample quality like Super Mario RPG or Plok never exceeded 100kb of sample data in one track, at least not in my findings.

So let's look at what I know, or at least think I know:

The SPC700 chip has a 64kb memory map, but only half of it can be actually used by the SNES. This leaves us a ceiling of 32kb of sample data per song.

The compression format used by the SNES compresses samples to about 28% their uncompressed size.

Some SNES games use techniques such as streaming to get more samples into one song, but these unusual uses of the chip are not dumpable to SPC files.

Never have I ever seen Tin Star on any list of games considered problematic for SPC dumping.

All this means a single track could, theoretically, contain a maximum of 114kb of uncompressed sample data and still be dumpable to SPC. So how the hell does Tin Star get away with having ~172kb of decompressed sample data in its title theme? I haven't examined any of the other game's tracks closely, but seeing as they sound like they use many of the same samples, they probably follow suit.

The SPC700 chip has a 64kb memory map, but only half of it can be actually used by the SNES. This leaves us a ceiling of 32kb of sample data per song.

That's a false statement. The entire 64KB is used by the SPC700, and the SNES's communication with the SPC700 is mainly through a series of four ports (when the SPC700 program is configured correctly, it still means you can access the entire 64KB for modifying).

It's up to each game to determine how much memory to allocate for their sample packs.

What you should really look at is the Lion King. That game uses sample swapping for its music... and I managed to hack the entire thing to get all the samples in there at once (although I had to overwrite SFX in a few cases)! The songs that use sample swapping are Can't Wait to be King, Be Prepared, King of Pride Rock, Under the Stars and Hoo Hah.

For extra points, try looking at NBA Live '95 and '96 (yes, I know you'll get first-note sticking problems... but I still get to rip samples despite the fact that you won't be getting any music). These games take sample usage to the max (which is exactly why they stream their music data).

Plastiware wrote:

The compression format used by the SNES compresses samples to about 28% their uncompressed size.

What are you using as a base (as in the original sample)? I usually see compression rates as being 9:16 (assuming a 16-bit sample is used), and sample rates do not factor into this conversion at all (and 8-bit and 16-bit samples do not affect this compression... for 8-bit samples, you actually get 9:8).

If you're using a 32-bit sample, then yes, a compression ratio of 9:32 would be a correct assumption. However, I made that mistake originally when starting out... and the conversions resulted in a memory overflow. Thus, I revised to 9:16, and got off much better.

_________________Just consider me your friendly SPC dumper. Also a bit of a perfectionist (though not too literally)... I make sure my dumps are at the first note. I might even hack away the SFX if needed.

Want a music modifier for a particular SNES game? All you need to do is ask via PM (or you can check out the Music Modifiers topic and post there) and I'll be on the job. ^_^

Thanks! I've learned so much today! Still, if the SNES can use all 64kb of the SPC700, and sample compression is 9:16, that still factors out to a theoretical 114kb sample limit. Any idea how Tin Star does it? All the game's SPC files are still only 65kb like all SPC files.

Maybe what you really need to look at is the actual sample length rather than just the kilobytes (I use Schism Tracker, meaning I have an easy way to estimate this). At 32khz (32,000 "samples" per second), with all samples and no other data, you've got about 3.64 seconds of samples to put in there (that's about 116,500 "samples" total).

Oh... and if you're looking at multiple .spc files for Tin Star, then I've solved part of your problem. Tin Star has two sample packs when it comes to music at the very least: one for the Title Screen, and one for the rest of the game.

This is because I have this lovely music modifier on hand (I will admit I should re-investigate these games that use the Software Creations sound engine, as some of these games have been throwing me curveballs when it comes to sub-tunes):

Tin StarTitle Screen Music ModifierSample Pack ~ 80BB4AxxMusic ~ 80BB51xxFirst thing's first: both of these values must be divisible by 02. Now then...The game crashes before 44.44-46 have no real association with the music and thus are not recommended.Sample pack 48 supports 4C.Sample pack 4A supports 4E-60.The game crashes after 60.

This is another way of handing all of the music and the samples: simply have the required samples loaded on a per-music basis, and then load in the music and play it. Some games have multiple songs per bank, while others do it all in one.

_________________Just consider me your friendly SPC dumper. Also a bit of a perfectionist (though not too literally)... I make sure my dumps are at the first note. I might even hack away the SFX if needed.

Want a music modifier for a particular SNES game? All you need to do is ask via PM (or you can check out the Music Modifiers topic and post there) and I'll be on the job. ^_^

Isn't the amount of memory counted for everything on the audio side, including the sound driver and the buffer used for reverb/echo? Then you would need to allocate some of the memory to those as well and not just the samples. I remember reading one interview with a SNES composer (the amount of SNES composers who go into detail on technical explanations seems really scarce compared to other systems. It's a shame.) said he had around 55kb or so for samples when counting the sound driver used.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum