SMPS Porting Guide (my method)

yami

my profile picture is so true
Member
Messages
3

yami’s SMPS Porting Guide (Simple)


I’m gonna be porting a song from the Treasure (Dynamite Headdy) sound driver to Sonic 1’s sound driver which won’t be that hard, because both drivers are on the 68k, and not on the Z80 like Sonic 3 and Knuckles, or (for example) The Hybrid Front.

Step 1: Finding your music and/or necessary info.​

What I do when I’m trying to port music is find a game’s music folder in SMPSPlay, and then listen to the music from the application, then once you find a song you like, note down the song's filename and copy it. I’m gonna be using Bishoujo Senshi Sailor Moon’s Unused song (Sound Test 04), which is also going to be in my Sonic 1 hack. The filename is “04 Unused.tra”

Usually, in the SMPS Research Pack, the SMPS type is signified by its extension, like how Sonic 1’s specific SMPS music has the .smp extension, or how Sonic 3 and Knuckles’ music has the .s3k extension. However, the other SMPS types use a different naming system corresponding to their driver type, which are:

Treasure (68k Type 2b) - .trs
Treasure with S3K Tempo - .tra
68k Type 1a/b - .mmw
68k Type 2a/b - .trs
Z80 Type 1 - .smy
Z80 Type 2 - .smz
Ristar - .rst
Outrunners (stripped down S1) - .ors

Step 2: Converting the song to assembly.​

Now open your MDMusicPlayer folder, and paste the music file in the “music” folder. Now inside the “bin” folder, open the exe called “smps2asm.exe”. This will open a window where you’ll see 3 bars that say:
Music file name with extension:
Sound driver folder name:
Project name:
What you want to do here, is in the filename window, copy and paste the filename with the extension into the top bar. Mine is “04 Unused.tra” Next, you’re going to have to type the name of the driver that the music is from. Since mine uses the Treasure driver, I’d choose DyHe. However, when porting other songs, make sure to read the “DefDrv.txt” in the corresponding folder from the SMPS Research Pack. Now, you need to come up with a project name. It could be anything, as long as it doesn’t start with a digit and only contains alphanumeric characters.

Music file name with extension: 04 Unused.tra
Sound driver folder name: DyHe
Project name: [Insert ProjectName]

After you’re done setting the stuff up, press enter, and then you should see some lines that say something along the lines of:
Parsing script...
Script translated! Took XX ms!
Parsing [Insert ProjectName]_FM1 at $XXXX...
Parsing [Insert ProjectName]_FM2 at $XXXX...
Parsing [Insert ProjectName]_FM3 at $XXXX...
Parsing [Insert ProjectName]_FM4 at $XXXX...
Parsing [Insert ProjectName]_FM5 at $XXXX...
Parsing [Insert ProjectName]_PSG1 at $XXXX...
Parsing [Insert ProjectName]_PSG2 at $XXXX...
Parsing [Insert ProjectName]_DAC1 at $XXXX...
Parsing [Insert ProjectName]_Patches at $XXXX...
File converted! Took XX ms!
File saved to disk! Took XX ms!
Conversion done! Took XX ms!

If not, that most likely means that you did something wrong, and should check your name/file setup. Make sure that the Music/Sound Driver is called for correctly in the program, as I had that issue a few times when I was going through with this process at an earlier time.

Step 3: Including the song in an MD Music Player ROM.​

After converting a song, I like to make sure it’s included in the MD Music Player files so that I can listen to it, and make sure that it sounds about right to how I want it to sound.

You can do this, by modifying the names in the “music.asm” file to be something like:
SMPS asm Driver "Filename without extension" "Game Name" "Song Name" 68k or z80

Mine for the example song looks like:
SMPS asm MegaPCM "04 Unused" "Bishoujo Senshi Sailor Moon" "Lost Labyrinth 2" 68k

If I remember correctly, up to 28 characters can show on one line in the unmodified MDMusicPlayer ROM, so be careful about the number of characters you use if you want them all to show correctly.

Step 4: Tweaking the song through code.​

One of the first things you’ll notice is that when you go to build the song, there will be some errors about the DAC channel. This is common since the drum samples are not guaranteed to be the same between each game. However, for most games, the DAC will usually be like this:

81 - Kick
82 - Snare
83 - Timpani/Tom
84 - Clap/Scratch

If you’re curious about the DAC samples from the MD Sonic games, Sonic Retro has a table that has the DAC Sample info for them.

My process for the example song would be:
d81 > dKick
d82 > dSnare
d83 > dHiTimpani
d84 > dMidTimpani
d85 > dLowTimpani

That’s it for DAC editing because the song only uses those samples (which safely use Sonic 1’s DAC without having to add new ones)

Now, you’ll also notice that you get an error about there not being an “m02” which is a PSG modulation envelope. If you want to port those, by all means, go ahead but I don’t know how to port those yet. What I did on my port was replace the 02 with a 00, effectively getting rid of the check for the modulation envelope.

The last thing is to pitch down the PSG an octave for the correct sound. Some hacks did this, and some didn’t. However, this is very simple. Just add a “-$0C” after the first numbers.

It should look something like this:
sHeaderPSG [Insert ProjectName]_PSG1, $E8-$0C, $07, m00, v00
sHeaderPSG [Insert ProjectName]_PSG2, $E8-$0C, $06, m00, v00

That’s it! Your song should be done!​

It should sound like this, of course with the stock Sonic 1 DAC samples instead of the Cosmic Carnage ones…

If you know anything else, please feel free to share your knowledge!
This might also go hand in hand with the FM Voices/Instruments thread!
 
Last edited:
Back
Top