Guide: Inserting and Creating music for AW2.

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Guide: Inserting and Creating music for AW2.

Post by Xenesis » Sat Jan 28, 2006 1:33 pm

Transplanting Music from other Sappy Games
What you need:
Sappy 1.0.1
A Hex Editor
A Way to Convert Numbers from Dec to Hex (Windows Calculator, etc.)
Scribbling Paper/Computer Notes etc.
Patience
Another Sappy Engine Game

Okay, it's pretty simple. First things first you need to open up your other Sappy Engine Game, for example Pokemon Sapphire. Find a song you want, and click 'Export Tracks'. Check all of the tracks and in the filename field type 'Some Name Here $T'. This'll export all the tracks from the song into individual files with 'Some Name Here 0, Some Name Here 1', etc.

Now we open up AW2 and go to the song we want to replace. Click 'Import Tracks' and select all of the tracks from 'Some Name Here' and click okay. Sappy will import them and ask if you want to update the song table. Say Yes.

Now play the song. It'll likely sound completely weirdarse with weird instruments. That's because most games don't use the same instrument definitions. This is where the hex editor comes in.

Open up the exported 'Some Name Here X' track in a hex editor. Search for DB in hex. Every instance of DB is followed by a number, which is the instrument used in the track. Changing the instrument is as simple as changing the single byte number.

Now you need to know what instrument to change it to. Find another song in AW2 that has a similar instrumentation to the ones from the original game you took it from. When playing the song, expand the tab on the track with the instrument you want. It'll have a number underneath the track and the location/note. This number is the instrument. Take this number and convert it into hex. Then overwrite the byte after the DB in the track. Reimport the tracks into AW2 and listen. If it sounds right, you're done. If not, edit the instruments and try again.

And don't forget to test it in game!

Importing Midi Files into AW2
You will need:
Sappy 1.0.1
Mid2AGB Converter (With MPlayerDef.s)
Midi Files
Hex Editor

Okay, the first thing to do once you've gotten all of the above is to get your midi and just drag it onto Mid2AGB. It'll compile the Midi into a Sappy .s file. This is the easy bit.

Now, make sure that MPlayerDef.s is in the same folder as your .s file. MplayerDef.s may also be called MidPlayerDef.s, so you'll have to rename it. Open up Sappy and go to the track you want to replace. Click 'Assemble Song'. Open up the .s file and assign the song to some empty space in the rom, like 0x700000. Song Table should be the same as the one you're editing, just copy it from the Sappy Window.
(NOTE: AT this point, keep the &H in both the voices and base offset boxes, this ensures the location will be ok:
Example:
Base Def offset: &H700000
Voices: &H240FB0)


Then hit assemble. This could take a few seconds or a minute or so, depending on the Midi. When it's done, update the Song Table. You should then be able to play your song in Sappy with the AW2 Instrumentation. However, not all songs will play in AW2 itself. Be sure to test them. I don't know why, but they're probably memory limitations. Avoid Midis with dozens of tracks.

If you're not happy with the instrumentation chosen, export the tracks, and use the instrument editing process illustrated earlier to modify the instruments before you re-import the track files.

Warnings:
Sappy 1.0's assembler is broken. You need 1.0.1
MPlayerDef.s must be in the same folder as the .s file you're assembling, not Sappy's or Mid2AGB.exe

Whew. I think that's all.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
x0_000
Rank: Clothes shopping is NP-Complete.
Location: a thing

Post by x0_000 » Sat Jan 28, 2006 1:37 pm

Fun. Now I can open a music making service here.
Only in math can you buy 600 cantaloupes and not look like a nutter.

User avatar
cpubasic13
Location: Citra, FL

Post by cpubasic13 » Sat Jan 28, 2006 2:23 pm

Ummm... what version of the rom do you have to use?

Strangly, all I can use is the (E) version of the rom to put in music. The (U) version doesn't show anything at all...

But even with that, I am confused with putting in music... 'cause now it won't even work. I'll get to here and am confused what to do next.
Image

What do I put in base destination and voicegroup?

Note that the song is just for testing purposes only and will probably not be in my hack...
"Is there a sign on my door that says 'Wanted: Everyone I hate?'" -Strong Bad

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Sat Jan 28, 2006 2:55 pm

Base Destination Offset just needs to be some empty space in the ROM. In AW2 US or AW2 Aus, the free space starts at about 675000, earlier or so.

Voicegroup, like I said needs to be copied from the Sappy window. See where it says:
Table 0x2C5D00
Header 0x4ED8FC
Voices 0x2C425C

Copy the pointer for the voices into the voicegroup box.

And it should work with ANY version of AW2, as they all use the Sappy Engine.

Edit: And for Rimdev, here's some Midis that I have gotten to play in-game, and not just in the Sappy Player.

