pokeemerald is a community decompilation effort. The primary goal is accuracy: every line of C code must compile to machine code that is byte-identical to the original ROM. Contributions that change game behavior are only accepted when explicitly labeled as a bugfix or intentional feature addition.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.
Community
pret Discord
The main hub for decompilation discussion, review coordination, and contributor support. You must join before opening a PR.
IRC
IRC is also available for contributors who prefer it. Ask in Discord for current channel details.
All contributors are required to join the pret Discord and include their Discord username in every pull request.
Pull request requirements
Every PR must use the provided template and include two things:- Description — a clear summary of what changed and why.
- Discord contact info — your username (e.g.
pikalaxalt) or legacy username#numbers format (e.g.PikalaxALT#5823).
The matching requirement
make compare builds the ROM and compares it against the known-good SHA-1 hash:
How to contribute
Fork the repository
Fork pokeemerald on GitHub and clone your fork locally. Follow INSTALL.md to set up the build environment, including the agbcc toolchain.
Create a branch
Create a dedicated branch for your changes. Use a descriptive name that reflects the scope of the work (e.g.
decompile-battle-anim-util or fix-berry-crush-score).Make your changes and verify
Make your changes, then run The build must succeed and the comparison must pass before you proceed.
make compare to confirm the ROM is still byte-identical to the original.Open a pull request
Push your branch and open a PR against
pret/pokeemerald. Fill in the PR template completely:- Describe exactly what you changed and how you verified matching.
- Include your Discord username so reviewers can reach you.
Participate in review
Join the pret Discord and follow the
#pokeemerald channel. Reviewers may ask you to adjust your code to achieve a better match or improve readability. Respond promptly to keep the review moving.Welcomed contributions
Decompiling remaining asm stubs
Decompiling remaining asm stubs
Many functions still exist only as assembly stubs under
asm/. Replacing them with equivalent, matching C code is the core ongoing work of the project. See Decompilation Standards for matching requirements.Fixing matching issues
Fixing matching issues
Some already-decompiled functions have known non-matching details — minor differences in register allocation or instruction scheduling. Fixes that bring these closer to the original ROM are always welcome.
Documentation
Documentation
Improving comments, naming previously anonymous structs or fields, and writing documentation for this site all help future contributors understand the codebase faster.
Tooling improvements
Tooling improvements
Scripts, Makefiles, and build tooling improvements that do not change the ROM output are generally accepted. Discuss large changes in Discord first.
Changes that require prior discussion
- Behavior changes — any modification that causes
make compareto fail and is not an agreed-upon bugfix. - Refactoring — renaming, restructuring, or reformatting existing code in a way that breaks
make compare. - New features — adding gameplay content or mechanics not present in the original ROM.
#pokeemerald on Discord so the team can evaluate them before you invest time in implementation.