# MGBA

mGBA is an open-source free emulator that supports Game Boy Advance emulation, with later revisions adding backwards compatibility with Game Boy and Game Boy Color. The emulator is written in the programming languages C, and is designed for Microsoft Windows, macOS, Linux, Ubuntu, and FreeBSD. Official ports on Nintendo 3DS, Nintendo Switch, PlayStation Vita, and Wii were released through homebrew applications.
mGBA initially gained criticism due to the existence of other capable Game Boy Advance emulators such as the VisualBoyAdvance. After multiple revisions and continued support, the mGBA has since experienced a rise in popularity, with its core being used in multi-system emulators such as OpenEmu, RetroArch, and BizHawk. While not officially released on Android and iOS, the core for mGBA in multi-system emulators allows it to be used on these devices. The emulator is also compatible with Dolphin, implementing the Game Boy Advance link cable through connectivity with GameCube games.

## History

In 2012, Vicki Pfau, known as "endrift" online, was inspired to create a Game Boy Advance emulator in JavaScript, hoping to improve on previous emulators such as the VisualBoyAdvance. GBA.js started development in July of 2012 and a beta was published to Hacker News in October of the same year. The JavaScript code would later be converted to C, with the hopes of the software communicating on native hardware and being able to run competently on a Raspberry Pi. GBA.js would be put on an indefinite hold to focus on GBAc, later titled mGBA. The first version of mGBA, mGBA 0.1.0, was released on December 13, 2014.

## Versions and compatibility
### Versions and releases

mGBA 0.1.0 was the first official release of mGBA. mGBA 0.1.1 released on January 24, 2015, fixing general issues after the first official version released one month earlier.
mGBA 0.2.0 released on April 3, 2015 and included several new features. This version included support for link cables and cheat codes, along with an improved user interface. mGBA 0.2.1 released on May 13, 2015, fixing general issues one month after version 0.2.0. This is the first version of the emulator to be ported on the Wii, Nintendo 3DS, and PlayStation Vita.
mGBA 0.3.0 released on August 16, 2015, including many quality of life features and improvements the user interface. mGBA 0.3.1 (October 24, 2015) and mGBA 0.3.2 (December 16, 2015) fixed general issues with the emulator.
mGBA 0.4.0 released on February 2, 2016. This version included customizable file paths, added shaders to the emulation settings, added controller hot swapping, and added a key for automatic button presses. This is the first version of mGBA that released as a core for OpenEmu, including fixes to the console ports. mGBA 0.4.1 (July 11, 2016) fixed general issues.
mGBA 0.5.0 released on September 19, 2016, including backwards compatibility with Game Boy and Game Boy Color. This version also added emulation of games made by the unlicensed game developer Vast Fame, improved support for cheat codes, and adding a temporary save data feature. Additionally, improvements were made to the console ports.
mGBA 0.6.0 released on July 16, 2017 after its beta release on June 29. This version included multiplayer support for Game Boy games, a game library directory, and more features for debugging. 0.6.0 would receive three major revisions over the course of two years, making it the version with the longest improvements until mGBA 0.10.0.
mGBA 0.7.0 released on January 26, 2019 and improved the accuracy of the Game Boy game emulation. This version included some support for games playable on the Super Game Boy and games compatible with the Game Boy Camera and Game Boy Printer. A console port for Nintendo Switch was made starting with this version.
mGBA 0.8.0 released on January 21, 2020. This version included XQ audio for improved audio emulated as a feature, support for the BattleChip Gate, interframe blending to create more accurate images, and a high-resolution OpenGL rendering engine. Additionally the "frame inspector" was added so users can look through frames of gameplay and export frames as a PNG for lossless quality. Support for the "Discord Rich Presence" allows users to view the specific emulated game they are playing on Discord.
mGBA 0.9.0 released on March 28, 2021. This version included full support for e-Reader compatible games and software, making it the second Game Boy Advance emulator to be compatible with the entire e-Reader library of games. It also included new user tools for converting save data and reporting bugs, recording in WebP and APNG file formats, and compatibility with Dolphin to play GameCube games using mGBA's Game Boy Advance system.
mGBA 0.10.0 released on October 11, 2022. This version included Lua scripting support, a built-in updater, improved audio sampling, added mapping support for unlicensed games, and a new refined version of mGBA for MacOS and Linux AppImage. Additionally, all Game Boy games could be played using the Game Boy Color and Super Game Boy's palette presets, as the games previously displayed in grayscale only. The emulator added support for the Super Game Boy Color, a previously non-existent mode that displays games with a border in color as well. Cheat codes have been added to the console ports of mGBA. The gyroscope and accelerometer in modern controllers such as the DualShock, DualSense, and Nintendo Switch Pro Controller can be used to control games that require motion detection. mGBA 0.10 has the most revisions fixing general issues with five versions in total.

### Compatibility

mGBA supports the use of many accessories from the Game Boy Advance. This includes full support for rumble from cartridges added through the Game Boy Player, games that include an accelerometer and gyroscope, as well as game-specific accessories such as the solar sensor used for the Boktai series, and the BattleChip Gate for the Mega Man Battle Network games. Some Game Boy peripherals and accessories are also supported such as the Game Boy Printer and games that use the Game Link Cable. mGBA can be connected to Dolphin's GameCube emulator to transfer items between the handheld or control GameCube games on the Game Boy Advance emulator.

## Limitations

mGBA currently has a few game-specific compatibility issues relating to unsupported accessories. The Game Boy Advance Wireless Adapter is not supported, due to the existence of the more widely used Game Link Cable. In Cyber Drive Zoids, the game requires an IR adapter to wirelessly control the Zoids, which has not yet been implemented. The Soul Doll Adapter designed for Legendz: Island of Ordeal and Legendz: Sign of Nekuromu is not supported. This is because the adapter functions by scanning a creature into the game, similar to the Portal of Power from the Skylanders series.
In addition, some accessories are partially supported but are not compatible with their full library of games. This includes the Game Boy Camera, Super Game Boy, link cable for multiplayer, and certain cartridge types.

## License

The source code of mGBA is publicly available, but the license prohibits its commercial use. The code is protected by the Mozilla Public License version 2.0.

## medusa (emulator)

On April 7, 2017, the first alpha for medusa was released. This is a proof of concept Nintendo DS emulator, with the hopes of merging medusa with mGBA. medusa released with lacking DS features, such as missing save states, audio channels, and microphone support, along with many game-specific issues involving games with 3D graphics. The second alpha released on April 26, 2017, fixing many of the major issues addressed in the announcement. Currently, the medusa emulator is not under active development.

## Reception

mGBA has received generally positive reviews, and is regarded as one of the best Game Boy Advance emulators. mGBA is considered fast and reliable with many standard features such as save states, fast-forwarding, and cheat support with GameShark and Action Replay codes. The emulator has also been praised for its cross-compatibility with other emulators through the game link cable emulation. However, critics discouraged the lack of a real-time rewind feature that is present in other emulation software.