Banner
Views: 852,797,054
Time:
13 users online: autisticsceptile1993, brickblock369, Centipede, jdl, Lunartoad,  MarioFanGamer, melondrank, OhMuramatsu, P-Tux7, qantuum, rafaelfutbal, StinkyDoggo, Valkyria - Guests: 44 - Bots: 59 Users: 47,027 (2,521 active)
Latest: wesarg
Tip: Read Lunar Magic's help file and SMW Central's FAQ, as they cover most of the basics of SMW hacking.Not logged in.
Inserting Custom Music Using HuFlungDu's (Romi's) Addmusic v4.05
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - Inserting Custom Music Using HuFlungDu's (Romi's) Addmusic v4.05
Pages: « 1 2 3 4 5 »
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:

Quote
Song Duration: 0:00
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

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!

I'm a little confused. Since there are these header in the music files, I always have to delete them, or the music doesn't work (complete silence)!? I would like to know the reason for this.

EDIT: by the way nice tutorial

--------------------
---------------

Yes HungFlungDu's v4.05

--------------------
---------------

Yes, without the header everything works fine.

--------------------
---------------

If I remember correctly yes, but I think it was the same with v4.04.

--------------------
---------------
Originally posted by Nic Nac
If I remember correctly yes, but I think it was the same with v4.04.

If HFD's addmusic is used with another addmusic it will make the rom crash usually.

Also this tutorial left out the part about the python script :P

--------------------
Living life takes forever
Originally posted by me... like right at the top of the tutorial
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)
SMWC's official dentist since 2011.

YouTube - Twitter - Twitch
Did you save the ROM in Lunar Magic beforehand?

--------------------
My YouTube channel
Get the official ASMT resource pack here!

I get it on my own^^ Thanks, i forget to open it first with LM!
Originally posted by yoshicookiezeus
Did you save the ROM in Lunar Magic beforehand?

That reminds me I better explain the need to ensure the rom is expanded. Thanks YCZ!

If there's anything else you're having problems with or anything you feel I should add, just say and I'll try to get round to it at some point... Unless I have a reason not to...
SMWC's official dentist since 2011.

YouTube - Twitter - Twitch
If you've used Romi's, you can still safely use HFD's addmusic without having to port to a new ROM or anything. I can verify this as that's been the case with my hack.
Working on stuff again 👀
Originally posted by marioVSshadow
That reminds me I better explain the need to ensure the rom is expanded.

make sure to note that just expanding it wont make it work at least from my previous experiences.
Originally posted by omegazeroINFI
Originally posted by marioVSshadow
That reminds me I better explain the need to ensure the rom is expanded.

make sure to note that just expanding it wont make it work at least from my previous experiences.

Oh really? I've never enountered such problems. Tell me more.
SMWC's official dentist since 2011.

YouTube - Twitter - Twitch
like i said, it was from my previous experiences, i tried it again and it seemed to work >.>, i musta had to do something wrong last time,

oh well, i guess so this wasnt a waste, theres something i KNOW needs to be addressed in this,

some songs in the music section will have invalid echos or use incorrect ADSR commands, you can find then easily in a song
i dont know if you had planned to do this yet

add something like if you see commands that look like

$ED $X0-F $0-F0-F were X is higher then 7 because huflungdus addmusic uses 80 through 82 as new commands

EDIT:

if in the ED command you see the first byte labeled X above one of the numbers 8-F, change the value to the number 0-7 correspondingly

0 = 0 or 8
1 = 1 or 9
2 = 2 or A
3 = 3 or B
4 = 4 or C
5 = 5 or D
6 = 6 or E
7 = 7 or F
/EDIT

and about the echo ones, for levels, were to check for the insert size of each individual song

20 : LEVEL/text.txt
CH0 : 0xnumbers (more lines up to CH8 which start with CH1)
total size : 0x6A4 (equal to 1700 bytes which allows a decay of 5)

each 800 less bytes (320 hex) you can add another delay but in the level header,

ED $80 $6D $2B this

you will need to subtract 2b by 8 for every extra delay past 5
im not sure if having 800 more then 1700 will make you need a smaller delay or not

so by keeping track of this, you will know if you have to edit the echo if the insert size is too bad, i would say depending on the echo its this command line you will see in some txts.

$F1 $04 $46 $01

the 04 is the delay and what is edited with such info above

for overworld, it can only be up to 3.

i guess this is relevent info incase some people end up getting music that breaks in bsnes, anything wrong with the spat out info i pulled from small test and reading the info provided in the readme?
Ah yes the echo commands. I'll add something about those in due course. I guess it also gives me an oppertunity to cover echos in BSNES (and also the Cave Drums glitch). I could probably add some of this to the troubleshoot.
SMWC's official dentist since 2011.

YouTube - Twitter - Twitch
Originally posted by marioVSshadow
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)

Originally posted by K3fka
If you've used Romi's, you can still safely use HFD's addmusic without having to port to a new ROM or anything. I can verify this as that's been the case with my hack.

You really should change your post to reflect this, as it would save some people the trouble of porting to a new ROM when they needn't.
Working on stuff again 👀

How do I add music with N-SPC patch required? I already used the -se option on Hunfludu (whateaver, I don't know how to write his name) and they don't work or sound like crap:
http://www.youtube.com/watch?v=-QJW_HE5I4Q

Visit My Youtube Channel!
Shoutouts to wiiqwertyuiop


Pages: « 1 2 3 4 5 »
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - Inserting Custom Music Using HuFlungDu's (Romi's) Addmusic v4.05

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy