pokeemerald is the pret team’s complete decompilation of Pokémon Emerald for the Game Boy Advance. Every line of C and ARM assembly has been reverse-engineered from the original ROM. The project builds a byte-for-byte identical copy of the game, giving ROM hackers and researchers a fully readable, modifiable codebase.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pret/pokeemerald/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Set up your build environment on Windows, macOS, or Linux and clone the repository.
Building
Compile pokeemerald.gba and verify it matches the original ROM checksum.
Project Structure
Navigate the source tree — src/, asm/, data/, include/, and the build toolchain.
Battle System
Explore the battle engine, AI, animations, and the Battle Frontier subsystem.
Scripting Guide
Write and modify event scripts, specials, and map scripts using the script engine.
Contributing
Learn the decompilation standards and how to submit clean, matching contributions.
Get up and running
Install dependencies
Install
build-essential, binutils-arm-none-eabi, git, and libpng-dev for your platform. See Installation for platform-specific instructions covering Windows (WSL1/msys2/Cygwin), macOS, and Linux.What’s inside
Pokémon data
Base stats, moves, abilities, experience tables, and the GetMonData/SetMonData API.
World and maps
Map layouts, metatile behaviors, field effects, events, and the overworld engine.
Graphics and audio
GBA graphics pipeline, sprite/tileset rules, and the M4A audio engine.
Save system
Flash sector layout, SaveBlock structures, and save/load mechanics.
pokeemerald is a decompilation project — it is not affiliated with Nintendo or Game Freak. You need a legal copy of the original Pokémon Emerald ROM to verify your build. Distributing the compiled ROM is not permitted.