Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old January 9th, 2010 (2:23 AM). Edited May 2nd, 2016 by Spherical Ice.
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
  • Crystal Tier
 
Join Date: Nov 2007
Location: Bristol, UK
Age: 19
Posts: 5,227

Quick Research & Development Thread


This thread is for small-scale research and development that can be solved in a matter of, say, five or six posts (or less). If you think of something you want to investigate but think it is too minor or shot for an entire Research & Development thread, or discover a small titbit of information that, on its own, would not warrant a whole thread for itself, just post it here!

Posting format


When posting your researched articles, please post them in a format that can be easily understood. Along with posting all your research on the matter in hand, please include any website links, offsets, subsidiary information and the likes when posting your article. Posts that are unclear in their message or that miss out vital information will not be added to the directory, for the sake of convenience and ease of access.

Thread rules


All posts must follow the posting format above. In addition, posts must follow the rules detailed below. (Of course, please ensure that you follow the PokéCommunity global rules, as well as this subforum's local rules.)

This is not a Simple Question thread.
This is purely for quick research, don’t ask your ROM Hacking questions unless they are undocumented enough to warrant research. Simple Questions should be posted as unique threads in the Beginner's Lounge subforum.

You should have a minimum amount of knowledge on the matter in hand.
We expect that you’ll have knowledge of ROM Hacking and at least a small idea on what to do with what you've found out.

Reviving old topics in the thread is forbidden.
Unless you've found significant research and the case was unresolved in the first time of posting.

Thread Directory


To make navigating this thread easier for everybody, the posts in this thread are linked to in this directory. It is split into a few categories, and each link is marked with a prefix. The meaning of these prefixes is explained in the Key at the bottom of this post.

Mechanics Research


Scripting Research


Graphics Research


Audio Research


Other


Directory Key

[RG] - Japanese Red / Green
[RB] - Red / Blue
[Y] - Yellow
[GS] - Gold / Silver
[C] - Crystal
[RS] - Ruby / Sapphire (usually just Ruby)
[FR] - FireRed / LeafGreen (usually just FireRed)
[EM] - Emerald
[DP] - Diamond / Pearl
[Pt] - Platinum
[HGSS] - HeartGold / SoulSilver
[B2W2] - Black / White / Black 2 / White 2
[XY] - X / Y
[ORAS] - OmegaRuby / AlphaSapphire
[PMD] - Pokémon Mystery Dungeon (not necessarily the same versions)
[OTHER] - Not necessarily specific to one ROM, or not Pokémon-related
[Part #] - Links to other posts that expand upon or correct the first part
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote

Relevant Advertising!

  #2    
Old February 12th, 2010 (10:04 AM). Edited December 29th, 2012 by giradialkia.
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
  • Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!
Note: only clean ROMs are taken into account. Also, features available in all games are not included.

[snip]Those pictures weren't meant to be there, I suppose XD[/giradialkia]
__________________
Reply With Quote
  #3    
Old February 12th, 2010 (4:20 PM).
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
  • Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 20
Gender: Male
Nature: Naive
Posts: 1,039
Quote:
Originally Posted by HackMew View Post
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!
HackMew, doesn't FireRed have Pokérus? Maybe you mean random Pokérus (in which case I wouldn't know) but as a feature it does.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
  #4    
Old February 13th, 2010 (11:36 AM).
Incineroar's Avatar
Incineroar Incineroar is offline
the spirit of the fighter
  • Moderator
  • Platinum Tier
  • Developer
 
Join Date: May 2009
Location: Iki Town
Age: 22
Gender: Male
Nature: Brave
Posts: 13,555
Quote:
Originally Posted by HackMew View Post
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!]
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
__________________
Reply With Quote
  #5    
