Skip to main content

A Nintendo Entertainment System (NES) emulator in Python and Cython

Project description

Pyntendo

pip install pyntendo

A Nintendo Entertainment System (NES) emulator written in Python and Cython.

  • All core components are implemented, including audio, and the most important mappers.
  • Performant (runs at 60fps on modern machines)
  • Fully headless operation is supported
    • NumPy-based input/output
    • Very limited external dependencies (really just NumPy)
    • See Headless Demo for a minimal example
  • Pure Python/Cython, fully compatible with CPython (>3.6)

Although most games I have tested seem to run without issues, there are still some open issues that would improve performance and accuracy and probably make some hard to emulate games work or work better.

  • Several popular(ish) mappers are not implemented (along with lots of less popular ones)
  • Some fine timing is not quite right, which might cause issues in some sensitive games
  • This is not a cycle-accurate emulator, so sub-instruction level timing is not correctly emulated, and some parts of other systems are not emulated in a cycle-correct way
  • See my devnotes for known issues and planned work

I would like to give huge thanks and kudos to everyone who contributed to the amazing NESDev Wiki and all the other fantastic sources (most listed in the code), tests and forums for NES emulator development and 6502 progamming. Without these resources it would have been impossible to develop this emulator.

Usage

Basic usage:

from nes import NES
nes = NES("my_rom.nes")
nes.run()

Screenshots

Here are some screenshots of the emulator in action: Super Mario Brothers, Donkey Kong, MegaMan

Dependencies

Depends on the following libraries for key functionality:

  • numpy (optional?)
    • headless operation
    • (possibly also required by pygame surfarray, used in rendering)
  • pygame (optional)
    • timing
    • rendering
    • input
    • (without pygame, only headless operation is possible)
  • pyaudio (optional)
    • audio playing
    • sync to audio
  • pyopengl (optional)
    • OpenGL rendering
    • (not essential; can use SDL rendering via pygame)

License

Distributed under the MIT License (see here)

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

pyntendo-0.0.8.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

pyntendo-0.0.8-cp37-cp37m-macosx_10_7_x86_64.whl (870.4 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

Details for the file pyntendo-0.0.8.tar.gz.

File metadata

  • Download URL: pyntendo-0.0.8.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for pyntendo-0.0.8.tar.gz
Algorithm Hash digest
SHA256 bbf84e3e750f9ba87d2032d8a5cbae83684d4eccb390d886b7c521214ccdaeec
MD5 6c6efdc9d6c36ca7b32e0db0f005be25
BLAKE2b-256 d9d340aa65ff07873c69db4de2ff86a404649fd730a50e07927244bf735f9e84

See more details on using hashes here.

File details

Details for the file pyntendo-0.0.8-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: pyntendo-0.0.8-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 870.4 kB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for pyntendo-0.0.8-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 00c392ca1a71149c535d32dadac365c49f8b3564ec4a1517f9ca7c76f28f4e94
MD5 f501b414e8639fa4754b193a4a76db85
BLAKE2b-256 19d2ace816b55b16ec24daabaa50ef9f7ef96e85efd44c492059e53809d14ddc

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