• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex] How can I go about learning to hex-edit the Gen III ROMs?

bitKoder

completely unreasonable
36
Posts
7
Years
    • Seen Feb 28, 2024
    Hi guys!
    I'm relatively new to these forums, but I have had an interest in ROM hacking for quite some time. Until very recently, however, I have only been using other people's tools to make small adjustments, like changing a sprite or altering a few lines of script. Although now that I'm serious about making a proper ROM hack, I would like to be able to hex-edit the ROM file itself to change game mechanics. So my question is this: How can I learn to hex-edit the ROMs?

    I already know how to hex-edit palettes and images in the ROMs, plus I have years of experience with coding in various different languages, so I'm hoping it's not too big of a jump for me to learn how to hex-edit the game mechanics. So if you know how I can learn, Please let me know!
     

    Aryan 10

    Battle Legend
    163
    Posts
    7
    Years
  • Hex edit is pretty simple...

    if you are following someone's tutorial, then you just go to that offset and you are done

    and if you are researching then just mess with the bytes, it will cause some errors but you can discover something new

    and there's no need to go to hex unless you are adding something new

    you can do everything with the tools out there, good for a beginner but you can try hex but don't mess something...

    hex editing is just replacing numbers.
     

    bitKoder

    completely unreasonable
    36
    Posts
    7
    Years
    • Seen Feb 28, 2024
    Hex edit is pretty simple...

    if you are following someone's tutorial, then you just go to that offset and you are done

    and if you are researching then just mess with the bytes, it will cause some errors but you can discover something new

    and there's no need to go to hex unless you are adding something new

    you can do everything with the tools out there, good for a beginner but you can try hex but don't mess something...

    hex editing is just replacing numbers.

    I understand that hex editing is just replacing numbers, it's knowing what effect that will have on the game that is the hard part. I'm thinking of changing core game mechanics like allowing the player to run indoors, or making PP recharge at the end of every battle. As far as I'm aware there are no tutorials or tools for general changes like that.
     

    Aryan 10

    Battle Legend
    163
    Posts
    7
    Years
  • I understand that hex editing is just replacing numbers, it's knowing what effect that will have on the game that is the hard part. I'm thinking of changing core game mechanics like allowing the player to run indoors, or making PP recharge at the end of every battle. As far as I'm aware there are no tutorials or tools for general changes like that.

    Google is your friend, search on what you want, if you will find a thread then simply follow the instructions,

    what's so hard in it?

    and can I ask what base you are hacking


    EDIT: atleast if you can do hex editing you can use this

    https://www.pokecommunity.com/showthread.php?t=207026
     

    bitKoder

    completely unreasonable
    36
    Posts
    7
    Years
    • Seen Feb 28, 2024
    Google is your friend, search on what you want, if you will find a thread then simply follow the instructions,

    what's so hard in it?

    and can I ask what base you are hacking


    EDIT: atleast if you can do hex editing you can use this

    https://www.pokecommunity.com/showthread.php?t=207026

    Google won't have an answer for every tiny specific thing I want to change. I'd much rather learn how to find out myself then have to constantly rely on the knowledge of others which may or may not be available.

    The base I am hacking is Pokémon Emerald.

    Thanks for the running shoes tutorial :)
     

    machomuu

    Stuck in Hot Girl Summer
    10,507
    Posts
    16
    Years
  • I know how you feel, there are a lot of guides but when it comes to just learning about overall Hex Editing, it's a bit hard to know where to look, and for a long time I didn't.

    First up, right here:
    https://www.pokecommunity.com/showthread.php?t=329049

    This is a pretty in-depth introduction at Hex Editing. It'll give context to a lot of the "err"s and "huh?"s that you'd normally have when you're looking at tutorials or listening to general Hex chatter. Study that and maybe use one of your own roms as a reference.

    Next up:
    https://www.pokecommunity.com/showthread.php?t=369646

    The video series I wish I'd had back when I was still seriously into hacking, especially when I was starting out. In particular, you're going to want Tutorial 22, as that one goes over Hex.

    Now, granted, neither of these is going to tell you all you need to know about Pokemon's architecture and what's where when and how, but you'll start to get the feel for these things as you go through resources and use various tools, to the point that you might even get to the point where it's just inconvenient for you to use a tool for certain things and you just tackle things directly.

    Hope this helps, good luck!
     

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • I understand that hex editing is just replacing numbers, it's knowing what effect that will have on the game that is the hard part. I'm thinking of changing core game mechanics like allowing the player to run indoors, or making PP recharge at the end of every battle. As far as I'm aware there are no tutorials or tools for general changes like that.

    This is less of a hex editing issue and more of a game reverse engineering issue. There's some things where you can identify structures in a ROM and not have to understand what is using it, but for minor things it generally requires being able to reverse engineer the ROM and understanding Thumb assembly. If you're going that route, you can either use something like vba-m's debugger to set breakpoints on memory read/write, IDA Pro and an existing IDB (I know there's an Emerald IDB floating around somewhere), or some other tools. Bear in mind though that it's the small things which are the hardest to find, I think my first engine modification was something which changed some palette depending on a variable, because checking if the palette got read somewhere was easy.

    Other recommendation might be looking at the pokeruby project, they have a lot of disassembly and C code there.
     
    Back
    Top