mGBA Developer Platform

Build, contribute, and extend the most accurate Game Boy Advance emulator. Access developer tools, API documentation, source code, and contribution guidelines.

100+
Contributors
50K+
Lines of Code
10+
Supported Platforms

mGBA is an open-source project built by a community of developers. Whether you're interested in contributing code, building custom tools, or creating platform ports, the developer platform provides all the resources you need to get started.

Developer Tools

Powerful tools and APIs for extending and customizing mGBA

📜

Lua Scripting API

Full Lua 5.4 scripting support enables you to create custom tools, trainers, automation scripts, and game modifications. Access memory, CPU registers, inputs, and emulator functions programmatically.

🐛

Debugger Tools

Built-in debugging capabilities for analyzing game behavior, inspecting memory, and testing emulation accuracy. Perfect for game development and ROM testing.

  • Memory inspector
  • Register viewer
  • Breakpoint support
  • Step-by-step execution
  • Disassembler integration
💾

Save State Analyzer

Advanced save state system with analysis tools. Inspect, modify, and convert save states between formats. Export and import functionality for cross-platform compatibility.

  • Save state inspection
  • Format conversion
  • Cross-platform compatibility
  • State comparison tools
  • Automated testing support
🎮

ROM Tester

Comprehensive ROM testing tools for verifying game compatibility and identifying issues. Automated testing framework for regression testing and compatibility verification.

  • Automated ROM testing
  • Compatibility reports
  • Regression testing
  • Test suite integration
  • CI/CD support

Performance Profiler

Built-in profiling tools for analyzing emulation performance. Identify bottlenecks, optimize rendering, and measure accuracy vs. speed trade-offs.

  • CPU profiling
  • Memory usage analysis
  • Frame time statistics
  • Performance benchmarks
  • Optimization recommendations
🔧

Configuration API

Programmatic access to emulator configuration. Create custom configuration tools, manage settings programmatically, and build automation scripts.

Development Resources

Everything you need to start developing with mGBA

Source Code Repository

Access the complete mGBA source code on GitHub. Browse the codebase, read commit history, and understand the architecture.

Build Instructions

Learn how to build mGBA from source on Windows, macOS, Linux, and other platforms. Step-by-step guides for each platform.

API Documentation

Complete API reference for Lua scripting, configuration, and internal APIs. Examples, tutorials, and best practices.

Architecture Overview

Understand mGBA's internal architecture, design decisions, and code organization. Essential reading for contributors.

Contributing Guidelines

Learn how to contribute to mGBA. Coding standards, pull request process, and development workflow.

Development Roadmap

Track upcoming features, planned improvements, and development priorities. See what's being worked on.

Platform Development

Port mGBA to new platforms or optimize existing ports

Windows

Windows development with MSVC or MinGW. Direct3D and OpenGL backends. MSI installer and portable builds.

  • MSVC 2015+ or MinGW
  • DirectX SDK required
  • CMake build system
  • Qt or SDL2 frontend
🍎

macOS

Native Cocoa interface with Metal rendering. Universal binaries for Intel and Apple Silicon. Xcode project included.

  • Xcode 10+ required
  • Metal graphics backend
  • Universal binary support
  • Cocoa frontend
🐧

Linux

Multiple frontend options: Qt, GTK+, SDL2, or command-line. OpenGL and Vulkan support. Distribution packages available.

  • GCC or Clang compiler
  • Qt, GTK+, or SDL2
  • OpenGL/Vulkan support
  • CMake build system
🤖

Android

Android NDK development with Java/Kotlin frontend. JNI bindings for core emulation. Touch-optimized controls.

  • Android NDK r19+
  • Java/Kotlin frontend
  • OpenGL ES rendering
  • Gradle build system
📱

iOS

Native iOS development with Objective-C/Swift frontend. Metal rendering backend. Xcode project included.

  • Xcode 10+ required
  • Metal graphics backend
  • Objective-C/Swift frontend
  • iOS 12.0+ target
⚙️

Embedded Systems

Port mGBA to embedded systems like Nintendo 3DS, Wii U, PlayStation Vita, and other platforms via homebrew.

  • Custom build configurations
  • Platform-specific optimizations
  • Homebrew SDK support
  • Limited resource handling

Interested in creating a new port? Check the porting guides or discuss your idea with the community.

Developer Community

Connect with other developers, get help, and contribute to mGBA

🐙

GitHub

Primary development platform. Report bugs, submit pull requests, and track issues.

Visit GitHub →
💬

Discussions

GitHub Discussions for questions, ideas, and general discussion about mGBA development.

Join Discussions →
📋

Issue Tracker

Report bugs, request features, and track development progress on GitHub Issues.

View Issues →
🔍

Code Review

All code contributions go through peer review. Learn from code reviews and contribute to reviews.

View Pull Requests →
📝

Release Notes

Track changes, improvements, and new features in each release. Review release history and changelogs.

View Releases →
📊

Contributor Stats

See who's contributing, track contributions over time, and recognize community members.

View Contributors →

Code Examples

