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 August 4th, 2010 (9:54 AM).
Orinjmate's Avatar
Orinjmate Orinjmate is offline
The Orinj of the Mate
     
    Join Date: Jun 2010
    Location: England
    Gender: Male
    Nature: Calm
    Posts: 120
    So, I was thinking how useful it would be for mini games and things like that, if it were possible to insert a time limit ASM routine into the engine of a ROM. I thought about whether any of the GBA games already had a time limit function in them because I thought it would be something they would use at one point in one of the games; the first thing that came to mind was the berry blender but I'm not sure. If it is possible to insert a routine like this then it would be so once the time limit finishes the player warps or something like that and also so that the time remaining until zero is shown at the top of the screen like a countdown? Does anyone have any thoughts on how it may be possible to create an ASM routine like this?
    __________________
    Currently working on a new hack named Hollow.
    Pokemon Sky SD Creator
    Reply With Quote

    Relevant Advertising!

      #2    
    Old August 18th, 2010 (7:17 AM).
    jakerman999's Avatar
    jakerman999 jakerman999 is offline
    looking for spriters
       
      Join Date: Oct 2007
      Location: Ingersoll
      Age: 24
      Gender: Male
      Nature: Adamant
      Posts: 52
      Depending on what you want the timer for, you could probably do this in scripts. Set a variable to the number of seconds you want to count down in, and have a loop that contains
      Code:
      pause 0x1
      if variable = 0 return
      subvar variable 0x1
      And just not lock the script at the beginning. From there all thats needed is displaying how much time is left in a textbox. I leave this as an exercise to the reader.
      __________________
      you must build -inal pylons.

      jakerman999's PokePet

      sharpshell the level 45 Kabutops!


      I have a life, I bought it on e-bay.

      support shiny gold!
      Reply With Quote
        #3    
      Old October 3rd, 2010 (6:48 AM).
      Orinjmate's Avatar
      Orinjmate Orinjmate is offline
      The Orinj of the Mate
         
        Join Date: Jun 2010
        Location: England
        Gender: Male
        Nature: Calm
        Posts: 120
        So you mean time limits do not require ASM? How about if you wanted to have a countdown clock at the top of the screen or something? Would you have to insert images onto free space then use ASM to choose the co-ordiantes on the screen for those images etc?
        __________________
        Currently working on a new hack named Hollow.
        Pokemon Sky SD Creator
        Reply With Quote
          #4    
        Old October 3rd, 2010 (10:44 AM).
        Spherical Ice's Avatar
        Spherical Ice Spherical Ice is online now
        • Crystal Tier
         
        Join Date: Nov 2007
        Location: Bristol, UK
        Age: 19
        Posts: 5,217
        Quote:
        Originally Posted by jakerman999 View Post
        Depending on what you want the timer for, you could probably do this in scripts. Set a variable to the number of seconds you want to count down in, and have a loop that contains
        Code:
        pause 0x1
        if variable = 0 return
        subvar variable 0x1
        And just not lock the script at the beginning. From there all thats needed is displaying how much time is left in a textbox. I leave this as an exercise to the reader.
        Although I'm pretty sure that it can be done with scripts, pauses will lock the player anyway, thus making it pointless. I'm currently trying to find a command that may help.
        __________________

        A Pokemon that is discriminated!
        Support squirtle and make it everyone's favourite.
        Reply With Quote
          #5    
        Old October 3rd, 2010 (12:34 PM).
        Darthatron's Avatar
        Darthatron Darthatron is offline
        巨大なトロール。
        • Silver Tier
         
        Join Date: Jan 2006
        Location: Melbourne, Australia
        Age: 25
        Gender: Male
        Nature: Modest
        Posts: 1,152
        It requires ASM, there is no scripting way to do it. You have to branch a hooked routine from the game-time routine.
        __________________
        あなた は しきしゃ です
        わたし は ばか です
        Reply With Quote
          #6    
        Old October 8th, 2010 (9:08 PM).
        colcolstyles's Avatar
        colcolstyles colcolstyles is offline
        Yours truly
        • Crystal Tier
         
        Join Date: May 2008
        Location: The Bay Area
        Gender: Male
        Nature: Lonely
        Posts: 1,584
        Yeah, I don't think it would be possible without ASM. As I see it, you could hack a routine that is run once per frame to increment a counter and then, when the counter reaches a certain value, branch to the script initializer to warp the player somewhere. However, if the player saved and quit, they could cause some bugs so you'd have to disable saving during this mini-game or whatever you're using the time limit for.

        In short, it's possible but a number of precautions would have to be taken in order for it to be feasible. If you don't have a solid understanding of some of the game's core routines, it's probably out of your league for the time being.
        __________________

        Brother of Vrai
        Reply With Quote
          #7    
        Old October 10th, 2010 (8:35 AM).
        jakerman999's Avatar
        jakerman999 jakerman999 is offline
        looking for spriters
           
          Join Date: Oct 2007
          Location: Ingersoll
          Age: 24
          Gender: Male
          Nature: Adamant
          Posts: 52
          Quote:
          Originally Posted by Spherical Ice View Post
          Although I'm pretty sure that it can be done with scripts, pauses will lock the player anyway, thus making it pointless. I'm currently trying to find a command that may help.
          ah. My apologies then. What about the nop commands in XSE? would any of them occupy enough space for this to work?
          __________________
          you must build -inal pylons.

          jakerman999's PokePet

          sharpshell the level 45 Kabutops!


          I have a life, I bought it on e-bay.

          support shiny gold!
          Reply With Quote
            #8    
          Old October 10th, 2010 (9:46 AM).
          Spherical Ice's Avatar
          Spherical Ice Spherical Ice is online now
          • Crystal Tier
           
          Join Date: Nov 2007
          Location: Bristol, UK
          Age: 19
          Posts: 5,217
          Quote:
          Originally Posted by jakerman999 View Post
          ah. My apologies then. What about the nop commands in XSE? would any of them occupy enough space for this to work?
          They would do nothing, as the description said. So yeah, I'm sure it's an ASM-only "feature," for want of a better word.
          Reply With Quote
            #9    
          Old October 15th, 2010 (2:39 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
            You could simply use the timers built in to the GBA and access them via ASM. Just activate the IO registers, and it'll start tickin' away
            __________________



            Reply With Quote
              #10    
            Old October 23rd, 2010 (3:58 AM).
            sab's Avatar
            sab sab is offline
            Now too much of a life.
               
              Join Date: Jul 2008
              Location: Midgar
              Age: 21
              Gender: Male
              Nature: Timid
              Posts: 995
              r/s/e cycling road anyone?
              __________________
              Reply With Quote
                #11    
              Old October 31st, 2010 (6:01 AM).
              Orinjmate's Avatar
              Orinjmate Orinjmate is offline
              The Orinj of the Mate
                 
                Join Date: Jun 2010
                Location: England
                Gender: Male
                Nature: Calm
                Posts: 120
                Quote:
                Originally Posted by sab View Post
                r/s/e cycling road anyone?
                Now that I think of it the guy at the bottom of the cycle road does tell you how long you took. So I checked the script and it would appear that it is a special command 'special 0xE4' that sets the buffers.
                __________________
                Currently working on a new hack named Hollow.
                Pokemon Sky SD Creator
                Reply With Quote
                  #12    
                Old November 24th, 2010 (6:33 PM).
                sab's Avatar
                sab sab is offline
                Now too much of a life.
                   
                  Join Date: Jul 2008
                  Location: Midgar
                  Age: 21
                  Gender: Male
                  Nature: Timid
                  Posts: 995
                  Quote:
                  Originally Posted by Orinjmate View Post
                  Now that I think of it the guy at the bottom of the cycle road does tell you how long you took. So I checked the script and it would appear that it is a special command 'special 0xE4' that sets the buffers.
                  If I recall right, ser!go used that in the ice sled race for his second gym. I think he also edited (correct me if I'm wrong) the time it takes for certain text strings to ctivate. However, he also compiled his scripts in a way that makes them a pain (at least with xse) in the neck to read or decompile.
                  __________________
                  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 4:08 PM.