Skip to main content

No project description provided

Project description

If you have any questions, or just want to chat, join us on Discord.

It is highly recommended to read the report to get a light introduction to Game Boy emulation. But do be aware, that the Python implementation has changed a lot. The report is relevant, eventhough you want to contribute to another emulator, or create your own.

If you've read the report and want more explicit details, have a look at the Pan Docs.

If you are looking to make a bot or AI, you can find all the external components in the PyBoy Documentation. There is also a short example on our Wiki page Scripts, AI and Bots as well as in the examples directory. If more features are needed, or if you find a bug, don't hesitate to make an issue here on GitHub, or write on our Discord channel.


Installation

The instructions are simple, if you already have a functioning Python environment on your machine.

  1. Install SDL2 through your package manager:

    • Ubuntu: sudo apt install libsdl2-dev
    • Fedora: sudo dnf install SDL2-devel
    • macOS: brew install sdl2
  2. Install PyBoy using pip install pyboy (add --user if your system asks)

Now you're ready! Either use PyBoy directly from the terminal $ pyboy file.rom or use it in your Python scripts:

from pyboy import PyBoy
pyboy = PyBoy('ROMs/gamerom.gb')
while not pyboy.tick():
    pass

When the emulator is running, you can easily access PyBoy's API:

from pyboy import WindowEvent

pyboy.send_input(WindowEvent.PRESS_ARROW_DOWN)
pyboy.tick() # Process one frame to let the game register the input
pyboy.send_input(WindowEvent.RELEASE_ARROW_DOWN)

pil_image = pyboy.screen_image()
pil_image.save('screenshot.png')

If you need more details, or if you need to compile from source, check out the detailed installation instructions. We support: macOS, Raspberry Pi (Raspbian), Linux (Ubuntu), and Windows 10.

At the Wiki page, you will also find out how to interface with PyBoy from your own project: Wiki.

Contributors

Thanks to all the people, who have contributed to the project!

Original Developers

GitHub Collaborators

Student Projects

  • Rewind Time: Jacob Olsen - JacobO1
  • Link Cable: Jonas Flach-Jensen - thejomas
  • Game Boy Color: Christian Marslev and Jonas Grønborg - CKuke and kaff3

Contribute

Any contribution is appreciated. The currently known errors are registered in the Issues tab. Feel free to take a swing at any one of them.

For the more major features, there are the following that you can give a try. They are also described in more detail in the project list:

  • Color
  • Link Cable
  • (Experimental) AI - use the botsupport or game wrappers to train a neural network
  • (Experimental) Game Wrappers - make wrappers for popular games

