libc8
CHIP-8 utility library
Loading...
Searching...
No Matches
C8 Struct Reference

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

#include <chip8.h>

Data Fields

uint8_t mem [0x1000]
 CHIP-8 memory.
 
uint8_t R [8]
 Flag registers.
 
uint8_t V [16]
 General purpose registers.
 
uint8_t sp
 Stack pointer.
 
uint8_t dt
 Delay timer.
 
uint8_t st
 Sound timer.
 
uint16_t stack [16]
 Stack.
 
uint16_t pc
 Program counter.
 
uint16_t I
 Address register.
 
int key [18]
 Key press states.
 
int VK
 Register to store next keypress.
 
int cs
 Instructions to execute per second.
 
int waitingForKey
 Waiting for keypress?
 
int running
 Interpreter running state.
 
C8_Display display
 Graphics display.
 
int flags
 CLI flags.
 
int breakpoints [0x1000]
 Debug breakpoint map.
 
int colors [2]
 24 bit hex colors, background=[0] foreground=[1]
 
int fonts [2]
 Font IDs (see font.c)
 
int draw
 Need to draw? (1 or 0)
 
int mode
 Interpreter mode (C8_MODE_CHIP8, C8_MODE_SCHIP, C8_MODE_XOCHIP)
 

Detailed Description

Represents current state of the CHIP-8 interpreter.

Field Documentation

◆ breakpoints

int breakpoints[0x1000]

Debug breakpoint map.

◆ colors

int colors[2]

24 bit hex colors, background=[0] foreground=[1]

◆ cs

int cs

Instructions to execute per second.

◆ display

C8_Display display

Graphics display.

◆ draw

int draw

Need to draw? (1 or 0)

◆ dt

uint8_t dt

Delay timer.

◆ flags

int flags

CLI flags.

◆ fonts

int fonts[2]

Font IDs (see font.c)

◆ I

uint16_t I

Address register.

◆ key

int key[18]

Key press states.

◆ mem

uint8_t mem[0x1000]

CHIP-8 memory.

◆ mode

int mode

Interpreter mode (C8_MODE_CHIP8, C8_MODE_SCHIP, C8_MODE_XOCHIP)

◆ pc

uint16_t pc

Program counter.

◆ R

uint8_t R[8]

Flag registers.

◆ running

int running

Interpreter running state.

◆ sp

uint8_t sp

Stack pointer.

◆ st

uint8_t st

Sound timer.

◆ stack

uint16_t stack[16]

Stack.

◆ V

uint8_t V[16]

General purpose registers.

◆ VK

int VK

Register to store next keypress.

◆ waitingForKey

int waitingForKey

Waiting for keypress?


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