The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tutorials Looking for a guide to help you out? Then you're in the right place! We've got everything you need, ranging from Mapping to Music!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old April 30th, 2010, 04:41 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
There's a problem that I've noticed with every single Emerald hack on PokeCommunity, including my own. It's when some notes in the BGM get corrupted so that they sound like they get replaced with 8-bit sounding beeeeeeeeps. Replacing/Inserting a new voicegroup does not fix this. Importing tracks from a clean Emerald rom does not fix this either.

What causes the sound corruption is when we repoint things to things that aren't actually free space. Even though Emerald supposedly uses 00 bytes as free space, I disagree with that. See all those FF bytes starting at 0xE3CF64? From there until the end of the rom, I think is Emerald's true free space. After all, all the other GBA games use FF bytes, so I think it's just a misconception that Emerald uses 00 bytes.

Unfortunately, once you get it, there is no way of fixing it. HOWEVER, if you plan on doing an Emerald hack, it's fully possible to prevent it. Here's what you need to do:

1. Open up your AdvanceMap folder
2. Open up the ini folder
3. Click on "AdvanceMap"
4. Scroll down to where it says "[Version:BPE]"
5. Change "SuchByte=$00" into "SuchByte=$FF"
6. Change "SuchBeginn=$6B0000" into "SuchBeginn=$E3CF64"

Now you can safely do whatever you want in Emerald on AdvanceMap, without worrying about the sound corruption. If you open up an Emerald rom in a hex editor and go to 0xE3CF64, you'll notice that from here on until the end of the rom is FF bytes, and unfortunately, there's not much space left. So I recommend expanding the rom to 32mb using XSE, and make sure you fill with FF bytes.

Other tips:
*When repointing something in unLZ, make sure you repoint it to an offset higher than 0xE3CF64

Credits:
*Me - obviously lol
*giradialkia - for helping me with some stuff
*HackMew - for making me feel stupid because I never realized that maybe most Emerald hackers suck at repointing and don't know what free space is

If you guys don't know what the sound corruption is, then I recommend trying out Pokemon CrystalShards. That hack is, hands down, the worst form of it I have ever seen (heard). It's pretty obvious in that hack.


EDIT:

For smart people that know what they're doing: Basically, to avoid sound corruption, make sure you don't insert anything that's before 0xE3CF64. Every piece of data you insert should be after 0xE3CF64.
__________________

Last edited by Chaos Rush; August 6th, 2012 at 10:37 AM.
Reply With Quote
  #2    
Old May 1st, 2010, 12:08 AM
giradialkia's Avatar
giradialkia
 
