The PokéCommunity Forums Fan Games ROM Hacking Help
Guide Beginners' Directory

ROM Hacking Help Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Closed Thread
 
Thread Tools
  #1    
Old December 10th, 2017 (5:14 PM). Edited February 11th, 2018 by Avara.
Avara's Avatar
Avara Avara is offline
Author Of Tales
     
    Join Date: Dec 2011
    Location: Izantine
    Gender: Other
    Nature: Adamant
    Posts: 694

    ROM Hacking: Where do I start?

    Mapping: The process of creating areas for the player to explore; you could create your very own region if you wanted. You can also add custom tiles to give your hack a new look!
    Scripting: How you create your gameplay - NPCs, trainers on routes, Gym battles, etc are all done through scripting.
    Pokémon Editing: Almost all Pokémon data is easy to change, including but not limited to movesets, abilities and evolutions. You can even add new Pokémon to your hack, from later generations or of your own creation!
    Editing & Adding New Items: Maybe you'd like to add your own evolutionary stones or later generation item? Or something with a custom function?
    New Features: You have the potential to add tons of new features to your hack, whether it be engine upgrades to match later games or something completely original.
    Graphics Editing: As well as being able to add new tiles, you're also able to tweak other in-game graphics to your liking; e.g. trainer sprites and textboxes.
    For more in-depth guides, this post and this post might be worth having a look at! Both are a bit outdated by today's standards, but contain good points nonetheless. If you're here to play hacks, this post explains how to apply a patch to a ROM. ROM hacks are distributed in .ips or .ups format - asking for commercial ROMs or linking to them is strictly forbidden.

    Common Terms


    I'll go ahead and quote esperance who has explained common terms within ROM Hacking already:
    Spoiler:
    ROM - Stands for "Read Only Memory". On the GBA, this is the section of memory the game cartridge is loaded into. It is called read only because the device cannot modify that section of memory, only read from it. We call the game files ROMs because they are dumps of that data from the cartridge.

    ROM Hacking - The process of modifying said data, in order to achieve any number of changes within the game. For us, this could include editing trainers, maps, events, etc.

    Free Space - Sections of the ROM data that are empty of any meaningful data, and that can be overwritten safely. For example, a new image can be written over free space. In all the games, free space is denoted by the byte value 0xFF.

    Bits - The basic unit of data encoding on the computer (and in lots of other places), a bit can only have two values, 0 or 1 (sometimes represented as false/true or no/yes). Bits can be grouped together to make larger values, as you'll see below.
    Nybble (Nibble) - A grouping of four bits, it can represent any value from 0 to 15. It is not that commonly used in the hacking of GBA and games, but it is very common when hacking games for the GB and GBC.

    Byte - A grouping of eight bits, it can represent any value from 0 to 255. This is an extremely common data representation used throughout hacking.

    Word - A word is a larger grouping of bits, and it's exact value can vary from system to system. For the GBA, a word is 32 bits and can represent any value from 0 to 4,294,967,295. Because a word is 32 bits on the GBA, the term Half-Word is used to denote data that is 16 bits in length (representing any value from 0 to 65,535.
    Hexadecimal - A number system where the letters A through F are used to represent single digits beyond 0 through 9, counting like so: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, ... Numbers written in hexadecimal are often preceded by these symbols: "0x", "&h", or "$". It is used in not only ROM hacking but everywhere in computer science because of how conveniently it represents data. For example, a byte can be represented at most with two digits, with an value from 0x0 to 0xFF. This is one of the most important things you can learn as a beginning hacker. Fortunately, it is rather easy to convert between the two using the Calculator on Windows: put Calculator in Programmer Mode, and then you can toggle between the number modes.

    Hex Editing - Hex editing is the process of using a tool, called a Hex Editor, to modify the data of a file directly. It is called hex editing because a hex editor will display the data of the file in groupings of bits (usually bytes) in hexadecimal, which you can then modify.

    Maps - These are the locations that you can explore within the game, like Pallet Town and Route 121. The process of modifying this is called map editing or mapping.

    Scripts - These are sequences of data that tell the game how an event, like a gym leader battle, is supposed to be executed. The process of modifying this data is called scripting.
    Flags - A part of the memory that holds a true/false value. These are used heavily by scripts, and can be used for a number of things, such as marking a gym badge obtained and marking an item found. A specialized use is making characters disappear in-game.

    Variables - Slightly more complex, variables are half-words in the memory that can be used by scripts for storing values that cannot be represented by a simple true/false, like starter Pokémon choice. A specialized use in-game is disabling script tiles and level scripts (which we'll discuss later).
    Sprites - Sprites are the images you can see in the game, like Pikachu or Professor Oak. The process of creating a sprite is called spriting (and is usually done in something simple like Paint, contrary to popular belief).
    Overworld Sprites (OWs) - Sprites that are used in-game to represent characters, like the player or NPCs that you can interact with.

    Tileset - Tilesets are specialized sprites, which are broken into blocks of 8 x 8 pixels. These can then be used to construct a larger image on the screen, because saving space in the memory is very important to hacking.

    Tilemap - Tilemaps are structures of data that tell the device how to draw a tileset on the screen to construct the larger image.
    Assembly (ASM) - Assembly language is the lowest level human-readable representation of machine code (the code that computers interpret in order to run). The assembly language used by a device is specific to it's processor. For the GBA, this means a specialized ARM7 processor, and the ARM assembly language is used. Now ARM is special because not only does it have it's main language, it also includes a smaller, reduced instruction set mode called Thumb. A lot of GBA hacking involves writing custom code in Thumb.
    Assembly Hacking (ASM Hacking) - The process of injecting custom assembly code into the ROM to change how it's original programming operates.

    Toolbox


    Here are some links to popular programs used within hacking the third generation of Pokémon games. If you're interested in tools for NDS/3DS hacking, check out this post. You can find more tools here.
    • VisualBoyAdvance/no$gba: Emulators that can run GBA ROMs.
    • Lunar IPS: A patching tool. For expanded 32mb ROMs, NUPS is the best option.
    • HxD: A straightforward hex editor.
    • GraphicsGale: Graphics editor that can work with indexed images and GBA palettes.
    • AdvanceMap 1.92/1.95 by LU-HO: For a number of years now, this has been the tool for editing maps and tilesets. Here's to nicer alternatives coming soon!
    • XSE by HackMew: The most popular tool used for scripting.
    • THUMB Editor & Assembler by HackMew/karatekid552: Compiles ASM routines for insertion into a ROM.
    • Nameless Sprite Editor by link12552: A tool for editing and inserting sprites and other graphics.
    • G3T by Kurapika: This tool has several functions - editing Pokémon data, trainers and items.
    • Hopeless Trainer Editor by esperance: A tool for editing trainer data.

    Tutorials Directory


    This is a list of recommended tutorials to get you started, although these are by no means all the guides we have! Many more tutorials covering a wide range of topics can be found here if what you are looking for isn't listed.

    ROM Hacking Resources


    You'll find more resources for your ROM hack here.

    Tips

    #1: Make regular backups of your ROM, after every change you make; no matter how small. Have a changelog. Keep these safe! In the case that you run into an annoying bug, knowing exactly which changes you've made and when will help you A) identify it and B) squash it.

    Where do I go from here?


    Are you new to the forums and don't quite know your way around yet? Here are some directions!
    • If you're having an issue playing a ROM hack, you can check the Patching & Emulation Help Thread for a solution.
    • For general discussion of ROM hacks, you'll want to head over to the Fan Games Hub.
    • Been working on a hack already and want to present it? Click here to view an example thread.
    • For suggestions of hacks to play, check out the Fan Game Recommendations Thread.
    • Our Launchpad is where you should post if you'd like to share your idea for a hack, or form a team.
    • If you run into any problems and need to ask for help, you are welcome to do so right here in Rom Hacking.
    __________________
    pale tortured blue, blistering through
    Closed Thread

    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
    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 2:32 AM.