Old February 13th, 2010 (11:40 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
  • Crystal Tier
 
Join Date: Nov 2007
Location: Bristol, UK
Age: 19
Posts: 5,227
Quote:
Originally Posted by Team Fail View Post
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
By Coloured Dialogue, I think HackMew meant automatic colouring for person events; the numerous bike feature IS RS/E exclusive, as that list is for an unedited ROM, and I agree with you and diegoisawesome with the Pokérus factor.

Still, that is a very helpful post, HackMew.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #6    
Old February 13th, 2010 (11:48 AM).
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
  • Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314
Quote:
Originally Posted by diegoisawesome View Post
HackMew, doesn't FireRed have Pokérus? Maybe you mean random Pokérus (in which case I wouldn't know) but as a feature it does.
Nope, it doesn't. It does support Pokérus as status, for compatibility. But you won't be able to infect other Pokémon and the virus will never wear off either.
You can't even get the Pokérus unless you trade/cheat. At least, that's what I read on Bulbapedia.


Quote:
Originally Posted by Team Fail View Post
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
Are you sure on the Battle Tower? Mind checking again, just in case?
Also, for colored dialogue I meant, like The Master said, the automatic, gender-based coloring.
If you look at the original games, you'll see R/S/E messages are plain black.
__________________
Reply With Quote
  #7    
Old March 13th, 2010 (7:19 PM). Edited March 13th, 2010 by Incineroar.
Incineroar's Avatar
Incineroar Incineroar is offline
the spirit of the fighter
  • Moderator
  • Platinum Tier
  • Developer
 
Join Date: May 2009
Location: Iki Town
Age: 22
Gender: Male
Nature: Brave
Posts: 13,555
Quote:
Originally Posted by HackMew View Post
Nope, it doesn't. It does support Pokérus as status, for compatibility. But you won't be able to infect other Pokémon and the virus will never wear off either.
You can't even get the Pokérus unless you trade/cheat. At least, that's what I read on Bulbapedia.




Are you sure on the Battle Tower? Mind checking again, just in case?
Also, for colored dialogue I meant, like The Master said, the automatic, gender-based coloring.
If you look at the original games, you'll see R/S/E messages are plain black.
I can see why there's no support for Pokerus: No RTC. It wears off at midnight, but there isn't a RTC.

I grabbed my LeafGreen (same as Firered...) Yup. At the battle tower, there are 4 modes:
Single
Double
Knockout
Mixed

On double, the trainers will face you- 2-on-2 matches (Double battles) until you complete the challenge or loose. Also, right before Pattern Bush, there are twins Miu and Mia that both send out Pikachu.

OK. I guess I was wrong for text coloring in R/S. I beat Ruby ages ago (360+ hours...) so I kinda forgot...
And sorry for a month-long response...
__________________
Reply With Quote
  #8    