Join Date: Apr 2009
Location: Ireland
Age: 20
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Lol, I knew it was only a matter of hours before you'd post one of these. But, it will be handy. There are more and more Emerald hacks nowadays, and they'll all be more enjoyable with proper sound. (though this probably means lots of people will have to start again, if they've already got corruption and... Absolutely do not want it).
__________________
Below is a song from my SoundCloud. I'll randomly change it now and again. Have a listen!
This one's called 'Cumulus', from my Clouds EP. Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp
Reply With Quote
  #3    
Old May 3rd, 2010, 01:40 AM
humanguy2000's Avatar
humanguy2000
NSMBW hacker
 
Join Date: Apr 2010
Location: No one actually knows...
Gender: Male
Nature: Hasty
Thanks for posting this! I was going to do an emerald hack and I can stop sound corruption now!
__________________
Hey, where's my easter egg gone?!
Reply With Quote
  #4    
Old May 3rd, 2010, 02:28 AM
Flandre Scarlet's Avatar
Flandre Scarlet
Free your mind.
 
Join Date: Feb 2008
Location: Australia
Age: 18
Gender: Male
Nature: Adamant
Thank you so very much for writing this tutorial. I've been wondering why my sound has been corrupted! But, I have a question, if you do this tutorial while doing a ROM hack, will the sound become un-corrupted (o.o)? Or do I have to start again?

Again, thanks.
__________________
Reply With Quote
  #5    
Old May 3rd, 2010, 02:38 AM
giradialkia's Avatar
giradialkia
 
Join Date: Apr 2009
Location: Ireland
Age: 20
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Quote:
Originally Posted by humanguy2000 View Post
Thanks for posting this! I was going to do an emerald hack and I can stop sound corruption now!
Quote:
Originally Posted by Flandre Scarlet View Post
Thank you so very much for writing this tutorial. I've been wondering why my sound has been corrupted! But, I have a question, if you do this tutorial while doing a ROM hack, will the sound become un-corrupted (o.o)? Or do I have to start again?

Again, thanks.
I'm afraid you'll have to start again- there's no way to fix it once it's occured. Although, you can now prevent it from happening at all, so restarting... Although tedious, it's the way to go.
__________________
Below is a song from my SoundCloud. I'll randomly change it now and again. Have a listen!
This one's called 'Cumulus', from my Clouds EP. Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp
Reply With Quote
  #6    
Old May 3rd, 2010, 01:27 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Quote:
Originally Posted by Flandre Scarlet View Post
Thank you so very much for writing this tutorial. I've been wondering why my sound has been corrupted! But, I have a question, if you do this tutorial while doing a ROM hack, will the sound become un-corrupted (o.o)? Or do I have to start again?

Again, thanks.
As giradialkia mentioned, you're gonna have to restart your hack. What happens with the default AdvanceMap ini is that it repoints to around the 0x600000 area, where all the sound stuff is. If you try to fix it with out restarting, chances are, you're gonna end up corrupting all your maps and such.

So er... yeah. You have to restart. Good luck, since that's what I'm doing too.
__________________
Reply With Quote
  #7    
Old May 3rd, 2010, 02:42 PM
giradialkia's Avatar
giradialkia
 
Join Date: Apr 2009
Location: Ireland
Age: 20
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Quote:
Originally Posted by Chaos Rush View Post
As giradialkia mentioned, you're gonna have to restart your hack. What happens with the default AdvanceMap ini is that it repoints to around the 0x600000 area, where all the sound stuff is. If you try to fix it with out restarting, chances are, you're gonna end up corrupting all your maps and such.

So er... yeah. You have to restart. Good luck, since that's what I'm doing too.
As do I. Other Emerald hackers probably should too, depending on how bad the corruption is (although even minimal sound corruption is annoying). There'd certainly be complaints about it, anyway.
I think this should be stickied. It's the one thing people really should know before starting an Emerald hack- that was like the only thing separating Emerald from the other ROMs that're normally hacked, pretty much, so.. Yeah. IMO.
__________________
Below is a song from my SoundCloud. I'll randomly change it now and again. Have a listen!
This one's called 'Cumulus', from my Clouds EP. Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp
Reply With Quote
  #8    
Old May 3rd, 2010, 05:28 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
You could probably make a backup of your sound-corrupted Emerald ROM, and then open it in a hex editor. Then, copy all of the bytes from an original Emerald ROM that were replaced in your hack (most of it was probably 00s, anyways) and save. Then, open your ROM in A-Map, see what's corrupted, and copy THAT data from your backup to your new ROM, and repoint. Voila.

It may be tedious (especially for long-ago started hacks), but it could be done.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #9    
Old May 3rd, 2010, 06:32 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Quote:
Originally Posted by diegoisawesome View Post
You could probably make a backup of your sound-corrupted Emerald ROM, and then open it in a hex editor. Then, copy all of the bytes from an original Emerald ROM that were replaced in your hack (most of it was probably 00s, anyways) and save. Then, open your ROM in A-Map, see what's corrupted, and copy THAT data from your backup to your new ROM, and repoint. Voila.

It may be tedious (especially for long-ago started hacks), but it could be done.
Doing that will most likely corrupt all your maps and scripts, since that's what causes the corruption in the first place. AdvanceMap repoints data to where the sound is, and if you try to "fix" the sound then everything that was repointed there would just get messed up.
__________________
Reply With Quote
  #10    
Old May 4th, 2010, 01:36 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by Chaos Rush View Post
Doing that will most likely corrupt all your maps and scripts, since that's what causes the corruption in the first place. AdvanceMap repoints data to where the sound is, and if you try to "fix" the sound then everything that was repointed there would just get messed up.
That's why I said to find what got deleted after the fix, and repoint it to actual free space, suing the bytes from your old ROM.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #11    
Old July 22nd, 2010, 05:18 PM
blizzwiz's Avatar
blizzwiz
Beginning Trainer
 
Join Date: Aug 2009
Location: Sweden
Age: 19
Gender: Male
Nature: Relaxed
Just wants to thank so very much for the tutorial it sure helped me I made some progress in the hack but then i got the beeps I followed your tutorial and i downloaded an new version of Emerald and I remade all the maps that i lost and it just works excellent now thank you! , Thanks so much for your tutorial!

Also Sorry if i am reviving an old thread but this sure helped me alot! :D (Y)
Reply With Quote
  #12    
Old July 23rd, 2010, 06:43 AM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Something else:
When scripting in XSE, you need to add "#freespace 0xFF" before the "#dynamic", or else it will write to the 00s.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #13    
Old July 23rd, 2010, 07:59 AM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Quote:
Originally Posted by diegoisawesome View Post
Something else:
When scripting in XSE, you need to add "#freespace 0xFF" before the "#dynamic", or else it will write to the 00s.
Wow, even I didn't know that. Thanks! Cuz I made a patch for Emerald that blanks out most scripts just for free space, and I blanked it using 00 bytes just so XSE will work properly.
__________________
Reply With Quote
  #14    
Old July 27th, 2010, 05:20 PM
Steveice10
Beginning Trainer
 
Join Date: Jun 2009
Gender:
Man, I made a lot of Store, Starter, Trainer, Map, Event, etc. changes that took a long time without knowing this. I just can't start over.

It only has effected the battle sounds. I hope in the future there is a way to fix this. I never noticed It in my previous hack, only this one.
Reply With Quote
  #15    
Old November 18th, 2010, 11:04 AM
linkandzelda's Avatar
linkandzelda
n00b desu ka?
 
Join Date: Dec 2006
Location: Hastings, England
Gender: Male
Nature: Careful
I was doing some research and I belive that the bytes from 0x9C2000 onwards are safe to use even though they are 00s. The problem with advance map is that its set to search for free space from 0x6B0000 which is NOT free space.
__________________
Reply With Quote
  #16    
Old November 18th, 2010, 12:10 PM
Orinjmate's Avatar
Orinjmate
The Orinj of the Mate
 
Join Date: Jun 2010
Location: England
Gender: Male
Nature: Calm
Is it obvious to tell if the sound glitch is there? Cause I have compiled a few scripts over offsets below 0x9C2000 but I can't tell the difference if it is there. (I tried the wild pokemon battle music). Also what other consequences can there be from compiling scripts on to offsets that aren't free space?
__________________
Currently working on a new hack named Hollow.
Pokemon Sky SD Creator
Reply With Quote
  #17    
Old November 18th, 2010, 12:14 PM
linkandzelda's Avatar
linkandzelda
n00b desu ka?
 
Join Date: Dec 2006
Location: Hastings, England
Gender: Male
Nature: Careful
Theres lots of consequences becuase:

1. the game uses that data for SOMETHING that we either know or dont know and..
2. the game needs all its data untact, unless we know 100% what it is and can remove/modify it.

For me, i didnt notice it happened as it was like 12 bytes that got overwrited. instrument data is mainly in that area and possibly anything else such as music data or map data and infact a lot more data probably.
__________________
Reply With Quote
  #18    
Old November 18th, 2010, 03:01 PM
Orinjmate's Avatar
Orinjmate
The Orinj of the Mate
 
Join Date: Jun 2010
Location: England
Gender: Male
Nature: Calm
Quote:
Originally Posted by linkandzelda View Post
Theres lots of consequences becuase:

1. the game uses that data for SOMETHING that we either know or dont know and..
2. the game needs all its data untact, unless we know 100% what it is and can remove/modify it.

For me, i didnt notice it happened as it was like 12 bytes that got overwrited. instrument data is mainly in that area and possibly anything else such as music data or map data and infact a lot more data probably.
Okay so should I bother spending a couple of hours re-inserting everything or just leave it as currently there is no sound corruption. Also those offsets actually came out of A-map free space finder; only before i modified the ini to what you said earlier in the thread.
__________________
Currently working on a new hack named Hollow.
Pokemon Sky SD Creator
Reply With Quote
  #19    
Old November 19th, 2010, 03:19 AM
linkandzelda's Avatar
linkandzelda
n00b desu ka?
 
Join Date: Dec 2006
Location: Hastings, England
Gender: Male
Nature: Careful
I would personaly reccommmend, if you were using AM from its old search 0x6B0000 then ti will of found bad offsets in the past... so if you want to be 100% sure nothing is damaged then its probably the best to start over.. But its your call.

Link
__________________
Reply With Quote
  #20    
Old November 19th, 2010, 08:48 AM
Platinum Lucario's Avatar
Platinum Lucario
The Legendary Master of Light!
 
Join Date: Jan 2008
Location: Warrnambool, Victoria, Australia.
Age: 21
Gender: Male
Nature: Calm
I just wonder to myself who would ever think that "00" was free space on the ROM (did LU-OH think that)? Because... I always knew... "FF" meant that it was free space... in other words... it's just a white area. lol

Example:
00 - blank (the null of the ROM data... as in it's just... black)

FF - nothing (whiteness)


Oh and by the way... thank you so much for the tutorial, I'm sure this will help me with my hacks... if I ever make a ROM Hack of Pokémon Emerald. :)

Because I will be creating a hack a pretty soon... once I get my new laptop back next week. It will be called "Pokémon: Dimentions of Time", which will indeed be a hack of Pokémon Emerald. I hope to learn more about hex editing... and of course... ASM editing sooner or later.
__________________
[Platinum Lucario's Signature]
Researching the NDS ROMs...

sure does feel like a brand new adventure!

I'm really looking forward to learning how to understand what the hex values mean and how to create programs using Microsoft Visual Studio!

Always focus on the present, best thing to do! Never look back into the past and never worry about anything bad of the future!
Reply With Quote
  #21    
Old November 19th, 2010, 02:24 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by PokémonShinySilver View Post
who would ever think that "00" was free space on the ROM?
Probably the people who hacked Ruby before Fire Red and discovered that the large blocks of '0x00's were unused space. :\
__________________

Brother of Vrai
Reply With Quote
  #22    
Old November 20th, 2010, 04:15 AM
linkandzelda's Avatar
linkandzelda
n00b desu ka?
 
Join Date: Dec 2006
Location: Hastings, England
Gender: Male
Nature: Careful
Quote:
Originally Posted by PokémonShinySilver View Post
I just wonder to myself who would ever think that "00" was free space on the ROM (did LU-OH think that)? Because... I always knew... "FF" meant that it was free space... in other words... it's just a white area. lol

Example:
00 - blank (the null of the ROM data... as in it's just... black)

FF - nothing (whiteness)


Oh and by the way... thank you so much for the tutorial, I'm sure this will help me with my hacks... if I ever make a ROM Hack of Pokémon Emerald. :)

Because I will be creating a hack a pretty soon... once I get my new laptop back next week. It will be called "Pokémon: Dimentions of Time", which will indeed be a hack of Pokémon Emerald. I hope to learn more about hex editing... and of course... ASM editing sooner or later.
Lu-ho made a simple mistake. R/S have free space from 0x6B0000 (or rather 00s. At least I think so) he just guessed Emerald was the same without actully checking it. Causing overwriting of the instruments. I'm not saying that 00 is free space, but i'm saying i think from my offset its like filler data. I did relevant tests to check if the game actully uses it (filled the whole lot with random data) and it had no effect on gameplay or music.
__________________
Reply With Quote
  #23    
Old November 21st, 2011, 03:16 AM
Groudon93
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
Thanks for this topic, it has been very useful, but regarding the rom expansion, I'm still getting an error saying that there's no free space left whenever I try to compile a script with XSE, though I filled the expanded rom with FF bytes. How can I solve this?
Reply With Quote
  #24    
Old November 21st, 2011, 01:28 PM
Xenon54
Beginning Trainer
 
Join Date: May 2005
Location: Reno, NV
Age: 25
Gender: Male
Quote:
Originally Posted by Groudon93 View Post
Thanks for this topic, it has been very useful, but regarding the rom expansion, I'm still getting an error saying that there's no free space left whenever I try to compile a script with XSE, though I filled the expanded rom with FF bytes. How can I solve this?
Before everything else in the script, type in:

#freespace 0xFF
Reply With Quote
  #25    
Old November 23rd, 2011, 04:24 AM
Groudon93
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
Quote:
Originally Posted by Xenon54 View Post
Before everything else in the script, type in:

#freespace 0xFF
Thank you, it worked perfectly.
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 04:12 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.