/chip8

chip8 emulator in c++ and sdl2

Primary LanguageC++

Chip8 Emulator

A basic emulator (interpreter) for the CHIP-8 system from the 1970s.
Topics: Bitmasking, bytecode, low-level implementations of loops, functions, and instruction cycles.

pong
Pong running at 540Hz with level 3 antiflicker.

Usage

make to compile, ./chip8 <scale> <clock speed> <antiflicker=2> <ROM PATH> to run.
The antiflicker parameter is optional and controls how many frames are stored and OR'd together when displaying. Higher levels of antiflicker will produce smoother video, but at the cost of runtime and motion blur.

Testing

The makefile for this project is set up to automatically run all test ROMs in ./ROMs/tests relative to the test binary. After one test window is closed, the next will open.

Current test catalog:

References

  1. Autin Morlan's Guide for SDL and Driver setup
  2. Tobias Langhoff's Guide for full system specs and opcode descriptions