http://www.vgmusic.com/music/console/ni ... ctyama.mid (Singing Mountain, Chrono Trigger. Crashes Sappy, but plays in game)
http://www.vgmusic.com/music/console/ni ... ssbatt.mid (The Decisive Battle, FF6)
http://www.vgmusic.com/music/console/ni ... -story.mid (Prologue - Super Metroid)
http://www.vgmusic.com/music/console/ni ... /Kraid.mid (Kraid's Hideout - Metroid Zero Mission)
Azumanga.s (Eyecatcher - Azumanga Daioh, in the Sappy Folder)
http://www.vgmusic.com/music/computer/m ... urney1.mid (Space Journey 1 - Tyrian, Crashes Sappy, but plays in game)
Last edited by Xenesis on Sat Jan 28, 2006 3:42 pm, edited 3 times in total.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Hans Stockmann
Rank: NEW META
Location: Terragent's Wardrobe

Post by Hans Stockmann » Sat Jan 28, 2006 3:03 pm

Wait, the Music hacking is up and running? :O

Any way for mp3s to be inserted as of yet?
Image

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Sat Jan 28, 2006 3:07 pm

Somehow, I doubt it. You're stuck with Midis, I'm afraid.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Hans Stockmann
Rank: NEW META
Location: Terragent's Wardrobe

Post by Hans Stockmann » Sat Jan 28, 2006 3:12 pm

Curses. Making a ridiculously overpowered Sami and replacing her music with the RA1 classic piece Hell March would've been delightful.
Image

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Sat Jan 28, 2006 3:21 pm

Well, if you can find a MIDI of it (VGmusic maybe?) then you could use that.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Jan 28, 2006 8:42 pm

Thanks for doing this Xen, on the plus side it lets you have a turn writing some useful resources... ;)

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Sat Jan 28, 2006 9:37 pm

Yay, going to try it out later.

Anyway I say we give loads of thanks to Xen for making this guide.

(everyone does the hip hip hurray 3 times)

And you should all thank me for finding the program that makes the .s files. If it was not for that program, this would not be possibele.

(everyone does the hip hip hurray 3 times)

EDIT Green Hill Music as a Theme, that would rock' plans to make Sonic a CO'

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Jan 28, 2006 11:12 pm

Kawa seems to have an idea on the no play situation, he thinks it's a header issue, I'll take this up as Xen did the guide :P

Kawa's idea

EDIT: seems most likely as I found on one song the header starts with 0700 0000, Hmm three things missing...

And sturm's theme has: 0600 00ad...
Lash's 0800 00a8...

Hmmm puzzling again >_>
Last edited by Mr Dev on Sat Jan 28, 2006 11:20 pm, edited 3 times in total.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Sat Jan 28, 2006 11:13 pm

Would it be possible for somescrrenshot because I can't get it to work.

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Jan 28, 2006 11:15 pm

More details please, at what point are you having problems?

And any error messages?

What rom are you using, EUR, US?

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Sat Jan 28, 2006 11:18 pm

rimdev wrote:More details please, at what point are you having problems?

And any error messages?

What rom are you using, EUR, US?
US version. I think I am entering the bas destination and voice wroung

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Jan 28, 2006 11:29 pm

Problem solved, remember to keep the &H in the boxes when assembling!

Adds to guide...

EDIT: And darn researching headers hasn't turned up much, still no music, only music that works for me is some goldenrod theme... >_>

User avatar
cpubasic13
Location: Citra, FL

Post by cpubasic13 » Sun Jan 29, 2006 11:16 am

rimdev wrote:Problem solved, remember to keep the &H in the boxes when assembling!

Adds to guide...
Heh... learned the hard way...

But now I got it!

And I was taking a look through the (U) rom and... found some sound effects!

So not only can we edit music, but we can edit the sound effects! Sure we could use only midis, it shouldn't be too hard to come up with cool sounds.

End of the World sounded awesome in Sappy but wouldn't play in game... which was a pity since with the AW2 soundset made it sound almost perfect for the game... oh well, at least there are many more midis I can use.
"Is there a sign on my door that says 'Wanted: Everyone I hate?'" -Strong Bad

User avatar
Kireato

Post by Kireato » Mon Jan 30, 2006 8:59 am

That's pretty nice.

*takes note*

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Mon Jan 30, 2006 10:24 am

Right, I have just discovered that I was using a bad rom which buggered up ever time you enter data.

Anyway I got a rom that will work fine so I put some muics on tommorow. 99 Route from Sonic 3 is going to be a theme. Yay

User avatar
cpubasic13
Location: Citra, FL

Post by cpubasic13 » Mon Jan 30, 2006 10:58 am

RadioShadow wrote: EDIT Green Hill Music as a Theme, that would rock' plans to make Sonic a CO'
I had a similar idea with this thought... but I was thinking of having OS be Nintendo characters, BM be Sega or some other 3rd game company, YC be Sony characters, and GE be Xbox characters. BH would be the foes in the games. Come on: seeing Master Chief battle it out against Mario and Sora would be rockin' cool!

Anyway, editing the music is really fun. Just the hard part is finding a song that can work well in the game...
"Is there a sign on my door that says 'Wanted: Everyone I hate?'" -Strong Bad

sebihunter

Post by sebihunter » Sat Dec 02, 2006 2:24 am

Is there any download link to sappy 1.0.1?

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Dec 02, 2006 3:46 am


sebihunter

Post by sebihunter » Sat Dec 02, 2006 4:52 am

