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.

Installation

Requires Python 3.11+.

pip install chip8-py

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

Usage

pychip8 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.0.tar.gz (8.2 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.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chip8_py-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 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.0.tar.gz
Algorithm Hash digest
SHA256 bf781dd4b1e0e3711eb2cfe60d96d2dedd6616d00080644f22cceac472f4f65b
MD5 e1d21609c5c3e61b1cf9899165014d6c
BLAKE2b-256 956eeebc5840a14a93037316ab3739fa5062628abb1673c5d2fb1025c0b4eded

See more details on using hashes here.

Provenance

The following attestation bundles were made for chip8_py-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: chip8_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb7aae06b6a877c364df69922641acfc86eb1166845e98ac14efe3d64c56b5a
MD5 e10e65e22a21296925d58b0c66a3c963
BLAKE2b-256 b78edf53916c19826b1570e64b319fc42cb8bb8de8163f7e816332405712bb61

See more details on using hashes here.

Provenance

The following attestation bundles were made for chip8_py-0.2.0-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