Hexadecimal Numbers?!

Discussion in 'GBA - Game Development, ROM Hacks and Translations' started by mbcrazed, Feb 28, 2013.

Feb 28, 2013

Hexadecimal Numbers?! by mbcrazed at 2:35 AM (1,695 Views / 0 Likes) 10 replies

  1. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
    How can I figure out the hex numbers in Pokemon Emerald? Thanks Tempers!~
     
  2. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,801
    Location:
    Sacramento, California
    Country:
    United States
    A hex number is simply a counting number using base 16. Much like how we use base 10 for regular counting (0 to 9, then 10 to 19, etc), Hex counts from 0 to F (where A to F represent 10 to 15), then the next count from 10 to 1F, then 20 to 2F, ... , E0 to EF, F0 to FF, 100 to 10F, etc etc.

    A representation of a base 10 number separating the digits for say 1569 could be shown as

    (1 * 10^3) + (5 * 10^2) + (6 * 10^1) + (9 * 10^0)

    So, say we have a hex number like h4EA3. What would it equal as base 10?

    (4 * 16^3) + (14 * 16^2) + (10*16^1) + (3 * 16^0) = 16384 + 3584 + 160 + 3 = 20131
     
  3. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
    Hmm.... So How can you tell which Pokemon you have? ( Sorry if It's a stupid question, I'm kind of a noob when it comes to this stuff)
     
  4. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,801
    Location:
    Sacramento, California
    Country:
    United States
    Well, that would require having information about the game on hand, which I do not have. But I'm sure whatever it is will have addresses (location in the file) of what is what, like what pokemon you have, what their level is, etc, and that will likely be held in hex format.
     
  5. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
    Thanks for this information! The reason I was needing to know is because I'm working on a, " Project."
     
  6. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    Um.. you can play the game of course. But since you are talking about hex numbers, I guess you want a more hacky way.

    Open your pokemon save file with this. http://filetrip.net/nds-downloads/utilities/download-pokegen-3110-f30882.html

    It'll do the hex number reading for you. :P
     
  7. ouch123

    Member ouch123 GBAtemp Fan

    Joined:
    Aug 2, 2012
    Messages:
    353
    Country:
    United States
    He already covered converting from hex to decimal so I'll go over converting from decimal to hex, which I'm assuming is what's confusing you.

    Let's take your post count as an example.
    15 < 231 < 255. So, we know that your post count can be represented using two hexadecimal digits (hexits).
    231 / 16 = 14, Remainder 7.
    14 = 0xE
    7 = 0x7
    Then, 231 = 0xE7.

    Edit: Urgh, misinterpreted the source of your confusion. If you want to know what Pokémon is associated with a given hexadecimal value, you will have to either consult a table or make one, in all likelihood.
     
  8. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
    I have Pokegen for uploading my shinies to pokecheck! :D It won't open though, It's a Pokemon Emerald save!
     
  9. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
  10. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
  11. mbcrazed
    OP

    Member mbcrazed GBAtemp Advanced Fan

    Joined:
    Nov 10, 2012
    Messages:
    536
    Location:
    Hiding somewhere in your .dll files.
    Country:
    China
    Thanks!! This made things a little not confusing about hexits! I'm pretty good at math, but the thing that's going to get me is the 0 through 9 A through F Thing!
     

Share This Page