Old March 13th, 2010 (8:26 PM).
Gamer2020's Avatar
Gamer2020 Gamer2020 is offline
Accept no Imitations!
     
    Join Date: Jun 2008
    Location: Distant Land
    Gender: Male
    Nature: Bold
    Posts: 910
    Quote:
    Originally Posted by Team Fail View Post
    I can see why there's no support for Pokerus: No RTC. It wears off at midnight, but there isn't a RTC.

    I grabbed my LeafGreen (same as Firered...) Yup. At the battle tower, there are 4 modes:
    Single
    Double
    Knockout
    Mixed

    On double, the trainers will face you- 2-on-2 matches (Double battles) until you complete the challenge or loose. Also, right before Pattern Bush, there are twins Miu and Mia that both send out Pikachu.

    OK. I guess I was wrong for text coloring in R/S. I beat Ruby ages ago (360+ hours...) so I kinda forgot...
    And sorry for a month-long response...
    It is not the same as emerald though. That is just a normal double battle.
    In Emerald if 2 trainers happen to both see you at the same time they will both battle you at once.
    __________________

    Reply With Quote
      #9    
    Old April 14th, 2010 (3:26 PM). Edited June 8th, 2010 by Chaos Rush.
    Chaos Rush's Avatar
    Chaos Rush Chaos Rush is offline
       
      Join Date: May 2007
      Gender: Male
      Posts: 1,303
      I think "Improved Graphics" is an opinion, not an actual fact.

      Quite frankly, I think the FR/LG graphics are horrible.

      EDIT: Okay, they aren't horrible, they look fine to be honest, but I still think that "Improved Graphics" is just an opinion.
      __________________
      Reply With Quote
        #10    
      Old April 14th, 2010 (3:37 PM).
      HackMew's Avatar
      HackMew HackMew is offline
      Mewtwo Strikes Back
      • Crystal Tier
       
      Join Date: Jun 2006
      Posts: 1,314
      Quote:
      Originally Posted by Chaos Rush View Post
      I think "Improved Graphics" is an opinion, not an actual fact.

      Quite frankly, I think the FR/LG graphics are horrible.
      Well, that's meant as graphics engine. Maybe I'll reword it a little.
      __________________
      Reply With Quote
        #11    
      Old May 1st, 2010 (8:17 AM).
      Shiny Quagsire's Avatar
      Shiny Quagsire Shiny Quagsire is offline
      I'm Still Alive, Elsewhere
         
        Join Date: May 2009
        Location: Hoenn Safari Zone
        Age: 19
        Gender: Male
        Nature: Jolly
        Posts: 700
        Does anyone know where each map's pokemon list is stored and how it is stored? Ex XXXX -level XX -species
        __________________



        Reply With Quote
          #12    
        Old May 1st, 2010 (8:32 AM).
        mindfreak's Avatar
        mindfreak mindfreak is offline
        Belgium Rom hacker
           
          Join Date: Dec 2007
          Posts: 45
          You can find the offsets for each maps pokemon in Advance map.
          Go to the wild pokemon tab and click on expand.
          There you ll' find the offset.

          its stored...

          YY Min Lv
          XX Max LV
          FFFF Pokemon hex number
          __________________
          Reply With Quote
            #13    
          Old June 16th, 2010 (8:57 PM). Edited June 18th, 2010 by kittopian.
          kittopian's Avatar
          kittopian kittopian is offline
          Source engine coder
             
            Join Date: Mar 2010
            Location: Lost in a poorly sorted filesystem
            Nature: Docile
            Posts: 11
            Well... I am researching "glitch moves" In the hope of creating more attacks... I would like to know where the move data table is so I may try to expand it because the "glitch move" data is really existing rom data, and if this is actualy acheivable Any way... hopefully I will be able to 'create' new moves. E.G. for 4th gen pokemon, ect.

            My knowledge so far: Move data can be interpreted from other data.

            P.S I do not truly know if this thread was where to put this...
            Reply With Quote
              #14    
            Old July 1st, 2010 (6:26 PM).
            Shiny Quagsire's Avatar
            Shiny Quagsire Shiny Quagsire is offline
            I'm Still Alive, Elsewhere
               
              Join Date: May 2009
              Location: Hoenn Safari Zone
              Age: 19
              Gender: Male
              Nature: Jolly
              Posts: 700
              I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
              Code:
              .align 2
              .thumb
              
              
              /*Special 0x98 will start a random water battle, such as those in the sea.
              Sister to the previous function, will start a water battle anywhere there is 
              a water pokemon data.*/
              
              Special_98: push {r4-r7, lr}
              	    mov r7, r8
              	    push {r7}
              	    sub SP, SP, #0x8
              	    ldr r0, water_data
              	    lsl r4, r0, #0x18
              	    lsr r4, r4, #0x18
              	    ldr r1, wild_generator2
              	    bx r1
              .hword 0x0000
              water_data: .word 0x22000410 /*the lake tile data*/
              wild_generator2: .word 0x0806cbe5
              __________________



              Reply With Quote
                #15    
              Old July 1st, 2010 (6:31 PM).
              Diegoisawesome's Avatar
              Diegoisawesome Diegoisawesome is offline
              Oh god the bees
              • Silver Tier
               
              Join Date: Dec 2007
              Location: :noitacoL
              Age: 20
              Gender: Male
              Nature: Naive
              Posts: 1,039
              Quote:
              Originally Posted by shiny quagsire View Post
              I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
              Code:
              .align 2
              .thumb
              
              
              /*Special 0x98 will start a random water battle, such as those in the sea.
              Sister to the previous function, will start a water battle anywhere there is 
              a water pokemon data.*/
              
              Special_98: push {r4-r7, lr}
                      mov r7, r8
                      push {r7}
                      sub SP, SP, #0x8
                      ldr r0, water_data
                      lsl r4, r0, #0x18
                      lsr r4, r4, #0x18
                      ldr r1, wild_generator2
                      bx r1
              .hword 0x0000
              water_data: .word 0x22000410 /*the lake tile data*/
              wild_generator2: .word 0x0806cbe5
              Actually, you don't need to do that. there's already a built-in special for that, although I don't know what it is.
              If you find it, please tell me, and I'll try to get it into my scripting tutorial.
              __________________


              My other resources:
              My Website
              diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
              diegoisawesome's Miscellaneous Finds
              The Ruins of Alph Puzzles
              Diego's Miscellaneous Patches
              GBA Intro Manager
              The Secret Sauce: Triple-Layer Tiles
              Reply With Quote
                #16    
              Old July 1st, 2010 (6:41 PM).
              Shiny Quagsire's Avatar
              Shiny Quagsire Shiny Quagsire is offline
              I'm Still Alive, Elsewhere
                 
                Join Date: May 2009
                Location: Hoenn Safari Zone
                Age: 19
                Gender: Male
                Nature: Jolly
                Posts: 700
                I believe it's special AB, which is unknown in XSE's guide. Here'd the code for rock smash:
                Code:
                '---------------
                #org 0x1BE00C
                special 0x187
                compare LASTRESULT 0x2
                if 0x1 goto 0x81A7AE0
                lockall
                checkflag 0x825
                if 0x0 goto 0x81BE091
                checkattack 0xF9
                compare LASTRESULT 0x6
                if 0x1 goto 0x81BE091
                setanimation 0x0 LASTRESULT
                bufferpartypokemon 0x0 LASTRESULT
                bufferattack 0x1 0xF9
                msgbox 0x81BE09D MSG_YESNO '"This rock appears to be breakable...."
                compare LASTRESULT 0x0
                if 0x1 goto 0x81BE09A
                msgbox 0x81BDFD7 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
                closeonkeypress
                doanimation 0x25
                waitstate
                goto 0x81BE06F
                
                '---------------
                #org 0x1A7AE0
                release
                end
                
                '---------------
                #org 0x1BE091
                msgbox 0x81BE0E2 MSG_SIGN '"It's a rugged rock, but a POKéMON\..."
                end
                
                '---------------
                #org 0x1BE09A
                closeonkeypress
                releaseall
                end
                
                '---------------
                #org 0x1BE06F
                applymovement LASTTALKED 0x81BE08F
                waitmovement 0x0
                hidesprite LASTTALKED
                special 0xAB
                compare LASTRESULT 0x0
                if 0x1 goto 0x81BE08D
                waitstate
                releaseall
                end
                
                '---------------
                #org 0x1BE08D
                releaseall
                end
                
                
                '---------
                ' Strings
                '---------
                #org 0x1BE09D
                = This rock appears to be breakable.\nWould you like to use ROCK SMASH?
                
                #org 0x1BDFD7
                = [buffer1] used [buffer2]!
                
                #org 0x1BE0E2
                = It's a rugged rock, but a POKéMON\nmay be able to smash it.
                
                
                '-----------
                ' Movements
                '-----------
                #org 0x1BE08F
                #raw 0x68 'mov68
                #raw 0xFE 'End of Movements
                __________________



                Reply With Quote
                  #17    
                Old July 1st, 2010 (6:50 PM).
                Diegoisawesome's Avatar
                Diegoisawesome Diegoisawesome is offline
                Oh god the bees
                • Silver Tier
                 
                Join Date: Dec 2007
                Location: :noitacoL
                Age: 20
                Gender: Male
                Nature: Naive
                Posts: 1,039
                Quote:
                Originally Posted by shiny quagsire View Post
                I believe it's special AB, which is unknown in XSE's guide. Here'd the code for rock smash:
                Code:
                '---------------
                #org 0x1BE00C
                special 0x187
                compare LASTRESULT 0x2
                if 0x1 goto 0x81A7AE0
                lockall
                checkflag 0x825
                if 0x0 goto 0x81BE091
                checkattack 0xF9
                compare LASTRESULT 0x6
                if 0x1 goto 0x81BE091
                setanimation 0x0 LASTRESULT
                bufferpartypokemon 0x0 LASTRESULT
                bufferattack 0x1 0xF9
                msgbox 0x81BE09D MSG_YESNO '"This rock appears to be breakable...."
                compare LASTRESULT 0x0
                if 0x1 goto 0x81BE09A
                msgbox 0x81BDFD7 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
                closeonkeypress
                doanimation 0x25
                waitstate
                goto 0x81BE06F
                
                '---------------
                #org 0x1A7AE0
                release
                end
                
                '---------------
                #org 0x1BE091
                msgbox 0x81BE0E2 MSG_SIGN '"It's a rugged rock, but a POKéMON\..."
                end
                
                '---------------
                #org 0x1BE09A
                closeonkeypress
                releaseall
                end
                
                '---------------
                #org 0x1BE06F
                applymovement LASTTALKED 0x81BE08F
                waitmovement 0x0
                hidesprite LASTTALKED
                special 0xAB
                compare LASTRESULT 0x0
                if 0x1 goto 0x81BE08D
                waitstate
                releaseall
                end
                
                '---------------
                #org 0x1BE08D
                releaseall
                end
                
                
                '---------
                ' Strings
                '---------
                #org 0x1BE09D
                = This rock appears to be breakable.\nWould you like to use ROCK SMASH?
                
                #org 0x1BDFD7
                = [buffer1] used [buffer2]!
                
                #org 0x1BE0E2
                = It's a rugged rock, but a POKéMON\nmay be able to smash it.
                
                
                '-----------
                ' Movements
                '-----------
                #org 0x1BE08F
                #raw 0x68 'mov68
                #raw 0xFE 'End of Movements
                I think that's it! Try it out in a script and see what you get.
                __________________


                My other resources:
                My Website
                diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
                diegoisawesome's Miscellaneous Finds
                The Ruins of Alph Puzzles
                Diego's Miscellaneous Patches
                GBA Intro Manager
                The Secret Sauce: Triple-Layer Tiles
                Reply With Quote
                  #18    
                Old July 1st, 2010 (7:00 PM).
                Shiny Quagsire's Avatar
                Shiny Quagsire Shiny Quagsire is offline
                I'm Still Alive, Elsewhere
                   
                  Join Date: May 2009
                  Location: Hoenn Safari Zone
                  Age: 19
                  Gender: Male
                  Nature: Jolly
                  Posts: 700
                  Yeah, I tried it and it worked
                  __________________



                  Reply With Quote
                    #19    
                  Old July 1st, 2010 (7:04 PM).
                  Diegoisawesome's Avatar
                  Diegoisawesome Diegoisawesome is offline
                  Oh god the bees
                  • Silver Tier
                   
                  Join Date: Dec 2007
                  Location: :noitacoL
                  Age: 20
                  Gender: Male
                  Nature: Naive
                  Posts: 1,039
                  Quote:
                  Originally Posted by shiny quagsire View Post
                  Yeah, I tried it and it worked
                  Awesome! I'll add it in as soon as I update the old tutorial. It might take a while, though.
                  __________________


                  My other resources:
                  My Website
                  diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
                  diegoisawesome's Miscellaneous Finds
                  The Ruins of Alph Puzzles
                  Diego's Miscellaneous Patches
                  GBA Intro Manager
                  The Secret Sauce: Triple-Layer Tiles
                  Reply With Quote
                    #20    
                  Old July 16th, 2010 (6:35 PM).
                  Chaos Rush's Avatar
                  Chaos Rush Chaos Rush is offline
                     
                    Join Date: May 2007
                    Gender: Male
                    Posts: 1,303
                    I found out how to edit the Battle Tower opponent Pokemon in Pokemon Ruby. The data is located at 0x4038E0.

                    I posted a whole thread about it, but just in case it doesn't get approved, I wanted to mention the offset anyway, because hopefully some hacker more advanced than me can find out where the pointer is.

                    I don't want to explain in detail the data, but at 0x4038E0, change 19 into 18, and congratulations, most Pikachu will now turn into Arboks in the Battle Tower.
                    __________________
                    Reply With Quote
                      #21    
                    Old July 26th, 2010 (9:58 AM). Edited July 26th, 2010 by knizz.
                    knizz's Avatar
                    knizz knizz is offline
                       
                      Join Date: Aug 2007
                      Posts: 192
                      I found this in the US-FR-Rom:
                      Spoiler:
                      081e3b14 b580 push {r7,lr}
                      081e3b16 b084 add sp, -#0x10
                      081e3b18 466f mov r7, sp
                      081e3b1a 6038 str r0, [r7, #0x0]
                      081e3b1c 6079 str r1, [r7, #0x4]
                      081e3b1e 60ba str r2, [r7, #0x8]
                      081e3b20 60fb str r3, [r7, #0xc]
                      081e3b22 68f8 ldr r0, [r7, #0xc]
                      081e3b24 2800 cmp r0, #0x0
                      081e3b26 d00b beq $081e3b40
                      081e3b28 4804 ldr r0, [$081e3b3c] (=$086fc08c)
                      081e3b2a 687a ldr r2, [r7, #0x4]
                      081e3b2c 68bb ldr r3, [r7, #0x8]
                      081e3b2e 6839 ldr r1, [r7, #0x0]
                      081e3b30 f7ff bl $081e39d8
                      081e3b34 f7ff bl $081e3b04
                      081e3b38 efff [ ??? ]
                      081e3b3a e007 b $081e3b4c
                      ...
                      081e3b4c b004 add sp, #0x10
                      081e3b4e bc80 pop {r7}
                      081e3b50 bc01 pop {r0}
                      081e3b52 4700 bx r0

                      What is this [ ??? ]-instruction doing there?
                      __________________
                      Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                      VBA-M with lua scripting support
                      Reply With Quote
                        #22    
                      Old July 26th, 2010 (12:38 PM).
                      prime-dialga's Avatar
                      prime-dialga prime-dialga is offline
                      pure darkness
                         
                        Join Date: Dec 2009
                        Gender: Male
                        Posts: 28
                        Some hwords have no opcode in Thumb.
                        If you try to decompile one of this hwords the output is [???].

                        Maybe it is a grafik or an ARM code.
                        Reply With Quote
                          #23    
                        Old July 26th, 2010 (5:12 PM).
                        knizz's Avatar
                        knizz knizz is offline
                           
                          Join Date: Aug 2007
                          Posts: 192
                          Quote:
                          Originally Posted by prime-dialga View Post
                          Some hwords have no opcode in Thumb.
                          If you try to decompile one of this hwords the output is [???].

                          Maybe it is a grafik or an ARM code.
                          That's what I thought at first too. But it all makes sense:
                          • The function pushes registers in the first line
                          • The function pops registers in the last line
                          • The registers are popped to the positions they were pushed from except for lr/pc of course.
                          • The stack-pointer is decreased and then used to the limit. (Why allocate more or less?)
                          • The cmp-opcode is followed by a beq-opcode.
                          • The functions called from this function are valid too.

                          It *has* to be THUMB-Code!
                          __________________
                          Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                          VBA-M with lua scripting support
                          Reply With Quote
                            #24    
                          Old August 16th, 2010 (6:02 PM).
                          JPAN JPAN is offline
                          pokemon rom researcher
                             
                            Join Date: Dec 2008
                            Posts: 104
                            I found something that bugs a lot of people, the fact HM moves cannot be deleted, can be easily erased on Fire Red.
                            There are two main routines that check if an attack is an HM or not:
                            one for the battle routine at 0x80441B8;
                            one for the in-screen move learning at 0x08125A90.
                            Both routines check for HMs in different locations.
                            The first checks if the attack given is part of a non-deletion list at 0x0825e014, ended in FFFF, and searches through it until it reaches the ending value, or finding a valid attack. Here's the code:
                            Code:
                            ROM:080441B8 ; =============== S U B R O U T I N E =======================================
                            ROM:080441B8
                            ROM:080441B8
                            ROM:080441B8 Battle_HM_set                           ; CODE XREF: sub_80CE8DC+A80p
                            ROM:080441B8                 PUSH    {R4,LR}
                            ROM:080441BA                 LSLS    R0, R0, #0x10
                            ROM:080441BC                 LSRS    R3, R0, #0x10        ;given attack stored
                            ROM:080441BE                 LDR     R2, =unk_825E014        ;list location
                            ROM:080441C0                 LDRH    R0, [R2]
                            ROM:080441C2                 LDR     R1, =0xFFFF
                            ROM:080441C4                 CMP     R0, R1
                            ROM:080441C6                 BEQ     loc_80441EA          ;is end of list
                            ROM:080441C8                 MOVS    R4, R1
                            ROM:080441CA                 ADDS    R1, R2, #0
                            ROM:080441CC
                            ROM:080441CC loc_80441CC                             ; CODE XREF: Battle_HM_set+30j
                            ROM:080441CC                 LDRH    R0, [R2]
                            ROM:080441CE                 ADDS    R1, #2
                            ROM:080441D0                 ADDS    R2, #2
                            ROM:080441D2                 CMP     R0, R3
                            ROM:080441D4                 BNE     loc_80441E4
                            ROM:080441D6                 MOVS    R0, #1        ;is same attack, undeletable
                            ROM:080441D8                 B       loc_80441EC
                            ROM:080441D8 ; ---------------------------------------------------------------------------
                            ROM:080441DA                 DCB    0
                            ROM:080441DB                 DCB    0
                            ROM:080441DC off_80441DC     DCD unk_825E014         ; DATA XREF: Battle_HM_set+6r
                            ROM:080441E0 dword_80441E0   DCD 0xFFFF              ; DATA XREF: Battle_HM_set+Ar
                            ROM:080441E4 ; ---------------------------------------------------------------------------
                            ROM:080441E4
                            ROM:080441E4 loc_80441E4                             ; CODE XREF: Battle_HM_set+1Cj
                            ROM:080441E4                 LDRH    R0, [R1]
                            ROM:080441E6                 CMP     R0, R4
                            ROM:080441E8                 BNE     loc_80441CC    ;new end_of_list check
                            ROM:080441EA
                            ROM:080441EA loc_80441EA                             ; CODE XREF: Battle_HM_set+Ej
                            ROM:080441EA                 MOVS    R0, #0      ;ended list, attack deletable
                            ROM:080441EC
                            ROM:080441EC loc_80441EC                             ; CODE XREF: Battle_HM_set+20j
                            ROM:080441EC                 POP     {R4}
                            ROM:080441EE                 POP     {R1}
                            ROM:080441F0                 BX      R1
                            The other searches for them at 0x0845A80C, the TM attack list. It does so by looking over the TMs at position 50+
                            Code:
                            ROM:08125A90 ; =============== S U B R O U T I N E =======================================
                            ROM:08125A90
                            ROM:08125A90
                            ROM:08125A90 Check_for_HM                            ; CODE XREF: ROM:0813939Ep
                            ROM:08125A90                 PUSH    {LR}
                            ROM:08125A92                 LSLS    R0, R0, #0x10
                            ROM:08125A94                 LSRS    R2, R0, #0x10
                            ROM:08125A96                 MOVS    R1, #0
                            ROM:08125A98                 LDR     R3, =TM_List        ;Location for all TM Attacks
                            ROM:08125A9A
                            ROM:08125A9A loc_8125A9A                             ; CODE XREF: Check_for_HM+28j
                            ROM:08125A9A                 MOVS    R0, R1
                            ROM:08125A9C                 ADDS    R0, #0x32
                            ROM:08125A9E                 LSLS    R0, R0, #1
                            ROM:08125AA0                 ADDS    R0, R0, R3
                            ROM:08125AA2                 LDRH    R0, [R0]             ;loads HM required by R1
                            ROM:08125AA4                 CMP     R0, R2
                            ROM:08125AA6                 BNE     loc_8125AB0
                            ROM:08125AA8                 MOVS    R0, #1            ;if equal, undeletable, return 1
                            ROM:08125AAA                 B       loc_8125ABC
                            ROM:08125AAA ; ---------------------------------------------------------------------------
                            ROM:08125AAC off_8125AAC     DCD TM_List             ; DATA XREF: Check_for_HM+8r
                            ROM:08125AB0 ; ---------------------------------------------------------------------------
                            ROM:08125AB0
                            ROM:08125AB0 loc_8125AB0                             ; CODE XREF: Check_for_HM+16j
                            ROM:08125AB0                 ADDS    R0, R1, #1
                            ROM:08125AB2                 LSLS    R0, R0, #0x18
                            ROM:08125AB4                 LSRS    R1, R0, #0x18
                            ROM:08125AB6                 CMP     R1, #6         ;maximum TM checking
                            ROM:08125AB8                 BLS     loc_8125A9A
                            ROM:08125ABA                 MOVS    R0, #0       ;not any TM, deletable
                            ROM:08125ABC
                            ROM:08125ABC loc_8125ABC                             ; CODE XREF: Check_for_HM+1Aj
                            ROM:08125ABC                 POP     {R1}
                            ROM:08125ABE                 BX      R1
                            So, how to "fix" it? Well, change 080441D6 to 00 and 08125AA8 to 00 to make no attack undeletable.
                            If, on the other hand, you have a wish to prevent the player from deleting random attacks, simply repoint the list to a location where your attacks fit (plus the 0xffff part), and change the following addresses:
                            0x08125A9C to 00 (one byte only)
                            0x08125AAC to your list pointer reversed
                            0x08125AB6 to the number of attacks you placed -2 (to a max of 101 undeletable attacks)

                            If, for some reason, you wish to make all attacks undeletable, change
                            080441EA to 00
                            08125ABA to 00

                            Hope this helps those hacks who want to get rid of HMs.
                            __________________
                            Here are the links for my work


                            Currently working on:
                            Battle Script Documentation
                            Another large project
                            Reply With Quote
                              #25    
                            Old August 18th, 2010 (8:32 AM).
                            Saxisai's Avatar
                            Saxisai Saxisai is offline
                            Unbeatable 3's-Unstopable Trio
                               
                              Join Date: Jul 2007
                              Location: Chambersburg, PA
                              Age: 24
                              Gender: Male
                              Nature: Naughty
                              Posts: 62
                              I don't know if this belongs here but I didn't know where else to post it.

                              Has anyone thought of a way to hack the pal park in the generation iv games?
                              __________________


                              HeartGold FC: 0732-7327-6698
                              SoulSilver FC: 2193-0253-0727
                              Platinum FC: 3652-7229-4117

                              PM Me if you added me so I can add you

                              YELLOW CRYSTAL EMERALD PLATINUM BLACK
                              Reply With Quote
                              Reply

                              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 2:23 AM.