Introduction
Hi there! I made this tutorial to replace the current tutorial for Romi's Addmusic. Although both builds are extremely similar, HuFlungDu's build has a few differences so I guess you're better off using this tutorial rather than the other...
Who is this tutorial for?
I have attempted to make this tutorial suitable for anyone in rom hacking. It should be useful for everyone who needs to know how to insert music. I have divided it in to easy to digest sections so people can easily find what they need to know.
Note, this tutorial may be fairly heafty but don't be put off by the walls of text. The process is actually very simple.
What you will need
You will need the following:
- An SMW rom (it doesn't matter if it's edited or uneditied, just as long as it hasn't had any other versions of Addmusic used on it or patched the MORE.bin/MORE.asm (also known as the N-SPC patch) externally)
- HuFlungDu's unofficial Romi's unofficial addmusic v4.05 rev 1.02 (obviously)
- Some custom music of your choice (we have a wide selection, feel free to browse around)
- Smkdan's SampleTool 2.0.0.5 (note: you won't need this unless your song uses samples, I'd advise you to work your way through the tutorial first before downloading this)
- A program that can open ZIPs (which I'll assume you have. If not, Google it)
- Your SMW hacking basics (such as Lunar Magic)
Getting compatible music
First you need to find some music to download. You'll notice that most of the music in the music section has a small info part at the top of the description. You could see the following types:
This is the new info part that people are encouraged to submit with their music now.
For this tutorial, there is one part you're interested in:
The Addmusic Compatibility should be marked with something like 'AM4' or 'Addmusic 4'. If it is marked with something like 'AMM' or 'Addmusic M' it will NOT work with Addmusic 4.05.
This is the classic (old) info part that was used before HuFlungDu's build was released. Some people still use it though. Usually the author will specify using an additional tag whether or not AddmusicM is required. If they have not specified that AddmusicM is required then the odds are the music will work with Addmusic 4.05.
Other songs will have no info part. You can assume that these will be compatible with Addmusic 4.05 unless otherwise specified.
Note: If the music specifies that sample banks are required then you will need SampleTool. A seperate tutorial can be found on the use of this tool. For practice purposes I'd advise you to use music that does not use sample banks.
Setting up Addmusic
By now you should have downloaded Addmusic 4.05 (either from the tools section or using the link I provided). Upon opening the zip you should see several files including folders such as 'OW', 'MISC', and 'LEVEL'. Extract everything from here into the directory of your SMW rom (so 'OW', 'LEVEL', and everything else are in the same folder as your rom and not in a sub folder).
You will also need a command prompt in the same directory to operate Addmusic. Most Windows users should be able to use CMD.exe which you can copy from your hidden files. (You will probably be able to find this in the directory C:\Windows\System32\, just find it in the System32 folder and copy it to your rom directory.
Tip: Always keep the command prompt and your Addmusic stuff handy incase you decide to make another hack and need this all in a different directory again.
Preparing your SMW rom for music insertion
This step is easy. First off you need to make sure that your rom has been expanded (I'd recommend to at least 2mb). If you've edited your rom in Lunar Magic at all it should have automatically expanded already. A clean rom is by default 512kb. If you find that your rom has not expanded already you can expand it manually in Lunar Magic (there is an option to expand the rom under Lunar Magic's 'File' menu).
Next I'd advise you to close down any programs that may be using your rom (such as any emulators or Lunar Magic).
Next, open CMD.exe (or whatever command prompt you're using) and input the following:
This will have inserted HuFlungDu's MORE.bin (N-SPC patch). This will allow you to insert songs that make use of certain hex commands.
Note: There must be no spaces in your rom's name or it wont work
Your rom is now prepped and you'll never have to use the -se command on it again.
Note: Even if your desired music does not make use of the N-SPC patch (or MORE.bin), I'd advise you to use the -se command anyway.
Preparing your music for insertion
Don't worry. We're nearly at the end of the preperation stages. Now, in the ZIP you downloaded your music, you should find a .txt containing the music code and a .spc. You may also find a .bnk if the song uses samples. These can be inserted with SampleTool (reminder: you'll have to look in a seperate tutorial for sample tool). You will want the .txt. The .spc will play back the song outside when it is opened in an SPC player (I recommend SPC700 which can be found in the Tools section). This is handy if you want to preview the music before inserting it. Open the .txt containing the code.
At the top of it you will most likely find one of two lines of 9 byte hex coding:
$ED $80 $6D $2B
$ED $80 $7D $00
$F0
or
$ED $80 $6D $68
$ED $80 $7D $00
$F0
These are what we call the 'AM4 Headers'.
(Note that these can be spaced differently (ie the entire 9 byte code could be on one line) such as $ED $80 $6D $68 $ED $80 $7D $00 $F0)
You may need to change (or in some cases add) this line of coding depending on whether you want the music in a level or an overworld map.
If you want the music in a level, paste at the top of the .txt
$ED $80 $6D $2B
$ED $80 $7D $00
$F0
If you want it on an overworld map, instead paste
$ED $80 $6D $68
$ED $80 $7D $00
$F0
IMPORTANT! DO NOT PASTE THE CODE MORE THAN ONCE OR PASTE BOTH CODES IN ONE .TXT! IT IS A WASTE OF ROM SPACE!
Yes that was so important it needed to be in bold, red text...
Once you've made sure it has the relevent header save it. Then put it in one of two folders. If you're inserting it as level music, put it in the folder labelled 'LEVEL'. If you're inserting it as overworld map music, put it in the folder labelled 'OW'
Note: In these folders you may notice a file called 'echofix.py'. Do not get rid of or move this file.
Insering the music
Next you have to open 'Addmusic.ini' which should be in the same directory as your rom. Here you will see headings such as '[OVERWORLD]' and, '[LEVEL]' and music slot numbers. Enter the name of your song (the .txt's name) in the desired music slot.
So say if I was inserting a .txt with the name 'Submap Song' to the overworld, I'd find a clean slot under the [OVERWORLD] heading and write its name there so for example it could read something like:
0A=Submap Song.txt
For another example, let's say I wanted to insert a .txt called 'Level Song' for a level, I'd find a clean slot under the 'LEVEL' heading and write its name there. This may read something like:
20=Level Song.txt
Once you've added your songs to 'Addmusic.ini', save your changes and close it.
Next, open CMD.exe (or whatever command prompt you have) and input
Note: When inserting overworld map music, you should replace 'LEVEL' with 'OW' in CMD.exe
You should have now sucessfully inserted your custom music. Check Lunar Magic. If your song name has appeared on the song list then congratulations! It's most likely a success! If not, read through the tutorial again and make sure you followed all the steps correctly.
Troubleshooting
I'll be honest. This tutorial is technically unfinished. I want you people to try it out and if you're having any problems, ask about it here. I will then add your question and a solution to this section. Please do NOT PM me, single me out on the IRC, or refuse to accept anyone elses answer but mine. Also please try to make use of the forums too rather than soully posting your Addmusic queries here.
Thanks for reading! I hope I helped!
Hi there! I made this tutorial to replace the current tutorial for Romi's Addmusic. Although both builds are extremely similar, HuFlungDu's build has a few differences so I guess you're better off using this tutorial rather than the other...
Who is this tutorial for?
I have attempted to make this tutorial suitable for anyone in rom hacking. It should be useful for everyone who needs to know how to insert music. I have divided it in to easy to digest sections so people can easily find what they need to know.
Note, this tutorial may be fairly heafty but don't be put off by the walls of text. The process is actually very simple.
What you will need
You will need the following:
- An SMW rom (it doesn't matter if it's edited or uneditied, just as long as it hasn't had any other versions of Addmusic used on it or patched the MORE.bin/MORE.asm (also known as the N-SPC patch) externally)
- HuFlungDu's unofficial Romi's unofficial addmusic v4.05 rev 1.02 (obviously)
- Some custom music of your choice (we have a wide selection, feel free to browse around)
- Smkdan's SampleTool 2.0.0.5 (note: you won't need this unless your song uses samples, I'd advise you to work your way through the tutorial first before downloading this)
- A program that can open ZIPs (which I'll assume you have. If not, Google it)
- Your SMW hacking basics (such as Lunar Magic)
Getting compatible music
First you need to find some music to download. You'll notice that most of the music in the music section has a small info part at the top of the description. You could see the following types:
Quote
Song Duration: 0:00
Insert Size: 000 bytes
Addmusic Compatibilty: AM4/AMM
Sample Bank/.brrs Required?: Yes/No
Header Type: Level/Overworld
Insert Size: 000 bytes
Addmusic Compatibilty: AM4/AMM
Sample Bank/.brrs Required?: Yes/No
Header Type: Level/Overworld
This is the new info part that people are encouraged to submit with their music now.
For this tutorial, there is one part you're interested in:
Quote
Addmusic Compatibilty:
The Addmusic Compatibility should be marked with something like 'AM4' or 'Addmusic 4'. If it is marked with something like 'AMM' or 'Addmusic M' it will NOT work with Addmusic 4.05.
Quote
Insert Size: 000 bytes
Song Duration: 0:00
# of Channels: 0
N-SPC Patch?: Yes/No
Song Duration: 0:00
# of Channels: 0
N-SPC Patch?: Yes/No
This is the classic (old) info part that was used before HuFlungDu's build was released. Some people still use it though. Usually the author will specify using an additional tag whether or not AddmusicM is required. If they have not specified that AddmusicM is required then the odds are the music will work with Addmusic 4.05.
Other songs will have no info part. You can assume that these will be compatible with Addmusic 4.05 unless otherwise specified.
Note: If the music specifies that sample banks are required then you will need SampleTool. A seperate tutorial can be found on the use of this tool. For practice purposes I'd advise you to use music that does not use sample banks.
Setting up Addmusic
By now you should have downloaded Addmusic 4.05 (either from the tools section or using the link I provided). Upon opening the zip you should see several files including folders such as 'OW', 'MISC', and 'LEVEL'. Extract everything from here into the directory of your SMW rom (so 'OW', 'LEVEL', and everything else are in the same folder as your rom and not in a sub folder).
You will also need a command prompt in the same directory to operate Addmusic. Most Windows users should be able to use CMD.exe which you can copy from your hidden files. (You will probably be able to find this in the directory C:\Windows\System32\, just find it in the System32 folder and copy it to your rom directory.
Tip: Always keep the command prompt and your Addmusic stuff handy incase you decide to make another hack and need this all in a different directory again.
Preparing your SMW rom for music insertion
This step is easy. First off you need to make sure that your rom has been expanded (I'd recommend to at least 2mb). If you've edited your rom in Lunar Magic at all it should have automatically expanded already. A clean rom is by default 512kb. If you find that your rom has not expanded already you can expand it manually in Lunar Magic (there is an option to expand the rom under Lunar Magic's 'File' menu).
Next I'd advise you to close down any programs that may be using your rom (such as any emulators or Lunar Magic).
Next, open CMD.exe (or whatever command prompt you're using) and input the following:
Quote
Addmusic.exe *YourRom*.smc -se
This will have inserted HuFlungDu's MORE.bin (N-SPC patch). This will allow you to insert songs that make use of certain hex commands.
Note: There must be no spaces in your rom's name or it wont work
Your rom is now prepped and you'll never have to use the -se command on it again.
Note: Even if your desired music does not make use of the N-SPC patch (or MORE.bin), I'd advise you to use the -se command anyway.
Preparing your music for insertion
Don't worry. We're nearly at the end of the preperation stages. Now, in the ZIP you downloaded your music, you should find a .txt containing the music code and a .spc. You may also find a .bnk if the song uses samples. These can be inserted with SampleTool (reminder: you'll have to look in a seperate tutorial for sample tool). You will want the .txt. The .spc will play back the song outside when it is opened in an SPC player (I recommend SPC700 which can be found in the Tools section). This is handy if you want to preview the music before inserting it. Open the .txt containing the code.
At the top of it you will most likely find one of two lines of 9 byte hex coding:
$ED $80 $6D $2B
$ED $80 $7D $00
$F0
or
$ED $80 $6D $68
$ED $80 $7D $00
$F0
These are what we call the 'AM4 Headers'.
(Note that these can be spaced differently (ie the entire 9 byte code could be on one line) such as $ED $80 $6D $68 $ED $80 $7D $00 $F0)
You may need to change (or in some cases add) this line of coding depending on whether you want the music in a level or an overworld map.
If you want the music in a level, paste at the top of the .txt
$ED $80 $6D $2B
$ED $80 $7D $00
$F0
If you want it on an overworld map, instead paste
$ED $80 $6D $68
$ED $80 $7D $00
$F0
IMPORTANT! DO NOT PASTE THE CODE MORE THAN ONCE OR PASTE BOTH CODES IN ONE .TXT! IT IS A WASTE OF ROM SPACE!
Yes that was so important it needed to be in bold, red text...
Once you've made sure it has the relevent header save it. Then put it in one of two folders. If you're inserting it as level music, put it in the folder labelled 'LEVEL'. If you're inserting it as overworld map music, put it in the folder labelled 'OW'
Note: In these folders you may notice a file called 'echofix.py'. Do not get rid of or move this file.
Insering the music
Next you have to open 'Addmusic.ini' which should be in the same directory as your rom. Here you will see headings such as '[OVERWORLD]' and, '[LEVEL]' and music slot numbers. Enter the name of your song (the .txt's name) in the desired music slot.
So say if I was inserting a .txt with the name 'Submap Song' to the overworld, I'd find a clean slot under the [OVERWORLD] heading and write its name there so for example it could read something like:
0A=Submap Song.txt
For another example, let's say I wanted to insert a .txt called 'Level Song' for a level, I'd find a clean slot under the 'LEVEL' heading and write its name there. This may read something like:
20=Level Song.txt
Once you've added your songs to 'Addmusic.ini', save your changes and close it.
Next, open CMD.exe (or whatever command prompt you have) and input
Quote
Addmusic.exe *YourRom*.smc LEVEL
Note: When inserting overworld map music, you should replace 'LEVEL' with 'OW' in CMD.exe
You should have now sucessfully inserted your custom music. Check Lunar Magic. If your song name has appeared on the song list then congratulations! It's most likely a success! If not, read through the tutorial again and make sure you followed all the steps correctly.
Troubleshooting
I'll be honest. This tutorial is technically unfinished. I want you people to try it out and if you're having any problems, ask about it here. I will then add your question and a solution to this section. Please do NOT PM me, single me out on the IRC, or refuse to accept anyone elses answer but mine. Also please try to make use of the forums too rather than soully posting your Addmusic queries here.
Thanks for reading! I hope I helped!