Welcome Contributors
The Pokémon Red/Blue disassembly is a community project maintained by pret (Pokémon Reverse Engineering Team). We welcome contributions of all kinds, from documentation improvements to code cleanup to new discoveries.Getting Started
Before contributing, make sure you can build the project:Fork the Repository
Visit github.com/pret/pokered and click “Fork” to create your own copy.
If
make compare fails on a fresh clone, there’s an issue with your build environment. Ask for help on Discord before continuing.Types of Contributions
Code Improvements
What we’re looking for:Label Names
Rename generic labels to descriptive names that explain what the code does.
Function Documentation
Add comments explaining complex routines, algorithms, and data structures.
Data Identification
Identify unknown data blocks and convert them to proper structures.
Macro Creation
Create macros to make repeated patterns more readable.
Code Organization
Reorganize files to group related functionality together.
Bug Documentation
Document known bugs and their behavior in the original game.
Documentation
- Wiki articles - Tutorials and explanations
- Code comments - Inline documentation
- README updates - Improve setup instructions
- Technical documentation - Document game mechanics
Bug Fixes
Acceptable bug-related contributions:- Documenting bugs with comments
- Creating separate branches with bug fixes
- Explaining why bugs exist in the original code
- Fixing bugs in the main branch (breaks matching build)
Contribution Guidelines
Code Style
Follow the existing code style:- Labels
- Indentation
- Comments
- Constants
Function labels: Local labels: Data labels:
PascalCase.camelCase starting with a dotPascalCase or SCREAMING_SNAKE_CASE for constantsTesting Your Changes
Verify Matching Build
Test in Emulator
Load the ROM in BGB, mGBA, or another emulator.
- Navigate to affected code areas
- Test any functionality you documented
- Verify behavior matches the original
make compare uses SHA-1 checksums to verify your ROM matches the original exactly. This is the gold standard for disassembly projects.Submitting Changes
Creating a Pull Request
Write a Good Commit Message
Good commit messages:
- “Document the battle damage calculation”
- “Rename generic labels in the menu system”
- “Identify wUnknownData as wTempMoveData”
- “Update main.asm”
- “Changes”
- “Fixed stuff”
Pull Request Description
Include in your PR description:- What changed: Brief summary of modifications
- Why: Explanation of the improvement
- Testing: How you verified it still matches
- References: Link to wiki pages, issues, or research
Community Guidelines
Getting Help
Discord
pret Discord#pokered channel for questions and discussion
GitHub Issues
pokered issuesReport bugs or discuss large changes
Wiki
pokered wikiTutorials and documentation
Symbols Branch
Symbols referenceComplete symbol files
Best Practices
Start Small
Start Small
Begin with small contributions:
- Fix typos in comments
- Rename a few labels
- Document a single function
Ask Before Big Changes
Ask Before Big Changes
For major refactoring or reorganization:
- Open an issue describing your plan
- Get feedback from maintainers
- Proceed once there’s consensus
One Thing Per PR
One Thing Per PR
Keep pull requests focused:
- One feature or improvement
- Related changes grouped together
- Easier to review and merge
Reference Your Research
Reference Your Research
When documenting game mechanics:
- Link to Bulbapedia articles
- Reference other gen 1 games (Yellow, GSC)
- Cite community research
Be Patient
Be Patient
Maintainers review PRs as time permits:
- May take days or weeks for review
- Feedback may request changes
- Discussion is part of the process
Code of Conduct
- Be respectful - Treat all contributors with kindness
- Be constructive - Focus on improving the project
- Be patient - Not everyone has the same skill level
- Be collaborative - Work together toward common goals
- Be open-minded - Consider different perspectives
Advanced Topics
Comparing with Other Games
When documenting code, compare with:- Pokémon Yellow - pret/pokeyellow
- Pokémon Gold/Silver - pret/pokegold
- Japanese Red/Green - Similar code, different versions
Understanding the Build System
Key files to understand:Makefile- Build rules and targetslayout.link- Memory layoutrgbdscheck.asm- RGBDS version verificationincludes.asm- Common definitions pre-included in all files
Working with Graphics
Graphics workflow:- Export PNG from ROM using tools
- Edit PNG in graphics editor
- Convert back to 2bpp with rgbgfx
- Process with gfx tool if needed
- Compress Pokémon sprites with pkmncompress
- gb-asm-tools - Additional utilities
- GB Studio - Visual Game Boy tools
- RGBDS documentation - Toolchain reference
Finding Undocumented Code
Areas that need work:- Search for
Func_orUnknownin the codebase - Check for generic labels like
asm_orData_ - Look for sparse comments
- Compare with pokeyellow to find documented equivalents
Recognition
Major contributors are listed in the project’s commit history and may be mentioned in the README. The pret community values all contributions, large and small. Notable contributions that make a difference:- Documenting entire game systems (battle, menu, map)
- Identifying and labeling large data structures
- Creating comprehensive wiki articles
- Mentoring new contributors
Additional Resources
Related Projects
- pokeyellow - Pokémon Yellow
- pokegold - Pokémon Gold/Silver
- pokecrystal - Pokémon Crystal
- pokepinball - Pokémon Pinball
- poketcg - Pokémon TCG
Learning Resources
Game Boy ASM Tutorial
GB ASM TutorialLearn Game Boy assembly from scratch
Pan Docs
Pan DocsComplete Game Boy technical reference
RGBDS Documentation
RGBDS DocsAssembler and toolchain documentation
Awesome Game Boy Dev
Awesome ListCurated Game Boy development resources
Debugging Resources
- BGB - bgb.bircd.org - Best Windows debugger
- Emulicious - emulicious.net - Cross-platform with great debugging
- SameBoy - github.com/LIJI32/SameBoy - Accurate emulator with debugger