- Due to its effects in some S3, S&K and S3D songs, I undid the following bugfix:
- [bugfix] original S3/S&K/S3D driver could not correctly handle playing the sequence "<note>, <duration>, $80, <duration>, <duration>", and would play <note> again instead of a rest.
- S1 and S2 songs that were affected by the previous change got a new version that explicitly puts a $80 before the duration of each rest;
- The "_spms2asm_inc.asm" file now handles the differences in modulation flags that are explained in http://forums.sonicr...t&p=669694]this post[/url] by ValleyBell;
- I have made a release of the SMPS2ASM tool.
For the SMPS2ASM tool, I am providing a Windows binary; for those of you that don't use Windows, I am also providing the source code; it is bundled with the source code of my S2 Special Stage editor, which you can nab here.
Edit: v2 is out. Now includes S3's B2/B3 DAC samples and corrects the Sonic 3 Miniboss and Knuckles songs to use it. Also features the ASM'ed version of the credits medley from Sonic 3 Collection prototype 0517.
Original post follows:
As I have been saying elsewhere, I have written a tool that converts a binary music or SFX file (in SMPS format) to an 'universal' ASM format. I was planning on releasing this some two weeks ago; the delay comes about as a result of having to find and fix sound driver bugs, followed by illness; so sorry about that.
The original idea for this kind of tool is Cinossu's (see his utility); I just made a better one that handles songs and SFX from Sonic 1, Sonic 2, Sonic 3, Sonic & Knuckles and Sonic 3D Blast. I will not be releasing the tool just yet: when I started writing it, I had no idea that the SMPS formats (coordination flags, mostly, but also DAC samples) changed so much between Sonic 1/2 and the others; I hacked them in, but my intention is to rewrite the tool so support for any given game is simply a matter of pointing it to a text file containing definitions.
But there is no reason people should be denied the fruits of it; specifically: this file. (edit: updated link) The contents are:
- All songs, SFX and DAC samples* from Sonic 1;
- all songs, SFX and DAC samples* from Sonic 2;
- all songs, SFX and DAC samples** and SFX from Sonic & Knuckles;
- all songs and DAC samples** from Sonic 3D Blast;
- all songs and DAC samples** from Sonic 3 that are not identical to songs from Sonic & Knuckles;
- _smps2asm_inc.asm, a file that does the bulk of driver conversion;
- 'Z80 Sound Driver.asm', a modified and improved version of the Sonic & Knuckles driver;
- all DAC samples from Sonic 2 (of which the Sonic 1 samples are a subset), Sonic & Knuckles and Sonic 3D Blast.
The included sound driver has tons of changes and fixes compared to the SVN version (some of which I will eventually optionally backport to SVN). They include:
- [enhancement] You can select which DAC groups to use;
- [enhancement] added a coordination flag for setting the tempo divider of a single track;
- [enhancement] added a coordination flag for setting note fill in the same way it is done in Sonic 1/2 drivers;
- [enhancement] added a coordination flag to send an FM command to the correct port (from Ristar);
- [enhancement] added all PSG tones (actually volume flutter) from Sonic 1/2 (the Sonic 1 flutters are a subset of the Sonic 2 flutters);
- [enhancement] removed unnecessary padding between songs;
- [bugfix] original S3/S&K/S3D driver could not correctly handle a rest followed by a 'no attack' coordination flag, followed by a note;
- [bugfix] fixed incorrectly handling of flag to set PSG noise (mainly, interactions with overriding SFX);
- [bugfix] original S3/S&K/S3D driver could not correctly handle playing the sequence "<note>, <duration>, $80, <duration>, <duration>", and would play <note> again instead of a rest.
As of this time, the driver is a drop-in replacement for the S&K disassembly; in the future, I will make edits to kram1024's tutorials to use this driver in Sonic 1 or Sonic 2 (unless kram1024 comes back and does it, as we were talking about before he disappeared).
The _smps2asm_inc.asm file is based off of one from Cinossu's tool; I revamped it and updated it to perform the bulk of the conversion. It handles different pointer formats, different IDs of DAC samples, handles the 12-semitone (1 octave) difference between PSG notes in S1/S2 versus S3/S&K/S3D, and does the bulk of coordination flag conversion. While this makes it trivial to convert songs and SFX in general, converting to Sonic 1 or Sonic 2 drivers is a lot harder (unless you are converting from Sonic 1 or Sonic 2) due to the lack of necessary coordination flags.
Please feel free to ask any questions that aren't clear after looking around in the driver (or which I failed to convey in this message...).
* = Sonic 1's DAC samples are a subset of Sonic 2's DAC samples.
** = Sonic 3's samples are a subset of those from Sonic & Knuckles. Sonic 3D Blast samples are composed of $1D out of the first $1E DAC samples from Sonic & Knuckles, plus two unique samples.

