Skip to main content

A CHIP-8 emulator ecosystem.

Project description

chip8-py

A modular, extensible CHIP-8 emulator ecosystem written in modern Python, with support for SUPER-CHIP (and soon XO-CHIP).

Note: This is a remake of an old project of mine, chip-8-python, which aimed to do the same thing but was honestly pretty poorly made. It was monolithic and clunky, and this one is built to be an actual Python package.

Other Note: This project is a major WIP. There are many bugs, partially implemented features, and examples of poor code formatting. If you have a bug report or a feature request, please make an issue for it. If you want to contribute, check out the guidelines.

Installation

Requires Python 3.11+.

pip install chip8-py

# or in a local directory
git clone https://github.com/las-r/pychip8
cd chip8-py
pip install -e .

Usage

chip8py path/to/rom.ch8

Config

File

On first run, a default config is created at:

  • Windows: C:/Users/YOUR_USER_PROFILE/AppData/Local/pychip8/
  • macOS: ~/Library/Application Support/pychip8/
  • Linux: ~/.config/pychip8/

Edit this file to set your preferred defaults.

Flags

Flags override the config file.

Flag Description
--cpf <int> Cycles per frame (default: 10)
--scale <int> Display scale (default: 12)
--volume <float> Audio volume 0.0–1.0 (default: 0.2)
--cosmac-shift / --no-cosmac-shift COSMAC VIP shift quirk
--cosmac-jump / --no-cosmac-jump COSMAC VIP jump quirk
--cosmac-i-add / --no-cosmac-i-add COSMAC VIP index add quirk
--cosmac-font / --no-cosmac-font COSMAC VIP font quirk
--cosmac-ls / --no-cosmac-ls COSMAC VIP load/store quirk
--vf-reset / --no-vf-reset Reset VF after logic instructions
--spr-clip / --no-spr-clip Clip sprites at screen edges instead of wrapping
--schip-scroll / --no-schip-scroll Halve scroll distance in low-res mode
--schip-hires-spr / --no-schip-hires-spr Restrict 16×16 sprites to high-res mode only
--schip-vblank / --no-schip-vblank Wait for vblank before drawing
--bg <hex> Background color
--fg <hex> Foreground color

Keypad

The CHIP-8 hex keypad maps to the left side of a QWERTY keyboard:

CHIP-8    Keyboard
1 2 3 C   1 2 3 4
4 5 6 D   Q W E R
7 8 9 E   A S D F
A 0 B F   Z X C V

Credits

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

chip8_py-0.2.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

chip8_py-0.2.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file chip8_py-0.2.1.tar.gz.

File metadata

  • Download URL: chip8_py-0.2.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chip8_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9ca04fd2a40d8d4be3bfa0ef1575c3c1095c260983f5a20562db359b438df80d
MD5 4a7ac84e69272302bf0bc3f4390cb770
BLAKE2b-256 667a67af8ba98300824a7b9e79e9b41611fb3c559cfb5db98223cd6454ef620a

See more details on using hashes here.

Provenance

The following attestation bundles were made for chip8_py-0.2.1.tar.gz:

Publisher: publish.yml on las-r/chip8-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chip8_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: chip8_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chip8_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8f062d67b33318cfea934e188249a92d61684c028dbd9e15909a647945c8ae6
MD5 c7df84037408df0ab2956e9afcda349d
BLAKE2b-256 e5db09c66c105423da370b9344dd36dafee58afc17db350b57b9208a59a5b583

See more details on using hashes here.

Provenance

The following attestation bundles were made for chip8_py-0.2.1-py3-none-any.whl:

Publisher: publish.yml on las-r/chip8-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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