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!

Reply
 
Thread Tools
  #1    
Old January 27th, 2010 (10:21 AM). Edited January 29th, 2010 by Coolboyman.
Coolboyman's Avatar
Coolboyman Coolboyman is offline
Veteran Hacker
     
    Join Date: Sep 2003
    Location: The East Bay
    Age: 29
    Gender: Male
    Nature: Bold
    Posts: 471
    Here's a simple thing I did for Prism. It lets you run when you hold B.

    First thing's first. When the bike shop owner calls you it's pretty buggy without the correct flags. So lets just disable that.

    97BFA:
    ld hl,$7BE4 (21 E4 7B) - This will prevent the "bike step count" from working. It will always write 00 to the RAM where it's supposed to add up, so the bike shop owner will never call you.

    10000: call $7E66 (CD 66 7E) - This will call the ASM from 13E66 needed to make this work.

    13E66:
    call $4017 (CD 17 40) - This is what was originally at 10000, to make sure nothing "screws up" we'll just move it here.
    ld de,$D682 (11 82 D6) - Loads D682 from the ram into de (which is what determines if Hiro is on the bike or not)
    ld c,$04 (0E 04) - Since the RAM uses the same location to check if you are surfing (identified with 04), let's make sure this function does nothing if you are surfing.
    ld a,[de] (1A) - Puts the contents of de (D682 in RAM) into a.
    sbc a,c (99) - Subtracts c from a
    jr z,$7E8B (28 18) - Checks if a is equal to 0. If so, jump ahead 18 bytes which is ret (C9), ending the function. Since a can only equal 0 if it was previous 4, this will only happen if you are surfing.
    ld de,$CF29 (11 29 CF) - loads CF29 (indicates what keys are down) into de.
    ld a,[de] (1A) - loads the contents of de into a.

    Since bit 1 is on if B is down, let's make it so it ignores the other bits. Let me know if there's an eaiser way of doing this, for some reason the other bit commands weren't working for me.

    res 0,a (CB 87) - turns bit 0 in a to off (A)
    res 2,a (CB 97) - turns bit 2 in a to off (Select)
    res 3,a (CB 9F) - turns bit 3 in a to off (Start)
    res 4,a (CB A7) - turns bit 4 in a to off (Right)
    res 5,a (CB AF) - turns bit 5 in a to off (Left)
    res 6,a (CB B7) - turns bit 6 in a to off (Up)
    res 7,a (CB BF) - turns bit 7 in a to off (Down)
    rcc, a (CB 0F) - shifts the bits in A down 1, changing 2 into 1.
    ld de,$D682 (11 82 D6) - loads D682 into de again
    ld [de],a (12) - Puts the contents of a into de.
    ret (C9)

    This will make the game write 01 into D682 if B is held down. If D682 is 01, that will make your characters speed increase. If you use this, just please give me credit. Enjoy.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old January 30th, 2010 (10:12 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: 10,001
    Wow, no one has replied? This is pretty awesome, CBM. Well done. I'm not sure how many people use it; due to the GBA hacking generation. Nevertheless this is still awesome.
    __________________
    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
      #3    
    Old January 30th, 2010 (1:21 PM).
    .com .com is offline
       
      Join Date: Jul 2008
      Age: 22
      Gender: Male
      Posts: 666
      Send a message via Windows Live Messenger to .com
      Quote:
      Originally Posted by The Doctor View Post
      Wow, no one has replied? This is pretty awesome, CBM. Well done. I'm not sure how many people use it; due to the GBA hacking generation. Nevertheless this is still awesome.
      This pretty sums up what I would've posted lol.
      Reply With Quote
        #4    
      Old January 30th, 2010 (4:19 PM).
      Melash's Avatar
      Melash Melash is offline
      Back for now.
         
        Join Date: May 2008
        Location: Idaho
        Age: 23
        Gender: Male
        Nature: Relaxed
        Posts: 425
        Thank you very much for posting this, this should come in very handy for a project I am still working on. Great job.
        Reply With Quote
          #5    
        Old February 2nd, 2010 (7:16 PM).
        Team Rocket's Raichu Team Rocket's Raichu is offline
        Bye-Bye!
           
          Join Date: Mar 2009
          Age: 21
          Posts: 534
          Quote:
          Originally Posted by Melash View Post
          Thank you very much for posting this, this should come in very handy for a project I am still working on. Great job.
          I thought you said on Skeentendo you had canceled it or put it on hiatus or something like that.

          Well anyway. Nice thing you made there CBM. Might just do this for a crystal game anyway.
          __________________

          I'm a supermod of that forum.

          I've left, bye PC.
          Reply With Quote
            #6    
          Old February 2nd, 2010 (9:48 PM).
          Melash's Avatar
          Melash Melash is offline
          Back for now.
             
            Join Date: May 2008
            Location: Idaho
            Age: 23
            Gender: Male
            Nature: Relaxed
            Posts: 425
            Quote:
            Originally Posted by Team Rocket's Raichu View Post
            I thought you said on Skeentendo you had canceled it or put it on hiatus or something like that.
            I actually meant to say that the project has not been cancelled, it will be revived and continued soon. But to stay on topic....
            Quote:
            Originally Posted by Team Rocket's Raichu View Post
            Well anyway. Nice thing you made there CBM. Might just do this for a crystal game anyway.
            Would this hack work for Crystal also? Crystal is slightly different, so it's possible it wouldn't work.
            Reply With Quote
              #7    
            Old February 4th, 2010 (2:17 PM).
            Coolboyman's Avatar
            Coolboyman Coolboyman is offline
            Veteran Hacker
               
              Join Date: Sep 2003
              Location: The East Bay
              Age: 29
              Gender: Male
              Nature: Bold
              Posts: 471
              Quote:
              Originally Posted by Melash View Post
              I actually meant to say that the project has not been cancelled, it will be revived and continued soon. But to stay on topic....

              Would this hack work for Crystal also? Crystal is slightly different, so it's possible it wouldn't work.
              You would have to find the new RAM addresses, but I believe once you do that it shouldn't be hard to put this into Crystal
              Reply With Quote
                #8    
              Old August 2nd, 2010 (9:20 PM).
              Melash's Avatar
              Melash Melash is offline
              Back for now.
                 
                Join Date: May 2008
                Location: Idaho
                Age: 23
                Gender: Male
                Nature: Relaxed
                Posts: 425
                I seem to be having several problems with this. I input it exactly as you have posted, and checked it several times to confirm it was correct, and it seems to be so.

                The major glitch I'm having is that whenever I hold down "B" when exiting a textbox (with an NPC or similar) the player will automatically mount the bike.

                I've also had the same glitch occur after battling certain trainers, but I think I can fix that. I may have also been caused by holding down the "B" button.
                Reply With Quote
                  #9    
                Old August 3rd, 2010 (2:45 AM).
                Sawakita's Avatar
                Sawakita Sawakita is offline
                Not Invented Here
                   
                  Join Date: May 2010
                  Gender: Male
                  Posts: 180
                  Nice tutorial!

                  Quote:
                  Originally Posted by Coolboyman View Post

                  Since bit 1 is on if B is down, let's make it so it ignores the other bits. Let me know if there's an eaiser way of doing this, for some reason the other bit commands weren't working for me.

                  res 0,a (CB 87) - turns bit 0 in a to off (A)
                  res 2,a (CB 97) - turns bit 2 in a to off (Select)
                  res 3,a (CB 9F) - turns bit 3 in a to off (Start)
                  res 4,a (CB A7) - turns bit 4 in a to off (Right)
                  res 5,a (CB AF) - turns bit 5 in a to off (Left)
                  res 6,a (CB B7) - turns bit 6 in a to off (Up)
                  res 7,a (CB BF) - turns bit 7 in a to off (Down)
                  rcc, a (CB 0F) - shifts the bits in A down 1, changing 2 into 1.
                  ld de,$D682 (11 82 D6) - loads D682 into de again
                  ld [de],a (12) - Puts the contents of a into de.
                  ret (C9)

                  This will make the game write 01 into D682 if B is held down. If D682 is 01, that will make your characters speed increase. If you use this, just please give me credit. Enjoy.
                  Maybe it's a stupid suggestion but, instead of resetting one bit at a time, why don't you use:
                  and 02 (E6 02) - so it reset all bits but the "B"-bit
                  rcc, a (CB 0F) - shifts the bits in A down 1, changing 2 into 1.
                  ld de,$D682 (11 82 D6) - loads D682 into de again
                  ld [de],a (12) - Puts the contents of a into de.
                  ret (C9)

                  Is it one of the commands you said weren't working?
                  __________________



                  | 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |
                  Reply With Quote
                    #10    
                  Old August 3rd, 2010 (7:09 AM).
                  Full Metal's Avatar
                  Full Metal Full Metal is offline
                  C(++) Developer.
                  • Silver Tier
                   
                  Join Date: Jan 2008
                  Location: In my mind.
                  Age: 21
                  Gender: Male
                  Nature: Timid
                  Posts: 806
                  Send a message via Windows Live Messenger to Full Metal
                  The following:
                  Spoiler:

                  call $4017 (CD 17 40) - This is what was originally at 10000, to make sure nothing "screws up" we'll just move it here.
                  ld de,$D682 (11 82 D6) - Loads D682 from the ram into de (which is what determines if Hiro is on the bike or not)
                  ld c,$04 (0E 04) - Since the RAM uses the same location to check if you are surfing (identified with 04), let's make sure this function does nothing if you are surfing.
                  ld a,[de] (1A) - Puts the contents of de (D682 in RAM) into a.
                  sbc a,c (99) - Subtracts c from a
                  jr z,$7E8B (28 18) - Checks if a is equal to 0. If so, jump ahead 18 bytes which is ret (C9), ending the function. Since a can only equal 0 if it was previous 4, this will only happen if you are surfing.
                  and 02 (E6 02) - so it reset all bits but the "B"-bit
                  rcc, a (CB 0F) - shifts the bits in A down 1, changing 2 into 1.
                  ld de,$D682 (11 82 D6) - loads D682 into de again
                  ld [de],a (12) - Puts the contents of a into de.
                  ret (C9)

                  could also be repointed, correct?
                  I'm thinking I might use this as a test for my new package system I'm making.
                  If it's alright with you, could I post the finished package on this thread for the metal gen. hackers to test?
                  __________________

                  ★ full metal.

                  I like to push it,
                  and push it,
                  until my luck is over.
                  Reply With Quote
                    #11    
                  Old August 5th, 2010 (9:11 AM).
                  Melash's Avatar
                  Melash Melash is offline
                  Back for now.
                     
                    Join Date: May 2008
                    Location: Idaho
                    Age: 23
                    Gender: Male
                    Nature: Relaxed
                    Posts: 425
                    Still waiting for Coolboyman's response...
                    Reply With Quote
                      #12    
                    Old August 19th, 2010 (11:39 AM). Edited August 19th, 2010 by miksy91.
                    miksy91's Avatar
                    miksy91 miksy91 is offline
                    Dark Energy is back in action! ;)
                       
                      Join Date: Oct 2008
                      Location: A small country in the North
                      Gender: Male
                      Nature: Relaxed
                      Posts: 1,435
                      Quote:
                      Originally Posted by Melash View Post
                      I seem to be having several problems with this. I input it exactly as you have posted, and checked it several times to confirm it was correct, and it seems to be so.

                      The major glitch I'm having is that whenever I hold down "B" when exiting a textbox (with an NPC or similar) the player will automatically mount the bike.

                      I've also had the same glitch occur after battling certain trainers, but I think I can fix that. I may have also been caused by holding down the "B" button.
                      Why not just modify the bike-sprite to look like the walking one ?
                      I'm pretty sure CBM has done that if the script works that way.

                      EDIT:
                      Thanks CBM as it works fine for me (and, I actually understood part of the things I was doing)
                      I'll give you credit for this.
                      __________________
                      My Rom Hack



                      Fixing bugs in a ROM hack
                      CP of encountered pokemon in GO

                      Learn how to hack GB/C games:

                      Check my GameBoy/Color hacking videos in Youtube
                      -The video set uses Pokemon Silver (U) rom for demonstrations
                      Reply With Quote
                        #13    
                      Old August 19th, 2010 (1:31 PM). Edited August 20th, 2010 by wiidude645.
                      wiidude645's Avatar
                      wiidude645 wiidude645 is offline
                      I'm Just Beast Like That
                         
                        Join Date: Oct 2009
                        Gender: Male
                        Posts: 8
                        what do you use to insert them? Is there a certain program to do so? Someone please tell me!
                        Reply With Quote
                          #14    
                        Old August 19th, 2010 (9:02 PM).
                        Melash's Avatar
                        Melash Melash is offline
                        Back for now.
                           
                          Join Date: May 2008
                          Location: Idaho
                          Age: 23
                          Gender: Male
                          Nature: Relaxed
                          Posts: 425
                          Quote:
                          Originally Posted by miksy91 View Post
                          Why not just modify the bike-sprite to look like the walking one ?
                          I'm pretty sure CBM has done that if the script works that way.

                          EDIT:
                          Thanks CBM as it works fine for me (and, I actually understood part of the things I was doing)
                          I'll give you credit for this.
                          Yes, the bike sprite and the bike music need to be disabled for this to work.
                          Reply With Quote
                            #15    
                          Old August 19th, 2010 (9:20 PM).
                          miksy91's Avatar
                          miksy91 miksy91 is offline
                          Dark Energy is back in action! ;)
                             
                            Join Date: Oct 2008
                            Location: A small country in the North
                            Gender: Male
                            Nature: Relaxed
                            Posts: 1,435
                            Quote:
                            Originally Posted by Melash View Post
                            Yes, the bike sprite and the bike music need to be disabled for this to work.
                            For me, the code automatically disabled the bike music
                            __________________
                            My Rom Hack



                            Fixing bugs in a ROM hack
                            CP of encountered pokemon in GO

                            Learn how to hack GB/C games:

                            Check my GameBoy/Color hacking videos in Youtube
                            -The video set uses Pokemon Silver (U) rom for demonstrations
                            Reply With Quote
                              #16    
                            Old August 20th, 2010 (12:54 AM).
                            Melash's Avatar
                            Melash Melash is offline
                            Back for now.
                               
                              Join Date: May 2008
                              Location: Idaho
                              Age: 23
                              Gender: Male
                              Nature: Relaxed
                              Posts: 425
                              Quote:
                              Originally Posted by miksy91 View Post
                              For me, the code automatically disabled the bike music
                              Hold on, are you talking about just regularly using the running shoes? During normal use of holding down the "B" button, everything functions just fine. However, if you hold down B when exiting a textbox, it will sometimes cause the player to mount the bike and cause the music to start playing.

                              The exact same code isn't going to function differently for the same game.
                              Reply With Quote
                                #17    
                              Old August 20th, 2010 (11:02 AM).
                              miksy91's Avatar
                              miksy91 miksy91 is offline
                              Dark Energy is back in action! ;)
                                 
                                Join Date: Oct 2008
                                Location: A small country in the North
                                Gender: Male
                                Nature: Relaxed
                                Posts: 1,435
                                No, when exiting a textbox it will mount the bike but will not start playing the bike music. I've tested it both Outside & Inside.
                                __________________
                                My Rom Hack



                                Fixing bugs in a ROM hack
                                CP of encountered pokemon in GO

                                Learn how to hack GB/C games:

                                Check my GameBoy/Color hacking videos in Youtube
                                -The video set uses Pokemon Silver (U) rom for demonstrations
                                Reply With Quote
                                  #18    
                                Old August 22nd, 2010 (10:05 AM).
                                miksy91's Avatar
                                miksy91 miksy91 is offline
                                Dark Energy is back in action! ;)
                                   
                                  Join Date: Oct 2008
                                  Location: A small country in the North
                                  Gender: Male
                                  Nature: Relaxed
                                  Posts: 1,435
                                  Double-post, but for especially good reason.

                                  You're right about the fact it plays the bike-music (for example sometimes after losing a battle).
                                  It depends on the Map Loading Process -data (see the Scripting Compendium).

                                  I tested it with Blackthorn City by changing 07 to 08 at 154c2, and bike music didn't start playing anymore after I failed in a trainer battle.
                                  However, there are other locations too where you have to do the same thing.
                                  __________________
                                  My Rom Hack



                                  Fixing bugs in a ROM hack
                                  CP of encountered pokemon in GO

                                  Learn how to hack GB/C games:

                                  Check my GameBoy/Color hacking videos in Youtube
                                  -The video set uses Pokemon Silver (U) rom for demonstrations
                                  Reply With Quote
                                    #19    
                                  Old August 22nd, 2010 (6:18 PM).
                                  Melash's Avatar
                                  Melash Melash is offline
                                  Back for now.
                                     
                                    Join Date: May 2008
                                    Location: Idaho
                                    Age: 23
                                    Gender: Male
                                    Nature: Relaxed
                                    Posts: 425
                                    Quote:
                                    Originally Posted by miksy91 View Post
                                    Double-post, but for especially good reason.

                                    You're right about the fact it plays the bike-music (for example sometimes after losing a battle).
                                    It depends on the Map Loading Process -data (see the Scripting Compendium).

                                    I tested it with Blackthorn City by changing 07 to 08 at 154c2, and bike music didn't start playing anymore after I failed in a trainer battle.
                                    However, there are other locations too where you have to do the same thing.
                                    Changing the map loading process for every map that needs it is a little impractical, and could potentially cause glitches. Try disabling the bike music instead, just search for it in the VBA debugger.
                                    Reply With Quote
                                      #20    
                                    Old March 17th, 2013 (1:27 PM).
                                    80C's Avatar
                                    80C 80C is offline
                                    "This is a text filler!"
                                       
                                      Join Date: Oct 2012
                                      Posts: 157
                                      Very nice CBM!

                                      I have got an idea\question:
                                      could that be converted and used in Pokemon Red\Blue\Yellow?
                                      __________________
                                      Ripeness is all...
                                      POKEMON GRAPE DEMO 3.1 AVAILABLE!
                                      CLICK THE BANNER & DOWNLOAD THE BEST GEN.1 HACK ROM EVER MADE!

                                      Reply With Quote
                                        #21    
                                      Old March 30th, 2013 (4:15 AM).
                                      FroggestSpirit's Avatar
                                      FroggestSpirit FroggestSpirit is offline
                                         
                                        Join Date: Feb 2012
                                        Posts: 17
                                        Yes, it could be. it'd probably be a lot different, but I imagine it'd be like the bicycle
                                        __________________
                                        I'm ASM
                                        My Youtube channel
                                        Chain correctly in 4th gen Click here
                                        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 7:59 PM.