Skip to content

Instantly share code, notes, and snippets.

@kanzure
Created February 1, 2013 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanzure/4688569 to your computer and use it in GitHub Desktop.
Save kanzure/4688569 to your computer and use it in GitHub Desktop.
python-rompatcher-readme

Rompatcher

Rompatcher is a python library for "patching" ROMs. It allows you to write (in a config file you can share) exactly what changes you want to make to a ROM. When you run the file, the changes are executed. The output is a usable ROM.

Installing

Simple.

sudo pip install rompatcher

or,

sudo python setup.py install

Windows users will have to wait a few hours.

Usage

Make a file called hack.py, and write something like this:

import rompatcher

# we'll be working on crystal version
from rompatcher.pokemon import crystal

# load up the rom for manipulation
rom = rompatcher.load_rom("baserom.gbc")

# make sure the player has the right Pokémon Crystal ROM
rom.check_md5("9f2922b235a5eeb78d65594e82ef5dde")

# change the ivysaur catch rate to maximum
rom[0x51444 + 10] = 0xFF

# save the new game (must appear last)
rom.save("prism.gbc")

To make the final rom, run it:

python hack.py

Then you can play "baserom.gbc".

TODO

  • support pokecrystal and pokered python utilities

License

BSD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment