Contributing to mGBA
mGBA is an open-source project and welcomes contributions from the community. Whether you're fixing bugs, adding features, improving documentation, or helping with testing, your contributions are valuable.
Ways to Contribute
Code Contributions
- Bug Fixes: Fix reported bugs or issues
- New Features: Implement requested features or improvements
- Performance Improvements: Optimize code for better performance
- Platform Support: Add or improve support for specific platforms
- Code Refactoring: Improve code quality and maintainability
Non-Code Contributions
- Bug Reports: Report bugs with detailed information
- Feature Requests: Suggest new features or improvements
- Documentation: Improve documentation and guides
- Testing: Test new builds and report issues
- Translation: Translate mGBA interface to other languages
Development Workflow
Fork and Clone
- Fork the mGBA repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/mgba.git cd mgba
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description
Make Changes
- Make your changes to the codebase
- Test your changes thoroughly
- Follow coding standards and style guidelines
- Write or update tests if applicable
Commit Changes
Write clear, descriptive commit messages:
git add . git commit -m "Brief description of changes Detailed explanation of what was changed and why."
Push and Create Pull Request
git push origin feature/your-feature-name
Then create a Pull Request on GitHub with:
- Clear description of changes
- Reference to related issues if applicable
- Testing information
- Screenshots or examples if relevant
Coding Standards
Code Style
- Follow existing code style in the codebase
- Use consistent indentation (spaces, not tabs)
- Write clear, self-documenting code
- Add comments for complex logic
- Keep functions focused and concise
Naming Conventions
- Use descriptive variable and function names
- Follow C naming conventions for C code
- Use camelCase for C++ code
- Avoid abbreviations unless widely understood
Testing
Before submitting a pull request:
- Test your changes on multiple platforms if possible
- Verify existing functionality still works
- Test edge cases and error conditions
- Check for memory leaks or performance regressions
- Test with various games and ROMs
Reporting Bugs
When reporting bugs, include:
- Detailed description of the problem
- Steps to reproduce the issue
- Expected vs. actual behavior
- System information (OS, CPU, GPU, mGBA version)
- ROM information (game name, region, version if known)
- Error messages or logs if available
- Screenshots or videos if applicable
Requesting Features
When requesting features:
- Describe the feature clearly and in detail
- Explain the use case or motivation
- Provide examples of how it would work
- Consider implementation complexity
- Check if similar features already exist
Documentation
Contributing to documentation:
- Improve existing documentation for clarity
- Add missing documentation for features
- Fix errors or outdated information
- Add code examples or tutorials
- Translate documentation to other languages
License
By contributing to mGBA, you agree that your contributions will be licensed under the Mozilla Public License 2.0 (MPL 2.0), the same license as mGBA itself.
Get Started: Check the Architecture documentation
to understand mGBA's codebase structure before making code contributions.
Related Articles
For more information about mGBA development:
- Building from Source - Complete guide for compiling mGBA from source code on different platforms
- Architecture Overview - Understanding mGBA's codebase structure, components, and design principles
- Lua Scripting API - API documentation for understanding scripting interface
- Troubleshooting Guide - Solutions to common development and build issues