ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

TrollandToad.com
Closed Thread
 
Thread Tools
  #19126    
Old July 29th, 2011 (5:52 PM). Edited July 29th, 2011 by Lyzo.
Lyzo's Avatar
Lyzo Lyzo is offline
On vacation
     
    Join Date: Mar 2007
    Location: The Netherlands
    Age: 22
    Gender: Male
    Nature: Bold
    Posts: 252
    Quote:
    Originally Posted by SonicBlazePlatinum View Post
    I want to know how to decapitalize Pokemon, move names, and item names for Fire Red and Emerald, how do I do that? Also for Fire Red when you get the Pokedex I want it to be in National Dex form when you first obtain it, how do I do that?
    There was a ROM Base that had all the names decapitilized, I think it was wichu that made it? I dunno, use the search function

    You can activate the national dex by using the special 0x16F once the player has the pokedex
    __________________


    Thank you The Blueprint !!!

    Relevant Advertising!

      #19127    
    Old July 29th, 2011 (6:00 PM).
    Cherrysa23 Cherrysa23 is offline
       
      Join Date: Apr 2009
      Gender:
      Posts: 14
      hi!

      I have a simple question...

      I'm used to hacking (with nes), I mean the command... so I can change intelligence and things like that...

      but for games I hacked, pointers were always given... I wondered, if I have something, for example, the pokedex, the list of hex code which tell the order of the pokemon in the pokedex, how can I find the pointer?

      are there tutorial about it?

      and I found the pokedex by logic... but if I hadn't is there a easy way to find such datas? I just search for number of two bytes in the order of the pokedex and found it...

      thx for reading me
        #19128    
      Old July 29th, 2011 (6:04 PM).
      Lyzo's Avatar
      Lyzo Lyzo is offline
      On vacation
         
        Join Date: Mar 2007
        Location: The Netherlands
        Age: 22
        Gender: Male
        Nature: Bold
        Posts: 252
        Quote:
        Originally Posted by Cherrysa23 View Post
        hi!

        I have a simple question...

        I'm used to hacking (with nes), I mean the command... so I can change intelligence and things like that...

        but for games I hacked, pointers were always given... I wondered, if I have something, for example, the pokedex, the list of hex code which tell the order of the pokemon in the pokedex, how can I find the pointer?

        are there tutorial about it?

        and I found the pokedex by logic... but if I hadn't is there a easy way to find such datas? I just search for number of two bytes in the order of the pokedex and found it...

        thx for reading me
        Alright I think you should do some reading in the tutorials section. Because unlike NES hacking we have a whole bunch of tools here ready for use and rarely do any real hex editing. So take a look around in the tutorial and toolbox sections. If you have any questions, feel free to ask them here
        __________________


        Thank you The Blueprint !!!
          #19129    
        Old July 29th, 2011 (6:16 PM).
        Cherrysa23 Cherrysa23 is offline
           
          Join Date: Apr 2009
          Gender:
          Posts: 14
          thx a lot for ansering.

          I know and use lots of those tools, but the reason I'm asking, is because I want to expand the bank ok pokemon too to have more. so I would need to have my pointers to points somewhere, and that is why I need to find them. For this, I don't know of any tools...
            #19130    
          Old July 29th, 2011 (6:28 PM).
          ZangoMango's Avatar
          ZangoMango ZangoMango is offline
             
            Join Date: Jul 2011
            Gender: Male
            Nature: Impish
            Posts: 42
            OK guys, so I want a character to flat out disappear after I talk to them. No fade to black, just *poof*, like a cupcake in front of a Snorlax. What's the script for, or how do I go about, doing that? And thanks for the previous answer, Lyzo!
              #19131    
            Old July 29th, 2011 (6:56 PM).
            Lyzo's Avatar
            Lyzo Lyzo is offline
            On vacation
               
              Join Date: Mar 2007
              Location: The Netherlands
              Age: 22
              Gender: Male
              Nature: Bold
              Posts: 252
              Quote:
              Originally Posted by ZangoMango View Post
              OK guys, so I want a character to flat out disappear after I talk to them. No fade to black, just *poof*, like a cupcake in front of a Snorlax. What's the script for, or how do I go about, doing that? And thanks for the previous answer, Lyzo!
              There's two ways you can do that

              One's better than the other. One is using applymovement and one of the applymovements makes the character dissappear. <- not good one.

              THe other is using hidesprite 0xEventNumber

              For more info on it: http://www.pokecommunity.com/showthread.php?t=164276

              that's diego's tutorial on scripting, search 'hidesprite' and go down till you have the part on hidesprite and showsprite.

              If you want to make the character dissapear forever, also set a flag and put that in the event properties in advance map

              Always glad to help
              __________________


              Thank you The Blueprint !!!
                #19132    
              Old July 29th, 2011 (9:18 PM). Edited July 29th, 2011 by ZangoMango.
              ZangoMango's Avatar
              ZangoMango ZangoMango is offline
                 
                Join Date: Jul 2011
                Gender: Male
                Nature: Impish
                Posts: 42
                Alright, well two questions about that. First, when I try to insert hidesprite into this certain person's script (some guy in Viridian City), it says that "hidesprite" is an unknown command. And second, how do I find out the event number of this guy so that he in specific disappears? Thanks!

                Oh and also a different question if you get the chance.. I tried to make a person give the player a Pokemon by assigning the script to a free hex value via PokeScript, but when I assigned the script's new hex value to the person in Advance-Map, the person's script became the following:
                Spoiler:
                #org 0x8801000
                '-----------------------------------
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                #raw 0xFF
                'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)


                When it should have looked like
                Spoiler:
                #org $script
                lock
                faceplayer
                message $question
                $question 1 = Accept the POK\eMON?
                boxset 5
                compare 0x800D 0x0001
                if 0x01 goto $yes
                boxset 6
                release
                end

                #org $yes
                message $yes1
                $yes1 1 = \v\h01 got SPEAROW!
                boxset 6
                givepokemon 21 7 0X7D
                release
                end

                Any idea why? Thanks again.
                  #19133    
                Old July 29th, 2011 (10:07 PM).
                Lyzo's Avatar
                Lyzo Lyzo is offline
                On vacation
                   
                  Join Date: Mar 2007
                  Location: The Netherlands
                  Age: 22
                  Gender: Male
                  Nature: Bold
                  Posts: 252
                  Alright, I don't know much about PokeScript, sorry about that. The hidesprite command is for XSE, but pokescript should have it as well, but it's probably named differently, or it's a #raw... But I wouldn't know...

                  You should switch over to XSE anyway, seeing as PokeScript is quite outdated and unsupported anyway. It's much like pokescript, but a bit different, and so much easier to use!

                  You can get it here and here is a quite extensive tutorial. In this tutorial it also shows you how to get the person event number
                  __________________


                  Thank you The Blueprint !!!
                    #19134    
                  Old July 30th, 2011 (2:20 AM).
                  Cheesewig's Avatar
                  Cheesewig Cheesewig is offline
                  Hi!
                     
                    Join Date: Jul 2011
                    Gender: Male
                    Nature: Relaxed
                    Posts: 54
                    Worded better:

                    Pokemon Gold:
                    In PKSV-UI Is there a way that I can change RAM Values in a script?

                    RAM Values like:
                    D1FF-Player's Sprite
                    D203-Player's Clothes
                    __________________
                    My name is Aochider I was called . Dr. PET was loved and esteemed by us all!
                      #19135    
                    Old July 30th, 2011 (7:09 AM).
                    pokemon1412's Avatar
                    pokemon1412 pokemon1412 is offline
                       
                      Join Date: Aug 2006
                      Nature: Calm
                      Posts: 56
                      Does anyone know how to edit the banned pokemon list in emerald battle frontier?
                        #19136    
                      Old July 30th, 2011 (10:38 AM).
                      Sawakita's Avatar
                      Sawakita Sawakita is offline
                      Not Invented Here
                         
                        Join Date: May 2010
                        Gender: Male
                        Posts: 180
                        Quote:
                        Originally Posted by Cheesewig View Post
                        Pokemon Gold:
                        In PKSV-UI Is there a way that I can change RAM Values in a script?

                        RAM Values like:
                        D1FF-Player's Sprite
                        D203-Player's Clothes
                        There is a way. First, you should probably study Tauwasser's scripting compendium. The command you're looking for is 0x1B.
                        It took me less than 5 minutes to figure out how the command 0x1B is labeled in PKSV (and I never used that program before), so you should too. You can write the raw command in the ROM, than decompile it and see how it is labeled. Or you could just write your scripts using a hex editor and the Compendium as a reference.
                        __________________



                        | 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |
                          #19137    
                        Old July 30th, 2011 (12:33 PM). Edited July 30th, 2011 by Cheesewig.
                        Cheesewig's Avatar
                        Cheesewig Cheesewig is offline
                        Hi!
                           
                          Join Date: Jul 2011
                          Gender: Male
                          Nature: Relaxed
                          Posts: 54
                          I edited the sprite with RAM finally but when I enter a building the sprite changes to something I don't want.

                          It was normal: I changed into the Rival but I entered my house and I turned into Mom. I went into a pokémart and changed to a random guy.

                          What am I doing wrong?

                          Here's my script:
                          Spoiler:
                          #org 0x123100
                          playsound 0x1
                          writebyte 0xD1FF 0x3C
                          end
                          __________________
                          My name is Aochider I was called . Dr. PET was loved and esteemed by us all!
                            #19138    
                          Old July 30th, 2011 (7:11 PM).
                          Cherrysa23 Cherrysa23 is offline
                             
                            Join Date: Apr 2009
                            Gender:
                            Posts: 14
                            hi!

                            I've been searching for 1 hour, how to edit the intro with prof birch, and the starting map of pokemon ruby (which is the truck, and I don't find this map) and also, I don't find the script for the mother first speech...

                            if there is already a thread, please tell me, because Idon,t find it
                              #19139    
                            Old July 30th, 2011 (7:33 PM).
                            PokemonPurple's Avatar
                            PokemonPurple PokemonPurple is offline
                               
                              Join Date: Jul 2011
                              Posts: 31
                              Pokemon Emerald 1.0
                              XSE
                              Advance Map
                              ---

                              How could I make the "tree" person event be able to be cut?

                              Thanks guys. <3
                              __________________
                              Pokemon Purple: 10% Done ||||||||||
                              Dream Team -
                              Click Here for Pokemon: Purple Website!
                                #19140    
                              Old July 30th, 2011 (7:48 PM).
                              Darthatron's Avatar
                              Darthatron Darthatron is offline
                              巨大なトロール。
                              • Silver Tier
                               
                              Join Date: Jan 2006
                              Location: Melbourne, Australia
                              Age: 25
                              Gender: Male
                              Nature: Modest
                              Posts: 1,152
                              Quote:
                              Originally Posted by PokemonPurple View Post
                              Pokemon Emerald 1.0
                              XSE
                              Advance Map
                              ---

                              How could I make the "tree" person event be able to be cut?

                              Thanks guys. <3
                              Find a tree from the original Emerald and copy the script offset onto your new tree.
                              __________________
                              あなた は しきしゃ です
                              わたし は ばか です
                                #19141    
                              Old July 30th, 2011 (9:38 PM).
                              ZangoMango's Avatar
                              ZangoMango ZangoMango is offline
                                 
                                Join Date: Jul 2011
                                Gender: Male
                                Nature: Impish
                                Posts: 42
                                Hey guys, in FR/LG, is it possible to edit the ghost of Marowak battle in Pokemon Tower so that it's a different Pokemon? I tried my best to go into the script and change it, but it kept reverting back to Marowak.

                                Quote:
                                Originally Posted by Lyzo View Post
                                Alright, I don't know much about PokeScript, sorry about that. The hidesprite command is for XSE, but pokescript should have it as well, but it's probably named differently, or it's a #raw... But I wouldn't know...

                                You should switch over to XSE anyway, seeing as PokeScript is quite outdated and unsupported anyway. It's much like pokescript, but a bit different, and so much easier to use!

                                You can get it here and here is a quite extensive tutorial. In this tutorial it also shows you how to get the person event number
                                Cool, thanks man. XSE sounds good, I'll definitely switch over.
                                  #19142    
                                Old July 30th, 2011 (9:46 PM).
                                DrFuji's Avatar
                                DrFuji DrFuji is offline
                                Heiki Hecchara‌‌
                                • Crystal Tier
                                 
                                Join Date: Sep 2009
                                Location: Downia-upside
                                Age: 24
                                Gender: Male
                                Nature: Jolly
                                Posts: 1,328
                                Quote:
                                Originally Posted by ZangoMango View Post
                                Hey guys, in FR/LG, is it possible to edit the ghost of Marowak battle in Pokemon Tower so that it's a different Pokemon? I tried my best to go into the script and change it, but it kept reverting back to Marowak.
                                You can't change the Pokemon which you battle in a regular FR ROM. JPAN's Hacked ROM has a special that allows you to battle other ghost Pokemon so I'd suggest trying it out.
                                __________________
                                  #19143    
                                Old July 31st, 2011 (1:09 AM).
                                DuoRyan's Avatar
                                DuoRyan DuoRyan is offline
                                Hack'in as usual, it seem.
                                   
                                  Join Date: Nov 2009
                                  Location: Somewhere.
                                  Age: 20
                                  Gender: Male
                                  Nature: Calm
                                  Posts: 336
                                  How do you make the press start in the titlescreen flash?
                                  __________________
                                  Pokemon Treasure.
                                  Progress: Planning.
                                    #19144    
                                  Old July 31st, 2011 (1:56 AM).
                                  Cheesewig's Avatar
                                  Cheesewig Cheesewig is offline
                                  Hi!
                                     
                                    Join Date: Jul 2011
                                    Gender: Male
                                    Nature: Relaxed
                                    Posts: 54
                                    Is there a way to create new maps in Pokemon Gold
                                    __________________
                                    My name is Aochider I was called . Dr. PET was loved and esteemed by us all!
                                      #19145    
                                    Old July 31st, 2011 (2:32 AM).
                                    Darthatron's Avatar
                                    Darthatron Darthatron is offline
                                    巨大なトロール。
                                    • Silver Tier
                                     
                                    Join Date: Jan 2006
                                    Location: Melbourne, Australia
                                    Age: 25
                                    Gender: Male
                                    Nature: Modest
                                    Posts: 1,152
                                    Quote:
                                    Originally Posted by DuoRyan View Post
                                    How do you make the press start in the titlescreen flash?
                                    In Ruby/Sapphire/Emerald, part of the tileset is cleared and reloaded every X frames, so you need to use that part of the tileset for the "Press Start" words.* In FireRed/LeafGreen, the a certain palette is changed to all black and reloaded every few frames, so you have to set that part of the tilemap to use that palette.*

                                    *All from memory, may be wrong.
                                    __________________
                                    あなた は しきしゃ です
                                    わたし は ばか です
                                      #19146    
                                    Old July 31st, 2011 (4:02 AM).
                                    Cheesewig's Avatar
                                    Cheesewig Cheesewig is offline
                                    Hi!
                                       
                                      Join Date: Jul 2011
                                      Gender: Male
                                      Nature: Relaxed
                                      Posts: 54
                                      Is there a support banner creator anwhere
                                      __________________
                                      My name is Aochider I was called . Dr. PET was loved and esteemed by us all!
                                        #19147    
                                      Old July 31st, 2011 (10:01 AM).
                                      phinamthi's Avatar
                                      phinamthi phinamthi is offline
                                      Steel Type Trainer
                                         
                                        Join Date: Jul 2011
                                        Location: South Jersey
                                        Gender: Male
                                        Nature: Modest
                                        Posts: 52
                                        -Firered
                                        I was trying to import the hero sprite, but it gives me this message

                                        Error during bitmap loading.
                                        The palette of the bitmap you are goint to import is not a 16 color one

                                        Yes that "goint" is actually there, so can anyone help?
                                          #19148    
                                        Old July 31st, 2011 (11:10 AM).
                                        Banjora Marxvile's Avatar
                                        Banjora Marxvile Banjora Marxvile is offline
                                        hOI!!!!!! i'm tEMMIE!!
                                           
                                          Join Date: May 2008
                                          Age: 23
                                          Gender: Male
                                          Nature: Bashful
                                          Posts: 3,487
                                          Quote:
                                          Originally Posted by phinamthi View Post
                                          -Firered
                                          I was trying to import the hero sprite, but it gives me this message

                                          Error during bitmap loading.
                                          The palette of the bitmap you are goint to import is not a 16 color one

                                          Yes that "goint" is actually there, so can anyone help?
                                          You need to index the sprite you are inserting into 16 pallettes. I suggest using Irfanview for this, then Decrease Colour Depth to 16, unchecking the dithering option.

                                          goint was perhaps meant to be going.
                                          __________________


                                          Temmie vibrates intensely.

                                          awwAwa cute!! (pets u)

                                          OMG!! humans TOO CUTE (dies)

                                          can't blame a BARK for tryin'...

                                          RATED TEM OUTTA TEM.

                                            #19149    
                                          Old July 31st, 2011 (11:19 AM).
                                          phinamthi's Avatar
                                          phinamthi phinamthi is offline
                                          Steel Type Trainer
                                             
                                            Join Date: Jul 2011
                                            Location: South Jersey
                                            Gender: Male
                                            Nature: Modest
                                            Posts: 52
                                            Thanks, I understand now
                                              #19150    
                                            Old July 31st, 2011 (5:49 PM). Edited July 31st, 2011 by Missingyep.
                                            Missingyep Missingyep is offline
                                               
                                              Join Date: Jul 2010
                                              Posts: 275
                                              This question is most certainly out of place in a thread for "simple" questions, but the lack of any easily-findable ASM Questions thread leaves me with no recourse but to post here.

                                              JPAN's FireRed Hacked Engine contains specials that copy and decrypt the data of a Pokemon to a specific offset. I am trying to make an ASM function that will take that decrypted data, and change the Pokemon's Personality Value without corrupting the Pokemon -- the result being that upon re-encryption, the Pokemon's personality value (and all linked data) is changed while leaving other data intact. Naturally, this requires that I rearrange all four of the data substructures within the Pokemon data; ergo, this is something for which only ASM is appropriate.

                                              (The purpose of this? Simple: a Pokemon's gender and nature are both determined by the least-significant byte of the personality value. An Unown's letter is determined by bits found in each byte of the personality value. An ASM function that copies the contents of variables 0x8001 and 0x8002 over the personality value without corrupting the Pokemon allows one to set the letter of an Unown, and the gender and nature of any other Pokemon using scripting.)

                                              I have attempted to compile my ASM code using the compiler (GNU Assembler, or GAS) provided by HackMew in their ASM tutorial. The compiler gives me only a flurry of errors. I do not know if these are bugs in the compiler (word-of-mouth says it's unreliable) or in my code.

                                              The code, a commented alternate version -- comments broke the compiler, which is ridiculous in more ways than I can count -- and the compiler output, respectively:

                                              Spoiler:
                                              Code:
                                              .text
                                              .align 2
                                              .thumb
                                              .thumb_func
                                              
                                              main:
                                                  push {r0-r7, lr}
                                                  ldr r0, .VAR_8001
                                                  ldr r1, .DECRYPTED_POKEMON
                                                  str r0, [r1, #0x0]
                                                      ldr r0, .DECRYPTED_POKEMON
                                                      ldrb r0, [r0, #0x0]
                                                  mov r1, #24
                                                  swi #0x06
                                                  mov r0, r1
                                                  ldr r1, .PTR_SUBSTRUCT_G
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  bl CopyDataChunk
                                                  ldr r1, .PTR_SUBSTRUCT_A
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x0C
                                                  bl CopyDataChunk
                                                  ldr r1, .PTR_SUBSTRUCT_E
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x18
                                                  bl CopyDataChunk
                                                  ldr r1, .PTR_SUBSTRUCT_M
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x24
                                                  bl CopyDataChunk
                                                  b DoWriting
                                              
                                              CopyDataChunk:
                                                  ldr r4, [r1, #0x0]
                                                  str r4, [r3, #0x0]
                                                  add r1, #0x4
                                                  add r3, #0x4
                                                  sub r2, #0x4
                                                  cmp r2, #0x0
                                                  bne CopyDataChunk
                                                  pop {pc}
                                              
                                              WriteSlot:
                                                  mov r4, #0xC
                                                  mul r1, r4
                                                  sub r1, r4
                                                  mul r2, r4
                                                  sub r2, r4
                                                  mov r4, r1
                                                  ldr r3, .SUBSTRUCT_1
                                                  add r3, r1
                                                  mov r5, r3
                                                  ldr r1, .Cobb_storage
                                                  add r1, r2
                                                  mov r2, #0xC
                                                  bl CopyDataChunk
                                                  pop {pc}
                                              
                                              WriteG:
                                                  mov r2, #0x1
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_G
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteA:
                                                  mov r2, #0x2
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_A
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteE:
                                                  mov r2, #0x3
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_E
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteM:
                                                  mov r2, #0x4
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_M
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              
                                              
                                              DoWriting:
                                                  cmp r0, #0x00
                                                  beq Write_GAEM
                                                  cmp r0, #0x01
                                                  beq Write_GAME
                                                  cmp r0, #0x02
                                                  beq Write_GEAM
                                                  cmp r0, #0x03
                                                  beq Write_GEMA
                                                  cmp r0, #0x04
                                                  beq Write_GMAE
                                                  cmp r0, #0x05
                                                  beq Write_GMEA
                                                  cmp r0, #0x06
                                                  cmp r0, #0x07
                                                  beq Write_AGEM
                                                  cmp r0, #0x08
                                                  beq Write_AGME
                                                  cmp r0, #0x09
                                                  beq Write_AEGM
                                                  cmp r0, #0x0A
                                                  beq Write_AEMG
                                                  cmp r0, #0x0B
                                                  beq Write_AMGE
                                                  cmp r0, #0x0C
                                                  beq Write_AMEG
                                                  cmp r0, #0x0D
                                                  beq Write_EGAM
                                                  cmp r0, #0x0E
                                                  beq Write_EGMA
                                                  cmp r0, #0x0F
                                                  beq Write_EAGM
                                                  cmp r0, #0x10
                                                  beq Write_EAMG
                                                  cmp r0, #0x11
                                                  beq Write_EMGA
                                                  cmp r0, #0x12
                                                  beq Write_EMAG
                                                  cmp r0, #0x13
                                                  beq Write_MGAE
                                                  cmp r0, #0x14
                                                  beq Write_MGEA
                                                  cmp r0, #0x15
                                                  beq Write_MAGE
                                                  cmp r0, #0x16
                                                  beq Write_MAEG
                                                  cmp r0, #0x17
                                                  beq Write_MEGA
                                                  cmp r0, #0x18
                                                  beq Write_MEAG
                                                  b End
                                              
                                              Write_GAEM:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_GAME:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_GEAM:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_GEMA:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_GMAE:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_GMEA:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              
                                              Write_AGEM:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_AGME:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_AEGM:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_AEMG:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_AMGE:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_AMEG:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              Write_EGAM:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_EGMA:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_EAGM:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_EAMG:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_EMGA:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_EMAG:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              Write_MGAE:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_MGEA:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_MAGE:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_MAEG:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_MEGA:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_MEAG:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              End:
                                                  pop {r0-r7, pc}
                                              
                                              .align 2
                                              .JPAN_storage:
                                                  .word 0x0203f400
                                              .Cobb_storage:
                                                  .word 0x02030000
                                              .DECRYPTED_POKEMON:
                                                  .word 0x0203F400
                                              .PTR_SUBSTRUCT_G:
                                                  .word 0x0203F464
                                              .PTR_SUBSTRUCT_A:
                                                  .word 0x0203F468
                                              .PTR_SUBSTRUCT_E:
                                                  .word 0x0203F46C
                                              .PTR_SUBSTRUCT_M:
                                                  .word 0x0203F470
                                              .SUBSTRUCT_1:
                                                  .word 0x0203F432
                                              .SUBSTRUCT_2:
                                                  .word 0x0203F43E
                                              .SUBSTRUCT_3:
                                                  .word 0x0203F44A
                                              .SUBSTRUCT_4:
                                                  .word 0x0203F458
                                              .VAR_8001:
                                                  .word 0x020270B6 + (0x8001 * 2)
                                              .VAR_8002:
                                                  .word 0x020270B6 + (0x8002 * 2)
                                              .LASTRESULT:
                                                  .word 0x020270B6 + (0x800D * 2)


                                              Spoiler:
                                              Code:
                                              @ assembling directives for assembler thing
                                              .text
                                              .align 2 @ Code offset must be multiple of 2
                                              .thumb   @ we are writing THUMB code
                                              .thumb_func
                                              
                                              @ we're using RAM from 02030000 - 02030030
                                              @ if we apply a hack that uses that RAM, we 
                                              @ must edit this ASM and re-insert it into 
                                              @ the game.
                                              
                                              @ start execution, with a defined label
                                              main:
                                                  @ backup registers
                                                  Push{r0-r7,lr}
                                              
                                                  @ script code
                                              
                                                  @ overwrite the personality value
                                                  @ based on the values of 0x8001 
                                                  @ and 0x8002.
                                                  ldr r0, .VAR_8001
                                                  ldr r1, .DECRYPTED_POKEMON
                                                  str r0, [r1, #0x0]
                                              
                                                      @ find new arrangement
                                                      ldr r0, .DECRYPTED_POKEMON
                                                  @ store least significant byte of personality value
                                                      ldrb r0, [r0, #0x0]
                                                  mov r1, #24
                                                  @ division, using a BIOS function
                                                  swi #0x06
                                                  @ transfer result of r0 % r1 from r1 to r0
                                                  mov r0, r1
                                              
                                                  @ copy G data to an available place in RAM
                                                  ldr r1, .PTR_SUBSTRUCT_G
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  bl CopyDataChunk
                                              
                                                  ldr r1, .PTR_SUBSTRUCT_A
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x0C
                                                  bl CopyDataChunk
                                              
                                                  ldr r1, .PTR_SUBSTRUCT_E
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x18
                                                  bl CopyDataChunk
                                              
                                                  ldr r1, .PTR_SUBSTRUCT_M
                                                  mov r2, #0x0C
                                                  ldr r3, .Cobb_storage
                                                  add r3, #0x24
                                                  bl CopyDataChunk
                                              
                                                  b DoWriting
                                              
                                              CopyDataChunk:
                                                  @  IN r1        pointer: source data chunk (as number value)
                                                  @  IN r2                 length of source
                                                  @  IN r3        pointer: target data chunk (as number value)
                                                  @     r4        Throwaway variable, will be overwritten
                                                  ldr r4, [r1, #0x0]
                                                  str r4, [r3, #0x0]
                                                  add r1, #0x4
                                                  add r3, #0x4
                                                  sub r2, #0x4
                                                  cmp r2, #0x0
                                                  bne CopyDataChunk
                                                  pop {pc}
                                              
                                              WriteSlot:
                                                  @ REQ CopyDataChunk
                                                  @ IN  r1        data substructure slot to write to (1-4)
                                                  @ IN  r2        data substructure (1-4 = G,A,E,M)
                                                  @     r3        Throwaway (parameter to subfunction)
                                                  @     r4        Throwaway (here and subfunction)
                                                  @ OUT r5        computed target address
                                                  mov r4, #0xC
                                                  mul r1, r4
                                                  sub r1, r4
                                                  mul r2, r4
                                                  sub r2, r4
                                                  mov r4, r1
                                                  ldr r3, .SUBSTRUCT_1
                                                  add r3, r1
                                                  mov r5, r3
                                                  ldr r1, .Cobb_storage
                                                  add r1, r2
                                                  mov r2, #0xC
                                                  bl CopyDataChunk
                                                  pop {pc}
                                              
                                              WriteG:
                                                  @ REQ WriteSlot
                                                  @   > CopyDataChunk
                                                  @ IN  r1        data substructure slot to write to (1-4)
                                                  @     r2        Throwaway (parameter to subfunction)
                                                  @     r3        Throwaway (parameter to subfunction)
                                                  @     r4        Throwaway (here and subfunction)
                                                  @     r5        address to write to one of JPAN's pointers
                                                  mov r2, #0x1
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_G
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteA:
                                                  mov r2, #0x2
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_A
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteE:
                                                  mov r2, #0x3
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_E
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              WriteM:
                                                  mov r2, #0x4
                                                  bl WriteSlot
                                                  ldr r4, .PTR_SUBSTRUCT_M
                                                  str r4, [r5, #0x0]
                                                  pop {pc}
                                              
                                              
                                              DoWriting:
                                                  @ BRANCH CALLS GO HERE
                                                  @ IN  r0        New personality value modulo 24
                                                  @     r1        Throwaway (subfunction)
                                                  @     r2        Throwaway (subfunction)
                                                  @     r3        Throwaway (subfunction)
                                                  @     r4        Throwaway (subfunction)
                                                  @     r5        Throwaway (subfunction)
                                              
                                                  cmp r0, #0x00
                                                  beq Write_GAEM
                                                  cmp r0, #0x01
                                                  beq Write_GAME
                                                  cmp r0, #0x02
                                                  beq Write_GEAM
                                                  cmp r0, #0x03
                                                  beq Write_GEMA
                                                  cmp r0, #0x04
                                                  beq Write_GMAE
                                                  cmp r0, #0x05
                                                  beq Write_GMEA
                                                  cmp r0, #0x06
                                              
                                                  cmp r0, #0x07
                                                  beq Write_AGEM
                                                  cmp r0, #0x08
                                                  beq Write_AGME
                                                  cmp r0, #0x09
                                                  beq Write_AEGM
                                                  cmp r0, #0x0A
                                                  beq Write_AEMG
                                                  cmp r0, #0x0B
                                                  beq Write_AMGE
                                                  cmp r0, #0x0C
                                                  beq Write_AMEG
                                              
                                                  cmp r0, #0x0D
                                                  beq Write_EGAM
                                                  cmp r0, #0x0E
                                                  beq Write_EGMA
                                                  cmp r0, #0x0F
                                                  beq Write_EAGM
                                                  cmp r0, #0x10
                                                  beq Write_EAMG
                                                  cmp r0, #0x11
                                                  beq Write_EMGA
                                                  cmp r0, #0x12
                                                  beq Write_EMAG
                                              
                                                  cmp r0, #0x13
                                                  beq Write_MGAE
                                                  cmp r0, #0x14
                                                  beq Write_MGEA
                                                  cmp r0, #0x15
                                                  beq Write_MAGE
                                                  cmp r0, #0x16
                                                  beq Write_MAEG
                                                  cmp r0, #0x17
                                                  beq Write_MEGA
                                                  cmp r0, #0x18
                                                  beq Write_MEAG
                                              
                                                  b End
                                              
                                              Write_GAEM:
                                                  @ G
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  @ A
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  @ E
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  @ M
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_GAME:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_GEAM:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_GEMA:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_GMAE:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_GMEA:
                                                  mov r1, #0x1
                                                  bl WriteG
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              
                                              Write_AGEM:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_AGME:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_AEGM:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_AEMG:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_AMGE:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_AMEG:
                                                  mov r1, #0x1
                                                  bl WriteA
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              Write_EGAM:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_EGMA:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_EAGM:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteM
                                                  b End
                                              Write_EAMG:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteM
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_EMGA:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_EMAG:
                                                  mov r1, #0x1
                                                  bl WriteE
                                                  mov r1, #0x2
                                                  bl WriteM
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              Write_MGAE:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_MGEA:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteG
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_MAGE:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteE
                                                  b End
                                              Write_MAEG:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteA
                                                  mov r1, #0x3
                                                  bl WriteE
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              Write_MEGA:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteG
                                                  mov r1, #0x4
                                                  bl WriteA
                                                  b End
                                              Write_MEAG:
                                                  mov r1, #0x1
                                                  bl WriteM
                                                  mov r1, #0x2
                                                  bl WriteE
                                                  mov r1, #0x3
                                                  bl WriteA
                                                  mov r1, #0x4
                                                  bl WriteG
                                                  b End
                                              
                                              End:
                                                  @ restore registers and return
                                                  Pop{r0-r7,pc}
                                              
                                              .align 2
                                              .JPAN_storage:
                                                  .word 0x0203f400
                                              .Cobb_storage:
                                                  .word 0x02030000
                                              .DECRYPTED_POKEMON:
                                                  .word 0x0203F400
                                              .PTR_SUBSTRUCT_G:
                                                  .word 0x0203F464
                                              .PTR_SUBSTRUCT_A:
                                                  .word 0x0203F468
                                              .PTR_SUBSTRUCT_E:
                                                  .word 0x0203F46C
                                              .PTR_SUBSTRUCT_M:
                                                  .word 0x0203F470
                                              .SUBSTRUCT_1:
                                                  .word 0x0203F432
                                              .SUBSTRUCT_2:
                                                  .word 0x0203F43E
                                              .SUBSTRUCT_3:
                                                  .word 0x0203F44A
                                              .SUBSTRUCT_4:
                                                  .word 0x0203F458
                                              .VAR_8001:
                                                  .word 0x020270B6 + (0x8001 * 2)
                                              .VAR_8002:
                                                  .word 0x020270B6 + (0x8002 * 2)
                                              .LASTRESULT:
                                                  .word 0x020270B6 + (0x800D * 2)


                                              Spoiler:
                                              Code:
                                              C:\Users\David\Desktop\Cobb Fam Desktop\Miscellaneous\rawrms\tules\THUMB ASM Com
                                              piler>thumb pv_asm_ncom.asm pv_asm_ncom.bin
                                              pv_asm_ncom.asm: Assembler messages:
                                              pv_asm_ncom.asm:60: Warning: Failed to find real start of function: CopyDataChun
                                              k
                                              
                                              pv_asm_ncom.asm:65: Warning: Failed to find real start of function: WriteSlot
                                              
                                              pv_asm_ncom.asm:71: Warning: Failed to find real start of function: WriteSlot
                                              
                                              pv_asm_ncom.asm:77: Warning: Failed to find real start of function: WriteSlot
                                              
                                              pv_asm_ncom.asm:83: Warning: Failed to find real start of function: WriteSlot
                                              
                                              pv_asm_ncom.asm:143: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:145: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:147: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:149: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:153: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:155: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:157: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:159: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:163: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:165: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:167: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:169: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:173: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:175: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:177: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:179: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:183: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:185: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:187: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:189: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:193: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:195: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:197: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:199: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:204: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:206: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:208: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:210: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:214: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:216: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:218: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:220: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:224: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:226: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:228: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:230: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:234: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:236: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:238: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:240: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:244: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:246: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:248: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:250: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:254: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:256: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:258: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:260: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:265: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:267: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:269: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:271: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:275: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:277: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:279: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:281: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:285: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:287: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:289: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:291: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:295: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:297: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:299: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:301: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:305: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:307: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:309: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:311: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:315: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:317: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:319: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:321: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:326: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:328: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:330: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:332: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:336: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:338: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:340: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:342: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:346: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:348: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:350: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:352: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:356: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:358: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:360: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:362: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:366: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:368: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:370: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:372: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:376: Warning: Failed to find real start of function: WriteM
                                              
                                              pv_asm_ncom.asm:378: Warning: Failed to find real start of function: WriteE
                                              
                                              pv_asm_ncom.asm:380: Warning: Failed to find real start of function: WriteA
                                              
                                              pv_asm_ncom.asm:382: Warning: Failed to find real start of function: WriteG
                                              
                                              pv_asm_ncom.asm:108: Error: branch out of range
                                              pv_asm_ncom.asm:110: Error: branch out of range
                                              pv_asm_ncom.asm:112: Error: branch out of range
                                              pv_asm_ncom.asm:114: Error: branch out of range
                                              pv_asm_ncom.asm:116: Error: branch out of range
                                              pv_asm_ncom.asm:118: Error: branch out of range
                                              pv_asm_ncom.asm:120: Error: branch out of range
                                              pv_asm_ncom.asm:122: Error: branch out of range
                                              pv_asm_ncom.asm:124: Error: branch out of range
                                              pv_asm_ncom.asm:126: Error: branch out of range
                                              pv_asm_ncom.asm:128: Error: branch out of range
                                              pv_asm_ncom.asm:130: Error: branch out of range
                                              pv_asm_ncom.asm:132: Error: branch out of range
                                              pv_asm_ncom.asm:134: Error: branch out of range
                                              pv_asm_ncom.asm:136: Error: branch out of range
                                              pv_asm_ncom.asm:138: Error: branch out of range
                                              
                                              C:\Users\David\Desktop\Cobb Fam Desktop\Miscellaneous\rawrms\tules\THUMB ASM Com
                                              piler>


                                              P.S. I am aware that my ASM is horrendously inelegant. It's the first such code I have ever written. It's the best way I could find to do what I am attempting to do.

                                              P.P.S. If you're wondering what the comments regarding JPAN's pointers are, in my ASM code... JPAN's special stores pointers to the Pokemon's data substructures. I do not know if the other custom specials rely on those pointers. In case they do, my ASM will, after reordering the data substructures, replace those pointers so that they point to the proper sections. This would prevent problems from arising should one use one of JPAN's other Pokemon-modifying specials after using my ASM, but before re-encrypting.

                                              ...

                                              So, does anyone know what's wrong? D:
                                              Closed Thread

                                              Quick Reply

                                              Join the conversation!

                                              Create an account to post a reply in this thread, participate in other discussions, and more!

                                              Create a PokéCommunity Account

                                              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 9:12 PM.