If you want to implement something which is not on the list, feel free to do so anyway. If you want to merge it into our repo, then just send a pull request and we will have a look at it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyboy-1.4.4.tar.gz (5.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyboy-1.4.4-cp310-cp310-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pyboy-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (25.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.12+ x86-64

pyboy-1.4.4-cp310-cp310-macosx_10_14_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

pyboy-1.4.4-cp39-cp39-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.9Windows x86-64

pyboy-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (25.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

pyboy-1.4.4-cp39-cp39-macosx_10_14_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

pyboy-1.4.4-cp38-cp38-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.8Windows x86-64

pyboy-1.4.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (26.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

pyboy-1.4.4-cp38-cp38-macosx_10_14_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

pyboy-1.4.4-cp37-cp37m-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.7mWindows x86-64

pyboy-1.4.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (24.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

pyboy-1.4.4-cp37-cp37m-macosx_10_14_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

pyboy-1.4.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (24.3 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

File details

Details for the file pyboy-1.4.4.tar.gz.

File metadata

  • Download URL: pyboy-1.4.4.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for pyboy-1.4.4.tar.gz
Algorithm Hash digest
SHA256 7d18f72276c90b67c10bdf379990d709f1bcdce8a1d59a4715a87f9ad71e4b81
MD5 912234eca582d0fdccfa4a855677f10e
BLAKE2b-256 d716f8ba935e31baa6befb5ea4a418b1d90acc744026a184cddcfbb7ca481f29

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pyboy-1.4.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 777b2d8e865675476068408943d0779aba73d09fa172b5f8579f722c075749fe
MD5 7301b0d0e044232565b0cb2ef83e773f
BLAKE2b-256 808b147d9c136638057589f9cebd67f0d62b2b4b0a1652d8ae6b8a8c864cbb3e

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyboy-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bd500eea82027d4c319c6433d8932689e75c92fe99205e992ebff9630e6116ed
MD5 2de02c727bb6f71d158431103c41d565
BLAKE2b-256 b39be243438cfe177d8d0a3f76099241ed016fbf786106335f6b2dab573c857e

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp310-cp310-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.10, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pyboy-1.4.4-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 707db6899155f563c3437a1aaa266c1f47c82b2a5374bd0953a6a526b3a3ea47
MD5 2b0d03e2e6fa6edac2ae1a7cd83203db
BLAKE2b-256 4b770e8131da7fd7fa6765c14cf5428cd15e2c66420676e954e581f285e79274

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pyboy-1.4.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 66b6c24b63bb1095f9aaa2825f047901c8dab524bfd098dd8c0816dcd8d5379a
MD5 12672fd2525b5e75b0a3b8061206f24a
BLAKE2b-256 a177cf9b5114e44cd202ea190fa60cee85baec9bab6e297e595d6e684de5d40f

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 25.8 MB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyboy-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ed4d986f753b73e15f95b9a619f70a5a01caec39fa17c7423e66a4e5b4a13cff
MD5 8fdf9d6aa9b86c7c4740651f2f50fc21
BLAKE2b-256 5408059f4a1641505cf8373082954b41d0bb5771546b7f00c54f07d0f9e59139

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pyboy-1.4.4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 80c34cdfd38b90ae58432450afff5c9cf1b5dece3a5b0eb240896edd6b5cfe19
MD5 fa673173b42dc60b96da76dfe52b4b09
BLAKE2b-256 136b22134bc3e07eb02adc3682cfd4ed995e35eb43a562697ff4abe48816eea4

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyboy-1.4.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d6cc8ac47945fc09e46da4a8b7faa2753fc40863015db207c633e7dffbf1d658
MD5 dc3b8cdfc9d88ae04f73f4d8c0219fb4
BLAKE2b-256 1fb7d1c439d7c1110aa8489dabbb8b33e72e1cc39ef6dfe9f7bd8eccb86818c3

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 26.8 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyboy-1.4.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2141c207574855850f0e09f50343d4a17c428b9918eb34b7e1343d9b2a0f0b05
MD5 c024e0e415b9aa2dc100b7de856e0dad
BLAKE2b-256 b4a7cc94f1cbcec3860e073fdb30d296ad487859a3db6e3c05f788c7f9205f17

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyboy-1.4.4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9fcedadfc1120e2a11a8510d5163b57b3cf62cc56429de072fa038483926ca3f
MD5 c367a85da590f9a83756a7b7db8b18cb
BLAKE2b-256 3c5025404fb4c7441045f089e750887707f3bb944025c9339299fa0420cf5584

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for pyboy-1.4.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f97cabf39115ae6c19e777d9d215c372b3c566cd75b8f95a61d3a7f18898fcd8
MD5 39cb92be1f07c437261847c05374df5b
BLAKE2b-256 2f18724f9fd048595e8b0e3b2d662f9f33a6afdf63b4b27290fb5cc46eb28829

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 24.2 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyboy-1.4.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9b771e29ea54d109baf6f72ac51e00565fdf2e24b662b8b6573d6107123e322d
MD5 9a435e5c8e1b971f72464baf36044c5d
BLAKE2b-256 51735ebb961084cb0c4e874491a536f3fef8abf95566b042a833fdce5bb5c7d4

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for pyboy-1.4.4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7645e1e8ee905298aaf90a9973191c10033e023da5be5caf09f53cf12cad5418
MD5 d8ac6dc38f9fd2cf218f443576786574
BLAKE2b-256 dacb93e46bbc61d209c674ba2b2b7bfbcae922b6aeb757bc867b63e5f67174d5

See more details on using hashes here.

File details

Details for the file pyboy-1.4.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: pyboy-1.4.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 24.3 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyboy-1.4.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 93b283b81cc56eb71595c72950f5ad159f4a087dd72bf53ebb919d8c7a1dc080
MD5 367b691489446bd53e7f675a0d703265
BLAKE2b-256 58afb1611449ca163c86802aa12d33f689686f5c59cde942bb710dcfce8ec76b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page