Skip to content

danbentley/chip-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip-8 interpreter

CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine.

CHIP-8 - Wikipedia

Install

To simplify dependency resolution inside a virtual environment, I recommend using poetry.

Install dependencies

poetry install

Run intepreter

poetry run python main.py

Usage

positional arguments:
  path                  Path to rom file

optional arguments:
  -h, --help            show this help message and exit
  --backend {pygame,sdl}
                        Backend used to run the interpreter
  --scale SCALE         Scale the 64x32 display for better rendering on modern monitors
  --hertz HERTZ, --hz HERTZ, --speed HERTZ
                        Number of instructions to execute per second. Some games require
                        adjustments to improve playability.
  --profile, --no-profile
                        Profile CPU cycles. Outputs results on exit

Key bindings

Gameplay

A CHIP-8 interpreter supports 16 keys:

Chip-8 keyboard  QWERTY 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|
+–+–+–+–+        +–+–+–+–+

Debug keys

  • F5 Stop execution
  • F6 Execute next opcode
  • F8 Resume execution

Screenshots

Tetris Breakout Space Invaders BC Test Opcode Test

References

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages