Skip to content

hpeteri/chip8-emu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip8-emu

A CHIP-8 emulator written in C. https://en.wikipedia.org/wiki/CHIP-8

Overview

The emulator follow the standard CHIP-8 specifications:

  • 4KB of RAM
  • 16 8-bit general-purpose registers (V0-VF)
  • 16-bit Program Counter (PC) and Index Register (I)
  • A 16-level stack for subroutiner
  • 64x32 monochrome display buffer.
  • 60Hz delay and sound timers.
  • 16 key Keypad (Mapped from 1-4, q-r, a-f, z-v)

Scrolling and other SCHIP-8 Opcodes have not been implemented.

How it Works

The CPU runs a loop that performs three steps: Fetch, Decode, and Execute.

Building

To compile run cmake -S . -B <build> to generate the build files. Compile the project with cmake --build <build>. chip8-term or chip8-sdl targets can be specified.

Usage

Once compiled, run the emulator by passing the path to a CHIP-8 ROM file ./chip8-emu path/to/rom.ch8

Validation

Thanks to Timendus for chip8-test-suite.

About

CHIP-8 Emulator written in C

Topics

Resources

Stars

Watchers

Forks

Contributors