Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Reply
 
Thread Tools
  #1    
Old April 30th, 2010 (4:41 PM). Edited August 6th, 2012 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
     
    Join Date: May 2007
    Gender: Male
    Posts: 1,302
    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.
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old May 1st, 2010 (12:08 AM).
    giradialkia's Avatar
    giradialkia giradialkia is offline
    • Crystal Tier
     
    Join Date: Apr 2009
    Location: Ireland
    Age: 23
    Gender: Male
    Nature: Timid
    Posts: 1,563
    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).
    __________________

    I'm working on an album of Pokémon-inspired music. Check out the Soundcloud link if you're interested!


    This is my Soundcloud | | This is my bandcamp
    Reply With Quote
      #3    
    Old May 3rd, 2010 (1:40 AM).
    humanguy2000's Avatar
    humanguy2000 humanguy2000 is offline
    NSMBW hacker
       
      Join Date: Apr 2010
      Location: No one actually knows...
      Gender: Male
      Nature: Hasty
      Posts: 122
      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 (2:28 AM).
      Flandre Scarlet's Avatar
      Flandre Scarlet Flandre Scarlet is offline
      Free your mind.
      • Gold Tier
       
      Join Date: Feb 2008
      Location: Australia
      Age: 21
      Gender: Male
      Nature: Adamant
      Posts: 355
      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 (2:38 AM).
      giradialkia's Avatar
      giradialkia giradialkia is offline
      • Crystal Tier
       
      Join Date: Apr 2009
      Location: Ireland
      Age: 23
      Gender: Male
      Nature: Timid
      Posts: 1,563
      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.
      __________________

      I'm working on an album of Pokémon-inspired music. Check out the Soundcloud link if you're interested!


      This is my Soundcloud | | This is my bandcamp
      Reply With Quote
        #6    
      Old May 3rd, 2010 (1:27 PM).
      Chaos Rush's Avatar
      Chaos Rush Chaos Rush is offline
         
        Join Date: May 2007
        Gender: Male
        Posts: 1,302
        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 (2:42 PM).
        giradialkia's Avatar
        giradialkia giradialkia is offline
        • Crystal Tier
         
        Join Date: Apr 2009
        Location: Ireland
        Age: 23
        Gender: Male
        Nature: Timid
        Posts: 1,563
        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.
        __________________

        I'm working on an album of Pokémon-inspired music. Check out the Soundcloud link if you're interested!


        This is my Soundcloud | | This is my bandcamp
        Reply With Quote
          #8    
        Old May 3rd, 2010 (5:28 PM).
        Diegoisawesome's Avatar
        Diegoisawesome Diegoisawesome is offline
        Oh god the bees
        • Silver Tier
         
        Join Date: Dec 2007
        Location: :noitacoL
        Age: 20
        Gender: Male
        Nature: Naive
        Posts: 1,035
        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
        Diego's Miscellaneous Patches
        GBA Intro Manager
        The Secret Sauce: Triple-Layer Tiles
        Reply With Quote
          #9    
        Old May 3rd, 2010 (6:32 PM).
        Chaos Rush's Avatar
        Chaos Rush Chaos Rush is offline
           
          Join Date: May 2007
          Gender: Male
          Posts: 1,302
          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 (1:36 PM).
          Diegoisawesome's Avatar
          Diegoisawesome Diegoisawesome is offline
          Oh god the bees
          • Silver Tier
           
          Join Date: Dec 2007
          Location: :noitacoL
          Age: 20
          Gender: Male
          Nature: Naive
          Posts: 1,035
          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
          Diego's Miscellaneous Patches
          GBA Intro Manager
          The Secret Sauce: Triple-Layer Tiles
          Reply With Quote
            #11    
          Old July 22nd, 2010 (5:18 PM).
          blizzwiz's Avatar
          blizzwiz blizzwiz is offline
             
            Join Date: Aug 2009
            Location: Sweden
            Age: 23
            Gender: Male
            Nature: Relaxed
            Posts: 6
            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 (6:43 AM).
            Diegoisawesome's Avatar
            Diegoisawesome Diegoisawesome is offline
            Oh god the bees
            • Silver Tier
             
            Join Date: Dec 2007
            Location: :noitacoL
            Age: 20
            Gender: Male
            Nature: Naive
            Posts: 1,035
            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
            Diego's Miscellaneous Patches
            GBA Intro Manager
            The Secret Sauce: Triple-Layer Tiles
            Reply With Quote
              #13    
            Old July 23rd, 2010 (7:59 AM).
            Chaos Rush's Avatar
            Chaos Rush Chaos Rush is offline
               
              Join Date: May 2007
              Gender: Male
              Posts: 1,302
              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 (5:20 PM).
              Steveice10 Steveice10 is offline
                 
                Join Date: Jun 2009
                Gender:
                Posts: 26
                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 linkandzelda is offline
                n00b desu ka?
                   
                  Join Date: Dec 2006
                  Location: Hastings, England
                  Gender: Male
                  Nature: Careful
                  Posts: 775
                  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 Orinjmate is offline
                  The Orinj of the Mate
                     
                    Join Date: Jun 2010
                    Location: England
                    Gender: Male
                    Nature: Calm
                    Posts: 120
                    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 linkandzelda is offline
                    n00b desu ka?
                       
                      Join Date: Dec 2006
                      Location: Hastings, England
                      Gender: Male
                      Nature: Careful
                      Posts: 775
                      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 (3:01 PM).
                      Orinjmate's Avatar
                      Orinjmate Orinjmate is offline
                      The Orinj of the Mate
                         
                        Join Date: Jun 2010
                        Location: England
                        Gender: Male
                        Nature: Calm
                        Posts: 120
                        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 (3:19 AM).
                        linkandzelda's Avatar
                        linkandzelda linkandzelda is offline
                        n00b desu ka?
                           
                          Join Date: Dec 2006
                          Location: Hastings, England
                          Gender: Male
                          Nature: Careful
                          Posts: 775
                          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 (8:48 AM).
                          Platinum Lucario's Avatar
                          Platinum Lucario Platinum Lucario is offline
                          The Legendary Master of Light!
                          • Crystal Tier
                           
                          Join Date: Jan 2008
                          Location: Warrnambool, Victoria, Australia.
                          Gender: Male
                          Nature: Calm
                          Posts: 1,561
                          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]
                          If you need to disable my signature, please give me some advice on how to improve the CSS-DIV code. Thanks!
                          Signature Status: Strikes: 1/3 | Infractions: 0/3
                          It's time to change the future...
                          to a positive direction!

                          Let's prevent things from getting bad!

                          I'm a ROM and ISO Researcher
                          Current Project: Researching Pokémon Mystery Dungeon Adventure Squad games (WiiWare)
                          Reply With Quote
                            #21    
                          Old November 19th, 2010 (2:24 PM).
                          colcolstyles's Avatar
                          colcolstyles colcolstyles is offline
                          Yours truly
                          • Crystal Tier
                           
                          Join Date: May 2008
                          Location: The Bay Area
                          Gender: Male
                          Nature: Lonely
                          Posts: 1,584
                          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 (4:15 AM).
                          linkandzelda's Avatar
                          linkandzelda linkandzelda is offline
                          n00b desu ka?
                             
                            Join Date: Dec 2006
                            Location: Hastings, England
                            Gender: Male
                            Nature: Careful
                            Posts: 775
                            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 (3:16 AM).
                            Groudon93 Groudon93 is offline
                               
                              Join Date: Nov 2011
                              Gender: Male
                              Posts: 3
                              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 (1:28 PM).
                              Xenon54 Xenon54 is offline
                                 
                                Join Date: May 2005
                                Location: Reno, NV
                                Age: 28
                                Gender: Male
                                Posts: 21
                                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 (4:24 AM).
                                Groudon93 Groudon93 is offline
                                   
                                  Join Date: Nov 2011
                                  Gender: Male
                                  Posts: 3
                                  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

                                  Forum Jump


                                  All times are GMT -8. The time now is 3:38 AM.