The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Reply
 
Thread Tools
  #1    
Old February 2nd, 2011, 11:04 PM
timaeus222's Avatar
timaeus222
MegaMan/Pokemon ROM Hacker
 
Join Date: Aug 2010
Gender: Male
Nature: Relaxed
For those who do not have the capability of opening Sappy, here is a guide to hack music in any GBA game without Sappy. Those who cannot use it are:

- Windows Non-XP Users
- MAC users

Materials:
HxD(easily google-able)
Visualboy Advance(easily google-able)
FireRed ROM or some other ROM to import music FROM
ROM to import music INTO

Quote:
Originally Posted by Offsets people can use
FireRed Title Song is first offset in 32-bit at: 084A3B7C
Emerald Title Song is first offset in 32-bit at: 086B56D8
The above offsets are how I like to test songs if I don't know where a song is and I need to find it. Each song has its own Voicegroup.

Open HxD and your soon-to-be-hacked GBA rom in it. In this guide I will use FireRed.

Open that same GBA rom (in this guide, FireRed) in VisualBoy Advance. When it reaches the title screen, go to Tools > Memory Viewer and view in 32-bit. Go to 084A3B7C. Right here is the list of songs in the game. Sort of. It's where the title screen song is, so you can replace that offset temporarily to figure out which offset is which song. Actual songs are generally longer than 100(hex) bytes.

Once you find what you want, go there. Afterwards I will mention a header. By that, I mean something like:



If you don't see an image it showed:
B200000A 08491990 086C4B10 086C4BEF
086C4CD6 086C4EB7 086C50E3 086C52F9
086C5594 086C57A8 086C59BD 086C5AC3

Copy from the beginning of the FIRST channel's offset to the END of the header. Remember, it goes "amount of instruments", voicegroup, channels A-Z.

Open a new file in HxD with Ctrl+N. Paste with Ctrl+B(get into the habit of Ctrl+B when using HxD; Ctrl+V at the wrong times can insert bytes and corrupt the rom; Ctrl+B is just overwrite instead of insert).

Don't save it, we'll use it later anyway. It's probably called Untitled-1. REMEMBER THIS FOR LATER!

Next up, making the song audible. In the same file, Untitled-1, start by replacing the voicegroup with the new one. EX: If FireRed, replace it with the voicegroup of your choice; it's up to you what instruments you want to use for your song. For example, in the title screen song it is 08491990.

Go to a spot where you want your new song to be, in your game. I;d suggest you label it or make a note (in HxD it is 31 for 1, 41 for A, 21 for "!", A0 for a blank space), but you don't have to. If you do, maybe put something like, "NEW ELITE FOUR SONG HERE!". Next, select all of Untitled-1 with Ctrl+A and copy with Ctrl+C. Paste it in the new game in a blank spot (Ctrl+B).

Afterwards, compare the channel offsets from your game with the ones from the game you're importing from. In this guide, FireRed. What you do is open Calculator, go to scientific mode, and then find the difference between the first channel offset in FireRed and the first channel offset in the new game. Write down the difference because you'll reuse it for a while. Then, add that difference to the second channel's offset for the song you're importing into the new game. Repeat until you edited all the pointers.

A (fake) example:

Emerald offset: 08578339
FireRed offset: 08930294

08930294 - 08578339 = 3B7F5B

From FireRed to Emerald, subtract 3B7F5B. From Emerald to FireRed, add 3B7F5B. Remember to subtract with your calculator in hex mode.



Then, use Ctrl+F in HxD to find all the B2's at the end of each channel you pasted in(within the new game!), and use "the difference you found between offsets" from earlier and change the pointer offsets. ALL of them. Be sure to be very careful on this. Making mistakes is hard to spot, unless you're willing to use HxD's File Compare and you have a sharp eye. After you're done, continue reading.

...REPEAT THIS! Do the same for all B3's within the channels you pasted in(within the new game!). Yes, tedious work. That is why we have Sappy. But if we can't use it(i.e. all MAC users/all non XP users), this will help a lot.

Now that the hard work is done, the fun work is coming up! Although some people might have known this, I doubt anyone's ever tried since this community's so used to using Sappy. Here is a basic format in instrument swapping.

Quote:
Originally Posted by Instrument Swapping
BC VV BB WW BD XX BE YY BF ZZ
VV = Pitch increment
WW = Speed measurement
XX = choice of instrument
YY = Volume
ZZ = Panning(which speaker is it playing out of? What percent?)
Quote:
Originally Posted by Basic Commands/Values
B1 = Ends Song
B2 = Loops song using the upcoming offset
B3 = Jumps to another part of the song, but continues the song there.
B4 = Return to last 0xB3 command.
BB = Set Tempo
BC = Set Pitch offset
BD = Set instrument
BE = Set Volume
BF = Set Panning
CF - 0xFF = Play notes of varying lengths.
Once you're done, save of course. But how do we test it? How do we draw from the new offset? What we talked about at the beginning, except you now need the new offset for the new game. So if you're using FireRed, this is the (real) offset for the song list:

