libc8
CHIP-8 utility library
c8_t Struct Reference

Represents current state of the CHIP-8 interpreter. More...

#include <chip8.h>

Data Fields

uint8_t mem [C8_MEMSIZE]
 
uint8_t R [8]
 
uint8_t V [16]
 
uint8_t sp
 
uint8_t dt
 
uint8_t st
 
uint16_t stack [C8_STACK_SIZE]
 
uint16_t pc
 
uint16_t I
 
int key [18]
 
int VK
 
int cs
 
int waitingForKey
 
int running
 
c8_display_t display
 
int flags
 
int breakpoints [C8_MEMSIZE]
 
int colors [2]
 
int fonts [2]
 
int draw
 

Detailed Description

Represents current state of the CHIP-8 interpreter.

Parameters
memCHIP-8 memory
Rflag registers
VV (general purpose) registers
spstack pointer
dtdisplay timer
stsound timer
stackstack
pcprogram counter
II (address) register
keykey press states
VKV to store next keypress
csinstructions to execute per second
waitingForKey1 or 0
running1 or 0
displaygraphics display
flagsCLI flags
breakpointsdebug breakpoint map
colors24 bit hex colors, background=[0] foreground=[1]
fontsfont IDs (see font.c)
drawneed to draw? (1 or 0)

Field Documentation

◆ breakpoints

int breakpoints[C8_MEMSIZE]

◆ colors

int colors[2]

◆ cs

int cs

◆ display

c8_display_t display

◆ draw

int draw

◆ dt

uint8_t dt

◆ flags

int flags

◆ fonts

int fonts[2]

◆ I

uint16_t I

◆ key

int key[18]

◆ mem

uint8_t mem[C8_MEMSIZE]

◆ pc

uint16_t pc

◆ R

uint8_t R[8]

◆ running

int running

◆ sp

uint8_t sp

◆ st

uint8_t st

◆ stack

uint16_t stack[C8_STACK_SIZE]

◆ V

uint8_t V[16]

◆ VK

int VK

◆ waitingForKey

int waitingForKey

The documentation for this struct was generated from the following file: