Chip8 Specifications - airloaf/ChipM8-Core GitHub Wiki

Specifications


In this section:

Memory

Chip8 may access 4 KB of memory (0x000 - 0xFFF). Addresses 0x000 to 0x1FF are reserved for use by the interpreter. Most Chip8 programs start at 0x200, although some may begin at 0x600

Memory Map

------------ [0xFFF]
|          |
| Program  |
|  Space   |
|          |
------------ [0x200]
|          |
| Reserved |
|          |
------------ [0x000]

Registers

There are an assortment of 8-bit and 16-bit registers. Of the 8-bit register there are: 16 general purpose registers (Vx where x is a Hexadecimal from 0 to 15), 2 timing registers (DT and ST) and a stack pointer. Among the 16-bit registers there is a memory address register and a program counter.

Register table

Registers Width (bits) Description
V0-VE 8 General Purpose Registers
VF 8 Status Register
DT 8 Delay Timer at 60 Hz
ST 8 Sound Timer at 60 Hz
SP 8 Stack Pointer
I 16 Holds a Memory Address
PC 16 Current Program Location

Graphics

Graphics are rendered onto a 64x32 monochrome display. Since it is monochrome, each pixel is represented by a bit. Sprites are the only way to render data to the screen. They consist of N-number of bytes, where N is a number between 0-15. When rendering sprites to the screen, the bits are XOR'd with the Sprite information.

The interpreter provides 16 sprites by default, these sprites being the Hexadecimal numbers. Each of these sprites must be 5 bytes in length.

Input

A hexadecimal keypad with values 0-15 is used as input.

Timers

There are two timers, DT and ST, which decrement in value at a rate of 60 Hz. When the timer reaches a value of 0, it stops decrementing. In the case of the sound timer (ST), a buzzer will sound when its value is greater than 0.