The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > miksy91
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices



Conversation Between miksy91 and hinkage
Showing Visitor Messages 41 to 50 of 60
  1. hinkage
    June 6th, 2012 07:16 PM
    hinkage
    That's not what I want (I don't think).

    What I mean is, if offset 0x8123456 has 0xF bytes, will offset 0x9123456 also have 0xF bytes?

  2. miksy91
    June 6th, 2012 05:56 PM
    miksy91
    Each GBA pointer is four bytes long.
    http://datacrystal.romhacking.net/wiki/Pointer

  3. hinkage
    June 6th, 2012 05:29 PM
    hinkage
    So would the 0x8XXXXXX offset have the same number of bytes as the 0x9XXXXXX offset?

  4. miksy91
    June 6th, 2012 11:58 AM
    miksy91
    As an example, I dug up an existing script of a bug catcher in viridian forest.

    #org 0x1605CD
    trainerbattle 0x0 0x214 0x0 0x81724F9 0x817251B
    msgbox 0x8172527 0x6 '"BUG POKéMON evolve quickly.\nThey'..."
    end

    #org 0x1724F9
    = Did you know that POKéMON evolve?

    For example that "0x81724F9" you see in the "trainerbattle" command actually calls for an asm routine to display text through a 4-byte pointer. The pointer in rom looks like this: F9 24 17 08 and so points to the ram address shown in the code 0x81724F9. The rom address then again is 0x1724F9 (as I pointed out in that other message, you can basically decrease 0x8000000 from the pointer to form the rom address it points to).
    If we wanted to point to 0x1012345 (ROM) instead, we'd have to add 0x8000000 to it to get 0x9012345 (the form you'd write the pointer in code) (or translated into how it's shown in the game: 45 23 01 09).

  5. hinkage
    June 6th, 2012 10:59 AM
    hinkage
    How I could do that while also making sure I only use offsets greater than 0x8E3CF64?

  6. miksy91
    June 6th, 2012 06:14 AM
    miksy91
    Don't use dynamic pointers then, it's easy enough to do all the repointing manually if you even have a simple idea of how big your script is going to be.

  7. hinkage
    June 6th, 2012 12:32 AM
    hinkage
    Hm... Actually when I tried #dynamic 0x9000000, it just assigns everything to offset 0x10000001

    What the helllllllllll

  8. miksy91
    June 4th, 2012 01:31 PM
    miksy91
    No problem, nice to hear you got it working!

  9. hinkage
    June 4th, 2012 12:31 PM
    hinkage
    Thanks for your help :D

  10. miksy91
    June 4th, 2012 04:49 AM
    miksy91
    You were missing one 0 from the end but yeah, 0x9000000 should work although I've never scripted with 3rd gen games before.
    But the reason for that is because the end of 16MB rom is at 0xFFFFFF which corresponds to ram address 0x8FFFFFF. The expanded 16MB rom is between offsets 0x1000000 and 0x1FFFFFF (which correspond to ram area 0x9000000-0x9FFFFFF).
    What you can see by this is that the pointers point to ram, not rom data.
    If you'd like to call something from WRAM for instance during a script, you'd set the fourth byte of the gba pointer to 02 (because WRAM is between 0x2000000-0x2FFFFFF).


All times are UTC. The time now is 10:01 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.