Skip to content

williamckha/PyBoyAdvance

Repository files navigation

PyBoy Advance


PyBoy Advance is a Game Boy Advance emulator written in Python, with Cython declarations for compiling to C.

Warning

This is experimental software and under development. Some GBA hardware features are not yet implemented and many games do not function properly.

Getting started

Install PyBoy Advance with pip:

$ pip install pyboy-advance

You will need to provide a Game Boy Advance BIOS. Normatt's open source BIOS is supported and available here.

Launch PyBoy Advance from the terminal:

$ pyboy_advance --bios /path/to/bios.bin game_rom.gba

Or import and use it in your Python scripts:

from pyboy_advance import PyBoyAdvance

emulator = PyBoyAdvance(rom="game_rom.gba", bios="/path/to/bios.bin")
emulator.run()

Performance

PyBoy Advance is written in "pure" Python and can technically be run with PyPy or even CPython (though games will be virtually unplayable with the latter). To achieve practical performance, we use Cython to statically type our Python code and generate efficient C code from it. This allows us to build PyBoy Advance as a Python C extension module, significantly improving execution speed.

Screenshots

Screenshot of PyBoy Advance running Kirby: Nightmare in Dream Land

Acknowledgements