084A3B04

Otherwise, simply search for the offset using HxD. What you do is type this into the Ctrl+F box in HxD:

Quote:
Originally Posted by Values in 8-bit
BC 00 BB*

*Depending on the game, trying BC 00 BB may not always work, but it's reliable. If you're playing Fire Emblem, careful. Search for BC 00 BB that is followed by an XX BD YY set. There are copies of BC 00 BB that aren't part of the beginning of a channel, unlike how it usually is.
Stop when you find the spot where you see:

Quote:
BC 00 BB 46 BD 3C C2 2C C1 0C BF 60 BE 43*

*Could be this or something similar
Then, take the offset you get when you put the text cursor right before BC, like this:

Quote:
|BC VV BB

| = cursor
The offset is at the lower left of HxD, minus the 08 at the beginning. When you go to that offset you should see the pattern of offset, 4 byte separation, offset, 4 byte separation on each line. That is where the list of songs is for that game. An example:



If you can't see the image, it showed:

8-bit:
02 00 02 00 28 D6 6B 08 02 00 02 00 98 DB 6B 08

32-bit:
00020002 086BD628 00020002 086BDB98

Then just replace the correct offset with the offset that leads to the new song's header, aka where B200000A or similar starts. You wrote that down earlier.

Use the trick I mentioned at the beginning to figure out which song is which.

Now, you're done! :D Thanks for reading.

Copyright (c) Timaeus, All Rights Reserved.
Only for PokeCommunity, MPCR, and TREZ.

---------

If anyone needs more pictures, ask me and I will make those screenshots.
If anyone has any questions, feel free to ask them.
__________________
~Timaeus.EXE

http://m-pcr.co.cc/
http://youtube.com/timaeus22222

Working on FireRed eXtreme Patch [hard mode with tile edits and extras]


Last edited by timaeus222; February 4th, 2011 at 07:02 PM.
Reply With Quote
  #2    
Old February 9th, 2011, 01:49 PM
gamesharkhacker's Avatar
gamesharkhacker
SupremoHack Entertainment Inc.
 
Join Date: Jun 2009
Location: In a massive hole :)
Gender: Male
Nature: Careful
Hmm.. Ive read this twice and i dont get it. Im surprised no one has made another Music inserter/player like Sappy.. But with less stupid bugs. Like, everyone whinges about the fact that sappy sucks and keeps crashing, and is just screwed up in general, but no one bothers to make anything to fix it.
He he, how cool would it be if Hackmew made one.. Sick as! Thats what!

EDIT: Hell yeah, i'm making my own inserter now!
Check it out!
__________________
I'm BACK!!!!

GSH - Owner and Creator of
Pokemon PoisonedPyrite/ParalysisPyrite



GSH - Music creator/hacker of
Pokemon Morganite

Last edited by gamesharkhacker; November 15th, 2011 at 02:04 AM. Reason: cause im awesome :D lol
Reply With Quote
  #3    
Old February 9th, 2011, 03:30 PM
Xenesis's Avatar
Xenesis
Syogun Changer
 
Join Date: May 2006
Location: Australia
Nature: Sassy
Send a message via AIM to Xenesis Send a message via Windows Live Messenger to Xenesis
They have, if you just want to dump/insert songs between games with the M4A music format and convert midis.

Zahlman's Song Editor

Runs via python, so if you have something that can run Python (Eg, everything) you can use it. Best part of it, is if you dump songs from other games, it'll include the original samples so the song will sound identical to the original.

If you want something that's a player, Sappy is still the best you'll get. Also, you might want to read the manual - FE Hackers aren't quite as tolerant of lazy questions as pokemon hackers.
Reply With Quote
  #4    
Old August 18th, 2012, 07:07 AM
Pinta77's Avatar
Pinta77
McDonald's Insider
Community Supporter
 
Join Date: Nov 2008
Location: San Jose
Age: 19
Gender: Male
Send a message via Skype™ to Pinta77
Interesting, im gonna book mark this. Hopefully it works
__________________

Wonder Trade!!!
Reply With Quote
  #5    
Old August 19th, 2012, 10:47 AM
RichterSnipes's Avatar
RichterSnipes
Simpleton
 
Join Date: Oct 2011
Location: USA
Age: 21
Gender: Male
Nature: Modest
Quote:
Originally Posted by pinta77 View Post
Interesting, im gonna book mark this. Hopefully it works
...you do know this tutorial is outdated, right? It's actually easier to go back to Sappy nowadays thanks to the Fire Emblem Community's recent mod to the program. Check out its thread in the Research & Development forum. I'd know it works splendidly because I installed the mod on my Windows 7 computer more than once.

This thread will still be helpful if you're running on Mac, of course.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 06:36 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.