Skip to main content

NES (Nintendo Entertainment System) emulator written in Rust with Python bindings

Project description

NES Emulator in Rust with Python Bindings

Overview

This project contains a NES (Nintendo Entertainment System) emulator written in Rust with Python bindings. It emulates the 6502 CPU, PPU (Picture Processing Unit), and other hardware components of the NES, allowing you to play classic NES games.

Features

  • Full 6502 CPU emulation with all documented and many undocumented opcodes
  • PPU emulation with basic rendering capabilities
  • Cartridge loading support for NES 1.0 ROM format
  • Save state functionality
  • Keyboard input handling

Usage

import nesrs

emu = nesrs.Emulator("/path/to/game.nes", True)

while True:
    emu.step_emulation()
    
    frame = emu.get_current_frame()
    
    value = emu.get_value_at_address(0x1234)
    
    emu.set_key_event(KEY_UP, True)

Key bindings

When keyboard input is enabled:

  • Arrow keys: Directional pad
  • Space: Select button
  • Enter: Start button
  • A: A button
  • S: B button
  • Escape: Quit emulator

File Formats

  • .nes files - NES 1.0 ROMs
  • .cpu files - Serialized CPU states (save states)

Limitations

  • Audio is not yet implemented
  • Memory mappers are not supported
  • No support for NES 2.0 ROM format
  • Some undocumented CPU opcodes are not implemented
  • Render order may not be correct

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

nesrs-0.1.1.tar.gz (244.4 kB view details)

Uploaded Source

Built Distribution

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

nesrs-0.1.1-cp38-abi3-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

File details

Details for the file nesrs-0.1.1.tar.gz.

File metadata

  • Download URL: nesrs-0.1.1.tar.gz
  • Upload date:
  • Size: 244.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.2

File hashes

Hashes for nesrs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86171bcf1846cf68267be74959f2b0efa1fc737d3520a769d2b391e8d68f28e1
MD5 9707a3935076510e24719d37a03d6e6a
BLAKE2b-256 c381152f8d6183aefcfe32b9bd70147260f3033cdd768268deb773bc51c7561b

See more details on using hashes here.

File details

Details for the file nesrs-0.1.1-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for nesrs-0.1.1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b373d46ef0febb917be674c22eb36e8bb3c69497f0b9ad4562630d8725b0f748
MD5 56d2b5cd787d42f319738050251d97df
BLAKE2b-256 027be65224f8ff7d6ae53b83eed06f97654cccc9484e5e72e30c0a40d93aca59

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