Post by sega16 on Jun 30, 2011 19:02:58 GMT -5
This tutorial covers two important topics:
1. How to add the SMPS driver to your BEX program
2. Converting FastTracker II Modules to SMPS songs.
Part One: Adding SMPS to your BEX program:
Step One:
Download the 7z archive and extract it.
Next more all directories except the Xm3smps_3.6 directory into either:
Or
Mirror 1:
nofile.io/f/7Jo3JjKODrp/SMPS.7z
Mirror 2:
www90.zippyshare.com/v/YQ3ySGVt/file.html
MD5 Checksum: 88b96e48b03457097c4b472abeac2e93
SHA512 Checksum: 398fea3e132a5b49f8aca57af78d2d5dc5f6a00a21b0e05d63ff96119bd19085840be787da2ca20ffdf3e68bd71b540d6a33085e502a1bae66e61a3e59976c27
Step two:to use SMPS to your code just add this:
and then add this at the bottom of your code
step 3: playing music
To play music just do:
Replace #$02 with the ID of the song. If you don't like using Hexadecimal remove the $.
Also another great feature of SMPS is that you can play sound effects
for example
Step 4: Importing your own song
There is a good chance that the file you want to convert will not work out of the Box using XM3SMPS. To convert it or modify it to be suitable for XM3SMPS download the latest version of OpenMPT from: openmpt.org/download
once you got the (whatever format OpenMPT tracker accepts) loaded then open it up into mod plug tracker then select xm
and get rid of all the unused channels. For the most part the removal of unused channels is done automatically for your but you may find instances where the composer choose to dedicate a channel to simple tasks such as setting the Tempo at the beginning of the song. This can be merged with a used channel without any side effect.
It is likely that the composer did not have the limitations of the Sega Genesis in mind. I find that many composers leave different channels unused during different parts of the song because it is easy to dedicate a channel to an instrument. We may need to re-arrange which channel notes are because of the following limitations:
you can only have 6 FM channels or 5 if you are using DAC (drums/samples)
also you can only have 3 PSG channels or 2 if you are using hats/psg noise
once you have written in the channels notice the play the music file and then the tempo (at the top toolbar will change then go to were it says initial settings and change that tempo.
Now load the xm in the converter
And select auto-fill and then click on calculate tempo and select the closest tempo (this is why I made you correct the initial tempo)
now fill in the correct voices
also for dac assuming you are using the same dac sample here is a table of what dac value does what
81= kick
82=snare
83=some cowbell sounding thing
84=handclap
85=cymbal
86=hat sounding /ride cymbal (it makes a good ride cymbal)
87 hi hat closed
88 open hi hat
Now look at the interments in mod plug tracker and add a voice or fm instrument to xm converter
ONLY ADD THE ONES USED IN THE FM CHANNELS
now assign the voices and the DAC and hats to go with the xm instruments
Also to save memory were it says DAC check remove rest
Now click convert and you will now have a smps file
Step 5:Add the song to your game
little note on the pointers
there are 3 different places to put the pointer
here: on this it will go from 01 to 80 IN HEX
or here will go from 81 to 9F
or finally here which goes from E5 to FF
also anything from A0 to E4 are sound effects
but E4 will mute the music
anyway lets say the last song on MusicIndex00 is
you would add
to the end
then you would search for music53 and find something like:
and then copy paste that and change it to something like this:
Thank you for reading my guide if it works great or you can not get it to work or if you have any questions please make a reply. Also if you use this I would love to know!
1. How to add the SMPS driver to your BEX program
2. Converting FastTracker II Modules to SMPS songs.
Part One: Adding SMPS to your BEX program:
Step One:
Download the 7z archive and extract it.
Next more all directories except the Xm3smps_3.6 directory into either:
C:\Program Files (x86)\basiegaxorz
Or
C:\Program Files\basiegaxorz
Mirror 1:
nofile.io/f/7Jo3JjKODrp/SMPS.7z
Mirror 2:
www90.zippyshare.com/v/YQ3ySGVt/file.html
MD5 Checksum: 88b96e48b03457097c4b472abeac2e93
SHA512 Checksum: 398fea3e132a5b49f8aca57af78d2d5dc5f6a00a21b0e05d63ff96119bd19085840be787da2ca20ffdf3e68bd71b540d6a33085e502a1bae66e61a3e59976c27
Step two:to use SMPS to your code just add this:
asm
jsr LoadZ80drv
end asm
on vblank gosub vint
enable interruptvblank
and then add this at the bottom of your code
vint:
disable interruptvblank
asm
movem.l d0-a6,-(a7)
jsr Z80Process
movem.l (a7)+,d0-a6
end asm
enable interruptvblank
return
asm
include "smps\smps_every_song.asm"
include "asm\PCM_Samples.asm"
end asm
step 3: playing music
To play music just do:
asm
move.b #$02,d0
jsr PlaySound
end asm
Replace #$02 with the ID of the song. If you don't like using Hexadecimal remove the $.
Also another great feature of SMPS is that you can play sound effects
for example
asm
move.b #$B0,d0
jsr PlaySound
end asm
Step 4: Importing your own song
There is a good chance that the file you want to convert will not work out of the Box using XM3SMPS. To convert it or modify it to be suitable for XM3SMPS download the latest version of OpenMPT from: openmpt.org/download
once you got the (whatever format OpenMPT tracker accepts) loaded then open it up into mod plug tracker then select xm
and get rid of all the unused channels. For the most part the removal of unused channels is done automatically for your but you may find instances where the composer choose to dedicate a channel to simple tasks such as setting the Tempo at the beginning of the song. This can be merged with a used channel without any side effect.
It is likely that the composer did not have the limitations of the Sega Genesis in mind. I find that many composers leave different channels unused during different parts of the song because it is easy to dedicate a channel to an instrument. We may need to re-arrange which channel notes are because of the following limitations:
you can only have 6 FM channels or 5 if you are using DAC (drums/samples)
also you can only have 3 PSG channels or 2 if you are using hats/psg noise
once you have written in the channels notice the play the music file and then the tempo (at the top toolbar will change then go to were it says initial settings and change that tempo.
Now load the xm in the converter
And select auto-fill and then click on calculate tempo and select the closest tempo (this is why I made you correct the initial tempo)
now fill in the correct voices
also for dac assuming you are using the same dac sample here is a table of what dac value does what
81= kick
82=snare
83=some cowbell sounding thing
84=handclap
85=cymbal
86=hat sounding /ride cymbal (it makes a good ride cymbal)
87 hi hat closed
88 open hi hat
Now look at the interments in mod plug tracker and add a voice or fm instrument to xm converter
ONLY ADD THE ONES USED IN THE FM CHANNELS
now assign the voices and the DAC and hats to go with the xm instruments
Also to save memory were it says DAC check remove rest
Now click convert and you will now have a smps file
Step 5:Add the song to your game
little note on the pointers
there are 3 different places to put the pointer
here: on this it will go from 01 to 80 IN HEX
; ---------------------------------------------------------------------------
; Music Pointers
; ---------------------------------------------------------------------------
MusicIndex00:
or here will go from 81 to 9F
MusicIndex:
or finally here which goes from E5 to FF
MusicIndexFF:
also anything from A0 to E4 are sound effects
but E4 will mute the music
anyway lets say the last song on MusicIndex00 is
dc.l Music53
you would add
dc.l Music54
to the end
then you would search for music53 and find something like:
Music53: incbin "smps\Map - Holly Summit.bin"
even
and then copy paste that and change it to something like this:
Music54: incbin "smps\AustinPowers.bin"
even
Thank you for reading my guide if it works great or you can not get it to work or if you have any questions please make a reply. Also if you use this I would love to know!