Quick examples to get you started with mGBA development

Lua Script Example

Simple Lua script to display player coordinates:

-- Display player X and Y coordinates
local core = require("core")

core.addFrameCallback(function()
    local x = core.cpuRead32(0x02000000)
    local y = core.cpuRead32(0x02000004)
    
    print(string.format("Player Position: X=%d, Y=%d", x, y))
end)
Learn More →

Building from Source

Quick start commands for building mGBA:

# Clone the repository
git clone https://github.com/mgba-emu/mgba.git
cd mgba

# Configure with CMake
cmake -S . -B build

# Build
cmake --build build

# Install (optional)
cmake --install build
View Full Guide →

Development Requirements

System requirements and dependencies for building mGBA

Build System

  • CMake 3.1 or later
  • Platform-specific build tools
  • Git for source control
  • Python 3.6+ (for scripts)

Compilers

  • GCC 4.9+ or Clang 3.5+
  • MSVC 2015+ (Windows)
  • Xcode 10+ (macOS/iOS)
  • Android NDK r19+ (Android)

Dependencies

  • SDL2, Qt5/6, or GTK+3 (frontend)
  • OpenGL 3.3+ or Vulkan 1.0+
  • zlib (compression)
  • libpng (screenshots)
  • Lua 5.4 (scripting)

Platform-Specific

  • DirectX SDK (Windows)
  • Xcode Command Line Tools (macOS)
  • Development libraries (Linux)
  • Android SDK/NDK (Android)

Development Tools

  • Debugger (GDB, LLDB, Visual Studio)
  • Version control (Git)
  • Code editor or IDE
  • Memory profiler (optional)

Testing

  • Test ROMs for compatibility
  • Automated test suite
  • Performance benchmarks
  • Platform-specific test tools

Developer FAQ

Common questions about developing with mGBA

Building mGBA from source depends on your platform. On Windows, install CMake and MSVC or MinGW. On macOS, install Xcode and use CMake. On Linux, install build-essential and development libraries. See the building guide for detailed platform-specific instructions.

Contributions are welcome! Start by reading the contributing guidelines. You can contribute code, documentation, bug reports, or feature requests. Fork the repository, make your changes, and submit a pull request. All contributions go through code review.

The Lua scripting API provides full Lua 5.4 support for creating custom tools, trainers, automation scripts, and game modifications. You can access memory, CPU registers, inputs, and emulator functions programmatically. See the Lua Scripting API documentation for complete reference and examples.

For building mGBA, you need a C/C++ compiler (GCC 4.9+, Clang 3.5+, or MSVC 2015+), CMake 3.1+, Git, and platform-specific dependencies. Windows requires DirectX SDK, macOS requires Xcode Command Line Tools, Linux requires development libraries for SDL2, Qt, or GTK+ depending on your build configuration.

Yes! mGBA's codebase is designed for portability. The core emulation code is platform-independent, and platform-specific code is isolated in separate modules. See the porting guides in the developer documentation for instructions on creating new platform ports. You can also discuss your porting plans in GitHub Discussions.

mGBA includes built-in debugging tools including a memory inspector, register viewer, and breakpoint support. You can use external debuggers like GDB, LLDB, or Visual Studio Debugger. The emulator also supports Lua scripts for debugging. See the troubleshooting guide for more information.

mGBA is released under the Mozilla Public License 2.0 (MPL 2.0). This is a copyleft license that allows you to use, modify, and distribute mGBA, but requires you to share source code for mGBA-specific changes. See the LICENSE file for full details.

Use the GitHub Issues page to report bugs or request features. For bugs, include detailed reproduction steps, system information, and logs if available. For feature requests, explain the use case and expected behavior. Check existing issues first to avoid duplicates.

Download mGBA

Get the latest version of mGBA - the most accurate Game Boy Advance emulator

⬇️

mGBA Latest Release

Version 0.10.0
Release Date: January 17, 2025
File Size: ~15 MB
License: MPL 2.0 (Free & Open Source)
Platforms: Windows, macOS, Linux, Android, iOS
Download mGBA

Choose your platform automatically detected or select manually

99.8% Game Compatibility
100% Cycle-Accurate Emulation
Cross-Platform Support
Free & Open Source

System Requirements

  • Windows: Windows 7+ (64-bit recommended), 2GB RAM, DirectX 11 GPU
  • macOS: macOS 10.13+, Intel or Apple Silicon, 2GB RAM
  • Linux: 64-bit distribution, OpenGL 3.3+, 2GB RAM
  • Android: Android 5.0+, 2GB RAM, OpenGL ES 2.0+
  • iOS: iOS 12.0+, 2GB RAM

What's Included

  • Full Game Boy Advance emulator
  • Game Boy & Game Boy Color support
  • Save state system (10 slots)
  • Cheat code support (GameShark, Action Replay)
  • Lua scripting interface
  • Link cable emulation for multiplayer
  • Real-time clock support
  • Screenshot & video recording

Ready to Start Developing?

Join the mGBA development community and help build the most accurate Game Boy Advance emulator