BluRosie / firegold-code

all of the code used in pokemon fire gold to implement new systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template

This template currently builds no code, but has many functions declared and ready to use that aren't very specific to any one application. Each new branch for code that is inserted into Fire Gold will be based on this branch.

Build Instructions

Build the same as the CFRU: python scripts/make.py

Cloning the repo

Open your terminal to whatever folder you want to download this repo into. Then, do the following to download the repo:

$ git clone https://github.com/BluRosie/firegold-code.git
$ cd firegold-code

Alternatively, you can download the code as a .zip file from the arrow above. You can navigate to whichever branch for whichever feature you would like to check out as well.

Adding your ROM

Copy your ROM to this directory and rename it BPRE0.gba.

Configuration

Compile Time Constants

Open scripts/make.py in a text editor to set some compile-time configuration.

The build system is smart enough to find enough free space on its own, and if you want it to be inserted at a particular address, you can specify it by updating the definition of OFFSET_TO_PUT:

OFFSET_TO_PUT = 0x1C88650
SEARCH_FREE_SPACE = True   # Set to True if you want the script to search for free space
                           # Set to False if you don't want to search for free space as you for example update the engine

The build system will use OFFSET_TO_PUT to determine where in the ROM it should start looking for free space if SEARCH_FREE_SPACE is True. Otherwise, the build system places the code to insert directly at OFFSET_TO_PUT.

Building the project itself

Once you're ready, run:

$ python scripts/make.py

This won't actually modify BPRE0.gba, instead your output will be in test.gba. Naturally, test it in an emulator before continuing.

Credits

Research made possible by pokeemerald and pokefirered.

Spherical Ice initially made the Unown Report code. I forked it and ported it to the CFRU's build system.

Skeli made the build system used in the CFRU which is used here.

About

all of the code used in pokemon fire gold to implement new systems


Languages

Language:C 79.4%Language:Python 19.2%Language:Assembly 1.5%