The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial HackMew's Knowledge

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

Reply
 
Thread Tools
  #101    
Old April 7th, 2012 (6:42 PM).
NintendoBoyDX NintendoBoyDX is offline
     
    Join Date: Jul 2010
    Gender: Male
    Posts: 94
    This is way more complicated than it needs to be... 080440F4 is the shiny decision routine. Go to 0804411E and replace it with 00 20. This is the spot that it checks whether the value is greater or less than 7. Replacing that will make the value always 00 right before the check, and that means all pokemon will be shiny. Much easier to replace 2 bytes.

    just throwin that out there
    Reply With Quote

    Relevant Advertising!

      #102    
    Old April 10th, 2012 (5:56 PM).
    YouListeningROMs's Avatar
    YouListeningROMs YouListeningROMs is offline
       
      Join Date: Mar 2012
      Gender: Male
      Posts: 24
      With ASM, how would you do modulo?
      Reply With Quote
        #103    
      Old April 10th, 2012 (10:39 PM).
      NintendoBoyDX NintendoBoyDX is offline
         
        Join Date: Jul 2010
        Gender: Male
        Posts: 94
        Quote:
        Originally Posted by YouListeningROMs View Post
        With ASM, how would you do modulo?
        There are a couple of ways in fr. There is software interrupt 0x6, which is a bios function call that does division and modulo. There is routine 081E4018 developed by gamefreak, that does division and modulo as well.

        R0 = dividend
        R1 = divisor

        returning
        R0 = quotient
        R1 = modulo answer

        081E4684 is another routine made by gamefreak that does modulo only.

        A few other math routines:
        081E460C: another division routine
        081E3B9C: square root, calls swi 0x8

        I've stumbled across a few others that I dont remember..
        Reply With Quote
          #104    
        Old April 11th, 2012 (3:57 AM).
        YouListeningROMs's Avatar
        YouListeningROMs YouListeningROMs is offline
           
          Join Date: Mar 2012
          Gender: Male
          Posts: 24
          Quote:
          Originally Posted by NintendoBoyDX View Post
          There are a couple of ways in fr. There is software interrupt 0x6, which is a bios function call that does division and modulo. There is routine 081E4018 developed by gamefreak, that does division and modulo as well.

          R0 = dividend
          R1 = divisor

          returning
          R0 = quotient
          R1 = modulo answer

          081E4684 is another routine made by gamefreak that does modulo only.

          A few other math routines:
          081E460C: another division routine
          081E3B9C: square root, calls swi 0x8

          I've stumbled across a few others that I dont remember..
          Thank you for your assistance.
          Reply With Quote
            #105    
          Old November 13th, 2012 (8:07 AM).
          truekidmoney truekidmoney is offline
             
            Join Date: Apr 2011
            Gender: Male
            Posts: 3
            Hey guys i have a question how do i get the results lesson1.bin this:
            03 B5 03 48 00 68 03 49 80 89 08 80 03 BD C0 46
            0C 50 00 03 D0 70 03 02
            into my rom?
            Reply With Quote
              #106    
            Old November 13th, 2012 (8:13 AM).
            Logan's Avatar
            Logan Logan is offline
            • Discord Moderoid
            • Platinum Tier
             
            Join Date: Nov 2008
            Location: Salisbury, England
            Age: 22
            Gender: Male
            Nature: Sassy
            Posts: 9,828
            Use a Hex Editor and insert the bytes into free space ending with a 0, 4, 8 or C.
            __________________
            Wait, I saw bare kicks, saw bare clothes
            Said psyduck that, I can't wear those
            I don't like them, they're not my ting
            They went silent, they're all weirdos
            Reply With Quote
              #107    
            Old November 30th, 2012 (7:55 AM).
            CallarinCreator's Avatar
            CallarinCreator CallarinCreator is offline
               
              Join Date: Sep 2012
              Gender: Male
              Posts: 5
              kan u post something on xse? it aint wantin to work for me. it will work. but it shuts down after like a second.
              __________________
              iiiiiiii uummm.... i scared.

              house of EVIL!!! muhuahahahahhahahaha!!!!!!!!!
              Reply With Quote
                #108    
              Old November 30th, 2012 (9:27 AM).
              Deokishisu's Avatar
              Deokishisu Deokishisu is offline
              Mr. Magius
                 
                Join Date: Feb 2006
                Location: If I'm online, it's a safe bet I'm at a computer.
                Gender: Male
                Nature: Relaxed
                Posts: 842
                Quote:
                Originally Posted by CallarinCreator View Post
                kan u post something on xse? it aint wantin to work for me. it will work. but it shuts down after like a second.
                O poor English, struck down in its prime.

                Anyway, this is because of the auto update feature. Since Hackmew's site is down, it tries to update, fails, and closes. To fix it, go into your .ini file and change it so that the AutoUpdateCheck equals zero.

                So that line should look like this:
                AutoUpdateCheck=0
                Reply With Quote
                  #109    
                Old January 30th, 2013 (4:52 PM).
                GoGoJJTech's Avatar
                GoGoJJTech GoGoJJTech is offline
                (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                • Gold Tier
                 
                Join Date: Nov 2012
                Location: Earth
                Age: 18
                Gender: Female
                Nature: Jolly
                Posts: 2,477
                These are extremely helpful ( and long ) well great job hackmew
                __________________
                I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
                The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
                Romhack.me Profile - Pokecommunity Profile - Youtube Channel

                Support me at my site!
                Pokémon Platinum Red and Blue
                Reply With Quote
                  #110    
                Old February 3rd, 2013 (12:37 AM).
                Chaos Rush's Avatar
                Chaos Rush Chaos Rush is offline
                im sexy and i know it
                   
                  Join Date: May 2007
                  Location: Taylor Swift
                  Gender: Male
                  Nature: Adamant
                  Posts: 1,296
                  I decided to take a crack at HackMew's ASM challenge, and I succeeded!


                  This is what I modified the routine to:
                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  .global lesson1
                  
                  main:
                  	push {r0-r1, lr}
                  	ldr r0, .PLAYER_DATA
                  	ldr r0, [r0]
                  	ldr r1, .VAR
                  	ldrh r0, [r0, #0xC]
                  	strh r0, [r1]	
                  	ldr r0, .PLAYER_DATA
                  	ldr r0, [r0]
                  	ldr r1, .NEXT
                  	ldrh r0, [r0, #0xA]
                  	strh r0, [r1]
                  	pop {r0-r1, pc}
                  
                  
                  .align 2
                  .PLAYER_DATA:
                  	.word 0x0300500C
                  .VAR:
                  	.word 0x020270B6 + (0x800D * 2)
                  .NEXT:
                  	.word 0x020270B8 + (0x8000 * 2)
                  And the XSE script:
                  Code:
                  #dynamic 0x800000
                  #org @main
                  callasm YourASMoffset
                  buffernumber 0x0 LASTRESULT
                  buffernumber 0x1 0x8000
                  msgbox @msg MSG_FACE
                  end
                  
                  
                  #org @msg
                  = Your Trainer ID is [buffer2].\nYour Secret ID is [buffer1].
                  Going to do my best to get ASM down...
                  __________________

                  My projects:
                  Untitled Pokémon fangame (pictured above) | Final Fantasy II NES retranslation | Mother 1/EarthBound Beginnings Color Restoration for GBA
                  Non-Pokémon hacks I support:
                  Sonic Classic Heroes
                  Sonic 3 Complete
                  Reply With Quote
                    #111    
                  Old February 3rd, 2013 (6:46 AM).
                  FBI's Avatar
                  FBI FBI is offline
                  Free supporter
                  • Silver Tier
                   
                  Join Date: Jan 2013
                  Location: Unknown Island
                  Gender: Male
                  Posts: 1,700
                  Quote:
                  Originally Posted by Chaos Rush View Post
                  I decided to take a crack at HackMew's ASM challenge, and I succeeded!


                  Spoiler:
                  This is what I modified the routine to:
                  Code:
                  .text
                  .align 2
                  .thumb
                  .thumb_func
                  .global lesson1
                  
                  main:
                  	push {r0-r1, lr}
                  	ldr r0, .PLAYER_DATA
                  	ldr r0, [r0]
                  	ldr r1, .VAR
                  	ldrh r0, [r0, #0xC]
                  	strh r0, [r1]	
                  	ldr r0, .PLAYER_DATA
                  	ldr r0, [r0]
                  	ldr r1, .NEXT
                  	ldrh r0, [r0, #0xA]
                  	strh r0, [r1]
                  	pop {r0-r1, pc}
                  
                  
                  .align 2
                  .PLAYER_DATA:
                  	.word 0x0300500C
                  .VAR:
                  	.word 0x020270B6 + (0x800D * 2)
                  .NEXT:
                  	.word 0x020270B8 + (0x8000 * 2)
                  And the XSE script:
                  Code:
                  #dynamic 0x800000
                  #org @main
                  callasm YourASMoffset
                  buffernumber 0x0 LASTRESULT
                  buffernumber 0x1 0x8000
                  msgbox @msg MSG_FACE
                  end
                  
                  
                  #org @msg
                  = Your Trainer ID is [buffer2].\nYour Secret ID is [buffer1].


                  Going to do my best to get ASM down...
                  Spoiler tags, pls!
                  Also, you don't need to load player data twice.
                  It should till work without doing this the second time:
                  ldr r0, .PLAYER_DATA
                  ldr r0, [r0]

                  EDIT: I lied, the way you did it, you did need to load it twice (or subtract :D).
                  __________________
                  ...
                  Reply With Quote
                    #112    
                  Old February 9th, 2013 (8:22 PM). Edited February 11th, 2013 by karatekid552.
                  karatekid552's Avatar
                  karatekid552 karatekid552 is offline
                  What happens if I push it?....
                     
                    Join Date: Nov 2012
                    Location: Do you really want to know? Really?
                    Gender: Male
                    Nature: Bold
                    Posts: 1,766
                    Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                    Almost all of the reference links for the ASM tutorial are broken. I have found a few of them, would it be alright for me to post them here? Or should I pm them to DrFuji/giradalkia to add to the end of the tut?

                    Edit: only two are broken.... Wow, I remember that being a lot more last time....

                    Edit2: I guess since no one has objected it is fine for me to post the links here:


                    Assembly Wikipedia: (So easy to find it really wasn't broken, but whatever) http://en.wikipedia.org/wiki/Assembly_language

                    ARM7DTMI Technical Manuel: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0210c/DDI0210B.pdf

                    Tonic: Whirlwind Tour of ARM Assembly: http://www.coranac.com/tonc/text/asm.htm


                    Hope these help anyone who wants to learn ASM.
                    __________________

                    Paired with Simba
                    Reply With Quote
                      #113    
                    Old May 17th, 2013 (10:12 AM). Edited May 17th, 2013 by Kurapika.
                    Kurapika's Avatar
                    Kurapika Kurapika is offline
                    Grudgebearer
                       
                      Join Date: Feb 2013
                      Location: Lavendar Town - Morocco
                      Gender: Male
                      Nature: Naughty
                      Posts: 406
                      Since I see people asking questions here, I have a problem using ldr with cmp. I am making a code that compares two words, one located in the RAM and the other located in the ROM. so what I do:
                      Spoiler:
                      ldr r1, .word1 ldr r1, [r1] ldr r2, .word2 ldr r2, [r2] cmp r1, r2 beq YayTheyEqualz ...
                      The problem is, the jump never occurs even when the words are equal... So I tried this:
                      Spoiler:
                      ldr r1, .word1 ldrh r1, [r1] ldr r2, .word2 ldrh r2, [r2] cmp r1, r2 beq SecondHalf ... SecondHalf: ldr r1, .word1 ldr r1, [r1, #0x2] ldr r2, .word2 ldrh r2, [r2, #0x2] cmp r1, r2 beq YayTheyEqualz ...
                      And this 2nd code works correctly but takes more space and it is more complicated. So, I'm wondering if ldr and/or cmr commands have some particular behaviour that makes the first code not working??? Or am I just doing something wrong?
                      __________________
                      Reply With Quote
                        #114    
                      Old May 17th, 2013 (3:30 PM).
                      karatekid552's Avatar
                      karatekid552 karatekid552 is offline
                      What happens if I push it?....
                         
                        Join Date: Nov 2012
                        Location: Do you really want to know? Really?
                        Gender: Male
                        Nature: Bold
                        Posts: 1,766
                        Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                        Quote:
                        Originally Posted by Kurapika View Post
                        Since I see people asking questions here, I have a problem using ldr with cmp. I am making a code that compares two words, one located in the RAM and the other located in the ROM. so what I do:
                        Spoiler:
                        ldr r1, .word1 ldr r1, [r1] ldr r2, .word2 ldr r2, [r2] cmp r1, r2 beq YayTheyEqualz ...
                        The problem is, the jump never occurs even when the words are equal... So I tried this:
                        Spoiler:
                        ldr r1, .word1 ldrh r1, [r1] ldr r2, .word2 ldrh r2, [r2] cmp r1, r2 beq SecondHalf ... SecondHalf: ldr r1, .word1 ldr r1, [r1, #0x2] ldr r2, .word2 ldrh r2, [r2, #0x2] cmp r1, r2 beq YayTheyEqualz ...
                        And this 2nd code works correctly but takes more space and it is more complicated. So, I'm wondering if ldr and/or cmr commands have some particular behaviour that makes the first code not working??? Or am I just doing something wrong?
                        Would you mind giving us all of the ASM in the regular format? It is really tough the read this way.
                        __________________

                        Paired with Simba
                        Reply With Quote
                          #115    
                        Old May 17th, 2013 (4:31 PM).
                        Kurapika's Avatar
                        Kurapika Kurapika is offline
                        Grudgebearer
                           
                          Join Date: Feb 2013
                          Location: Lavendar Town - Morocco
                          Gender: Male
                          Nature: Naughty
                          Posts: 406
                          code 1: code 2: The first one doesn't jump to TheyAreEqualz even when it should, the second code works perfectly for me. (Sorry, for some reason, line skips are removed from my posts ;_; I think it's just my ****** Internet -.-')
                          __________________
                          Reply With Quote
                            #116    
                          Old May 17th, 2013 (6:00 PM).
                          karatekid552's Avatar
                          karatekid552 karatekid552 is offline
                          What happens if I push it?....
                             
                            Join Date: Nov 2012
                            Location: Do you really want to know? Really?
                            Gender: Male
                            Nature: Bold
                            Posts: 1,766
                            Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                            Quote:
                            Originally Posted by Kurapika View Post
                            code 1: code 2: The first one doesn't jump to TheyAreEqualz even when it should, the second code works perfectly for me. (Sorry, for some reason, line skips are removed from my posts ;_; I think it's just my ****** Internet -.-')
                            From looking at your code, both routines are loading different things. Parts are loading words and others are loading half-words and neither lines up with the other routine. That is probably where your problem lies. A word is 4 bytes and a half-word is 2 bytes. Take that as you wish.
                            __________________

                            Paired with Simba
                            Reply With Quote
                              #117    
                            Old October 4th, 2013 (8:38 AM).
                            Kurapika's Avatar
                            Kurapika Kurapika is offline
                            Grudgebearer
                               
                              Join Date: Feb 2013
                              Location: Lavendar Town - Morocco
                              Gender: Male
                              Nature: Naughty
                              Posts: 406
                              Spoiler:
                              .word 0x020270B6 + (0x800D * 2)
                              Assigns the word (32 bits) 0x020270B6 + (0x800D * 2) = 0x020370D0 to .VAR. If you're wondering about the "weird" format, I made that to make it easier changing the variable used. Note however this would work only for temporary variables, 0x800D onwards. For the previous temporary variables, just increase the main address by 2 (in the example above, you would change it to .word 0x020270B8 + (0x8000 * 2), if you were to use variable 0x8000).

                              But does this way work for any other variables other than the 0x8000 family?
                              __________________
                              Reply With Quote
                                #118    
                              Old October 4th, 2013 (9:22 AM).
                              karatekid552's Avatar
                              karatekid552 karatekid552 is offline
                              What happens if I push it?....
                                 
                                Join Date: Nov 2012
                                Location: Do you really want to know? Really?
                                Gender: Male
                                Nature: Bold
                                Posts: 1,766
                                Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                                Quote:
                                Originally Posted by Kurapika View Post
                                Spoiler:
                                .word 0x020270B6 + (0x800D * 2)
                                Assigns the word (32 bits) 0x020270B6 + (0x800D * 2) = 0x020370D0 to .VAR. If you're wondering about the "weird" format, I made that to make it easier changing the variable used. Note however this would work only for temporary variables, 0x800D onwards. For the previous temporary variables, just increase the main address by 2 (in the example above, you would change it to .word 0x020270B8 + (0x8000 * 2), if you were to use variable 0x8000).

                                But does this way work for any other variables other than the 0x8000 family?
                                The others are DMA protected. Check my battle bg changer to see how to check vars of others. There is an in-game decrypter function.
                                __________________

                                Paired with Simba
                                Reply With Quote
                                  #119    
                                Old October 4th, 2013 (9:57 AM).
                                Kurapika's Avatar
                                Kurapika Kurapika is offline
                                Grudgebearer
                                   
                                  Join Date: Feb 2013
                                  Location: Lavendar Town - Morocco
                                  Gender: Male
                                  Nature: Naughty
                                  Posts: 406
                                  Oh damn!
                                  I'll check your tutorial, thank you bro!
                                  __________________
                                  Reply With Quote
                                    #120    
                                  Old December 2nd, 2014 (8:03 AM). Edited December 2nd, 2014 by Christos.
                                  Lance32497's Avatar
                                  Lance32497 Lance32497 is offline
                                  LanceKoijer of Pokemon_Addicts
                                     
                                    Join Date: Aug 2014
                                    Location: Criscanto town-Ginoa Region xD
                                    Gender: Male
                                    Nature: Adamant
                                    Posts: 793
                                    I got the error 'thumb' not recognized as an internal blah blah
                                    Reply With Quote
                                      #121    
                                    Old December 2nd, 2014 (1:47 PM).
                                    FBI's Avatar
                                    FBI FBI is offline
                                    Free supporter
                                    • Silver Tier
                                     
                                    Join Date: Jan 2013
                                    Location: Unknown Island
                                    Gender: Male
                                    Posts: 1,700
                                    Quote:
                                    Originally Posted by Lance32497 View Post
                                    I got the error 'thumb' not recognized as an internal blah blah
                                    You need to navigate in the command prompt to the directory containing "thumb.bat" and the rest of those files. From what it looks, you're trying to run it from a directory which doesn't have it.

                                    I would move all the files into 1 folder and do:
                                    cd path\To\File
                                    thumb source.asm compiled.bin


                                    Next time:
                                    http://www.pokecommunity.com/showthread.php?t=339708
                                    __________________
                                    ...
                                    Reply With Quote
                                      #122    
                                    Old June 11th, 2015 (6:31 AM).
                                    FamiliaWerneck's Avatar
                                    FamiliaWerneck FamiliaWerneck is offline
                                       
                                      Join Date: May 2015
                                      Location: São Paulo, Brasil
                                      Gender: Male
                                      Posts: 271
                                      So I have tried using the palette editing tutorial together with APE.
                                      I did change the palettes of the National Pokédex, but I failed as for the right ones.
                                      The broken images in OP could really be of help here.
                                      Instead of changing that "green" frame of the National Pokédex for the brown one from the Regional Pokédex, I changed the background of the Pokédex to red and brown (and I didn't even use red while editting palettes...)
                                      I opened the palettes, just like HackMew's tutorial said to, and I changed every green color for brown colors (only colors that were already in the palette) and this happened.
                                      Help?
                                      Reply With Quote
                                        #123    
                                      Old December 26th, 2016 (3:15 PM). Edited December 26th, 2016 by xRyanp92x.
                                      xRyanp92x xRyanp92x is offline
                                         
                                        Join Date: Dec 2015
                                        Gender: Male
                                        Nature: Relaxed
                                        Posts: 13
                                        whenever i try to assemble the asm it doesnt work i just keep getting this... idk why it wont work anyone have any ideas?

                                        Spoiler:


                                        Edit: ok nvm i figured it out :D

                                        Spoiler:
                                        Reply With Quote
                                          #124    
                                        Old December 28th, 2016 (5:43 PM).
                                        Shitik's Avatar
                                        Shitik Shitik is offline
                                        Supah Hott
                                           
                                          Join Date: Apr 2013
                                          Location: Personal
                                          Gender: Male
                                          Nature: Mild
                                          Posts: 106
                                          It helped me a lot. Thanks, HackMew (if you're even still around)!
                                          Reply With Quote
                                          Reply
                                          Quick Reply

                                          Sponsored Links
                                          Thread Tools

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

                                          BB code is On
                                          Smilies are On
                                          [IMG] code is On
                                          HTML code is Off

                                          Forum Jump


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