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.7.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.7-cp310-cp310-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pyboy-1.4.7-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.7-cp310-cp310-macosx_10_14_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

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

Uploaded CPython 3.9Windows x86-64

pyboy-1.4.7-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.7-cp39-cp39-macosx_10_14_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

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

Uploaded CPython 3.8Windows x86-64

pyboy-1.4.7-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.7-cp38-cp38-macosx_10_14_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

pyboy-1.4.7-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.7-cp37-cp37m-macosx_10_14_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

pyboy-1.4.7-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.7.tar.gz.

File metadata

  • Download URL: pyboy-1.4.7.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.10.0

File hashes

Hashes for pyboy-1.4.7.tar.gz
Algorithm Hash digest
SHA256 846cdd36815ab20a6d5737f332cf5e53d888fc9f61fc5fc59cdf06fb2d2922f1
MD5 3bc86e3f9187439c2b7d8226c8af1fb6
BLAKE2b-256 70610eb9b4029353eaeae7a63792fa7da10be3d0cfc6463c6973882f8bdc8767

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 365082e4a34bd889b21c4548a4a86027295e141825933d0fcf04819d85c7debe
MD5 2727989e73763f277f2fb832ec7c1ef2
BLAKE2b-256 729b192a2406c01be2d17901778d09ffc43d296eaf922bf98ead8b9cdd7e05ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyboy-1.4.7-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c672e869a4538790f58d23e7f30161091152845ef9f1728757d1c565ee820343
MD5 79ed379199c397e2ddbb9040c853a617
BLAKE2b-256 fb2358f627adbe815877473a70109bdab916179fdd09f061a3193ca204a60f3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 44b89b57d99bd8885d28a3415c8f5b1347d63b8cf94fd37a65757d54e8fcf7b4
MD5 4b650b70e7825706abe0a455d885a88e
BLAKE2b-256 295b1b1fa82b3e05f42ef05c0eda7b5d0bcde5cd8dde7cd2cfff756378b318d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1b5d424b84573c0dd876aac62b80ec58e7b1509e7a8c0a557a87e378c52a8053
MD5 039e2748e8a12919b682615155b633e5
BLAKE2b-256 22e47e00f51197fe16d6521c981deb77353228f92f5b6bce16aaf1b87c45023b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9165fb619e995dd9b4c9848adf4e26e457dacc8c99007a2dd8c14a560fc4d2bd
MD5 623034a0c127174f8b6c147a9aa9b9e4
BLAKE2b-256 e9b1d1a37f3b7d1d5b6695ea22c58eb587e7bb11eacedbb6c0dc2f9f4d4233e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8f1de6775589c066cc3969c3636ec3d2393c892fdaaa6fac194e1aef3d06905f
MD5 5303b91d8d860773dd4dbefb260ac1de
BLAKE2b-256 dfb47ea80b9c1cd3a5ff45dd9053198addf3ece5d3a60506e0d794443ecc9c6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 10b3b34a1fb98a882c71411838f8408ea7d8c75f81893ad25ef45056f900f87c
MD5 320b169b6b26e3c1ee8793bcac35cd99
BLAKE2b-256 bcf852a3c88d0005441247d063cc1802159be7cc8cae66e43200c0ff6bb193a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f9c569b8ebc7b52ec20c0ef78bd3495624129c9cd45f8866d41a2a9702a50adb
MD5 aa54bbf4f02b202fe6edb556d81fb208
BLAKE2b-256 20503492fd9b506ac8ab9e0008394bf53772f0a7cf31f28f0f2ffcf71f8e67d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 480335688d0e185ef83f05bd38b90abbf67e0691ea44357d03175490f01a30d2
MD5 ac1b0849cc966b819ae0a4af74f7849f
BLAKE2b-256 466027309d35af38bd9002640f76e3329e5304b41610b369e6e952d97e962a84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 989b8b28ebf2bb79515b9aa28b381e410e8fec7a790395bb3b664ffd03b40ea3
MD5 cd672f24bf016ef9e54214f5a10bbd5d
BLAKE2b-256 47436b46b6bcb9953fdd453b4b6fae20cd593e58fec85d6d802debbb178bd477

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1c9e346992051a12ce487b2a0b0de11d53df3d44224020d867b0a592712f4c60
MD5 05bf3c0b9dd7cf675f3b0ca9f5b5684e
BLAKE2b-256 f3a4354324c8ee4b907a28c0c64ed7cf3c04c2b5c2e3a8acb7132304655eb723

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9186f68a5bea97e0ba43ebd493c251486b5a076ff0d63b90e057dace89cab6b5
MD5 35cf661b7957440a416bd73fb0738e1b
BLAKE2b-256 b16a771dc18bad02943b24d0eaa3f252b2b988b1b054193c2142a40ac6f69650

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyboy-1.4.7-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.7-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c000b5b357251fb1ec7e7e6d7691418563faf3def687067deb39a033177aaaa7
MD5 7cb44374040dd1a8af8bfa6458081b40
BLAKE2b-256 5f374fc1bcbaffd74d85dbf336e617bb25ea55ae84da340da06c9349b8f24cc3

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