THX

User avatar
GreenEarth
Rank: Corporal Chill
Location: Canada

Post by GreenEarth » Sat Dec 02, 2006 7:31 am

Wouldn't it work just to take an MP3 file, but change the mp3 extension to the midi extension?

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Sat Dec 02, 2006 7:47 am

No. I don't feel like going into detail.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Sat Dec 02, 2006 12:10 pm

Well, GreenEarth, it's essentially because Mp3 is a recording. Midi is basically sheet music.

Hence it doesn't work.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
GreenEarth
Rank: Corporal Chill
Location: Canada

Post by GreenEarth » Sat Dec 02, 2006 12:15 pm

Okay,

Hey, I think I saw some program a long time ago while trying to convert midi's to... I can't remember anymore. I'll look into it later and tell you if I find anything

setokaibarocket

Post by setokaibarocket » Wed Dec 20, 2006 11:02 am

http://darkfader.net/gba/main.html

There's a tool there called Wav2Gba, but I can't work out how to use it. Maybe one of you more skilled hackers could work it out. It was made for GBA homebrew rom development but i assume there's a way to use it in hacks too. But it wouldn't work too well with music i don't think since the wav file has to be mono and a low quality I think. Plus it might take up a lot of space in the ROM, just like wav files compared to midis. If it could be worked out though I think it could be used very effecively for sound effects. Except SFX in AW2 are midis too I think...

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Fri Dec 22, 2006 7:14 am

I've seen things like those before, they're more for the SFX and voices of the midi instruments.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Fri Dec 29, 2006 11:04 am

Sappy have made a update! Plus it works on my computer!

Click on the following link to download it!

http://helmetedrodent.kickassgamers.com ... appy12.exe

Image

This means I'll be able to sort the music bug in the Ember Hack! :D

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Fri Dec 29, 2006 1:40 pm

Record to Midi? That'll make it so much easier to convert songs between games.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Sat Dec 30, 2006 9:17 am

Okay, I can easily replace songs with other songs from gba games. So I'll be able to fix the music bug in the Ember hack. :)

But adding in your own midis is hurting my brain. I have converted the midi file to a .s file and I'm having trouble adding it to the rom.

Image
Every time I enter some values into the base and voice offsets, it crashes the program. What I did add was:

Base: 0x700000

Voice: 0x240FB0


Any ideas of what I should be adding? I'm looking at you Xen. Make the magic happen! :wink:

I have tried adding &H to the beginning of the offsets but that doesn't work.
Last edited by RadioShadow on Sat Dec 30, 2006 9:20 am, edited 1 time in total.

setokaibarocket

Post by setokaibarocket » Sat Dec 30, 2006 11:46 pm

Maybe the assembler in 1.2 is broken like in 1.0? To be safe I'll keep using 1.1 for importing MIDIs maybe. But the export to MIDI function looks very useful ^_^

Hmm, I hadn't thought of custom voices before. Maybe that's something to look into...

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Sun Dec 31, 2006 12:48 am

RS: Try entering them without any prefix whatsoever? I can't remember off the top of my head. It's been a while since I used Sappy.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Thu Jan 18, 2007 10:54 am

Right, the new Sappy Player works well for transferring music from GBA roms.

However, I think the Assembler is buggered in 2.0. >_<

I finally got 1.0.1 to work. A year later, I finally got it working. <_<

Well almost. I'm trying to replace the 'Victory Fanfare' theme with 'Green Hill midi theme. Every time I click on the 'Assemble' button, a message comes up saying 'No file found'.

Image

WHAT!? What file could not be found?

Xen, help! What am I doing wrong? :(

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Post by Xenesis » Thu Jan 18, 2007 12:29 pm

Are the .s file and Midi2GBA in the same folder? It won't work otherwise.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Post by RadioShadow » Fri Jan 19, 2007 8:02 am

I think so. This is what is in my folder:

Image

I will get this working to add custom theme's.

PrinceEndymion88

Post by PrinceEndymion88 » Sun Mar 18, 2007 6:12 am

someone can help me with mid2agb??? pls i've inserted my midi in the folder mid and then i've opened tr and now if i open song.gba i can listen my midi but how can i insert the midi in another rom for example pokemon ruby??? if i open song.gba with sappy appear Invalid gamecode - it's all zeroes... ah i'm italian xD

PrinceEndymion88

Post by PrinceEndymion88 » Wed Mar 21, 2007 5:16 am

Hey I have the same error of RadioShadow

Guest

Post by Guest » Sat Jun 23, 2007 3:01 am

Can someone please find out what is wrong with this program and if it is anything we can fix ourselves?

I've emailed the creator twice about this, and he's responded to neither of my emails.

User avatar
GreenEarth
Rank: Corporal Chill
Location: Canada

Post by GreenEarth » Mon Nov 12, 2007 2:56 am

I'm not 100% sure if this works, and sorry for the bump, but I found something that might work. I'm testing it right now. It's located at http://www.mp3towav.org/mp3-to-midi.asp
Hope this helps.

EDIT: It works.

Who is online

Users browsing this forum: No registered users and 0 guests