Home

Awesome

About oracles-disasm

This is a complete, documented disassembly of Oracle of Ages and Seasons for the Gameboy Color. When combined with LynnaLab, it is a level editing suite.

This repository builds US version ROMS. JP and EU versions are not supported.

See the wiki for detailed setup instructions.

Current status

The disassembly complete enough to be reassembled with ROM addresses shifted around arbitrarily. This is fairly well tested through the randomizer.

However there is still work to be done:

Branches

I've been extensively (ab)using branches in the main repository (https://github.com/stewmath/oracles-disasm) for various features and experiments. Most of these are stale branches for one-off experiments or hacks that I didn't bother creating separate repositories for.

The following branches are maintained (or at least updated every once in a while):

Other notable branches (not necessarily maintained):

In order to keep track of which patches are applied to a particular branch I'm using certain "tags" prefixed to each commit name, for example:

These tags also used in comments for the corresponding commits, which helps to understand when the code you're looking at has been modified from the master branch (without needing to use fancy git-fu).

Required tools to build

Note: WLA will not produce an exact matching Seasons ROM due to quirks with how empty space is handled; however, this has no effect on how the game functions. If you need to work around this for some reason, This branch of WLA can be used instead (but it needs to be updated!)

Build instructions

Once the dependencies are installed, running make will build both games. To build a specific game, run make ages or make seasons.

By default, the rom is built with precompressed assets, so that an exact copy of the original game is produced. In order to edit text, graphics, and other things, switch to the "hack-base" branch. Alternatively, run the "./swapbuild.sh" script in the root of the repository. This will switch the build mode to "modifiable" instead of "precompressed".

There are 4 build directories in total (for ages and seasons, vanilla or editable), selected by the makefile at build time. See Makefile for details.

See the wiki for detailed setup instructions.

Graphics files

(Note: Graphics editing will only work if you're on the "hack-base" branch or have disabled the use of precompressed graphics)

Graphics are stored as 4-color indexed PNG files. Other formats (RGB) are supported, as long as you stick to using the original 4 colors. But the indexed format works particularly well with editors such as Aseprite, which show you the 4-color palette available to you.

Some graphics have a corresponding .properties file (ie. spr_link.png has spr_link.properties). These are YAML files which specify certain properties about how they should be converted from PNG format to BIN (raw) format, and vice-versa.

The following parameters are accepted in .properties files:

Sprite graphics files (files beginning with spr_ instead of gfx_) are assumed to have the properties invert: true and interleave: true. However, these can be overridden by creating a .properties file.

If you wish to edit the files in raw .BIN format with an editor such as YY-CHR, run the following command from the root of the repository (using spr_link.png as an example):

python3 tools/gfx/gfx.py auto gfx/common/spr_link.png

This will create gfx/common/spr_link.bin, a raw 2bpp gameboy image. However you shouldn't have both a .bin and .png file with the same name; this will confuse the Makefile rules. You can simply remove gfx/spr_link.png, in which case the disassembly will read from gfx/spr_link.bin instead. Or, you may convert it back to PNG when you're done, then delete the .bin file. The following command will convert the .bin file back to .png:

python3 tools/gfx/gfx.py png gfx/common/spr_link.bin

Both of these commands will check the .properties file, if it exists, to decode and encode the image properly.

Disclaimer

The reverse-engineered code and assets in this repository belong largely to Capcom and Nintendo. While I can't really stop you from doing what you want with it, I strongly disavow its use for any commercial purposes. The purpose of this project is to research the inner workings of the Zelda Oracle games and facilitate the creation of non-commercial ROM hacks.

Scripts which do not contain any Nintendo/Capcom code (ie. python scripts in the "tools/" folder) may be considered "public domain" unless stated otherwise.