15#define C8_CLOCK_SPEED 500
16#define C8_STACK_SIZE 16
18#define C8_FLAG_DEBUG 0x1
19#define C8_FLAG_VERBOSE 0x2
20#define C8_FLAG_QUIRK_BITWISE 0x4
21#define C8_FLAG_QUIRK_DRAW 0x8
22#define C8_FLAG_QUIRK_LOADSTORE 0x10
23#define C8_FLAG_QUIRK_SHIFT 0x20
24#define C8_FLAG_QUIRK_JUMP 0x40
int c8_load_palette_f(c8_t *, const char *)
Load palette from the given path into colors.
Definition chip8.c:129
void c8_deinit(c8_t *)
Deinitialize graphics and free c8.
Definition chip8.c:55
void c8_simulate(c8_t *)
Main interpreter simulation loop. Exits when c8->running is 0.
Definition chip8.c:183
#define C8_STACK_SIZE
Definition chip8.h:16
int c8_load_palette_s(c8_t *, char *)
Load palette from the given string into colors.
Definition chip8.c:95
void c8_load_quirks(c8_t *, const char *)
Load quirk flags from string.
Definition chip8.c:162
c8_t * c8_init(const char *, int)
Initialize and return a c8_t with the given flags.
Definition chip8.c:72
#define C8_MEMSIZE
Definition defs.h:25
Represents current state of the CHIP-8 interpreter.
Definition chip8.h:51
int draw
Definition chip8.h:71
uint16_t I
Definition chip8.h:60
int fonts[2]
Definition chip8.h:70
int waitingForKey
Definition chip8.h:64
int running
Definition chip8.h:65
int breakpoints[C8_MEMSIZE]
Definition chip8.h:68
int key[18]
Definition chip8.h:61
int VK
Definition chip8.h:62
uint8_t V[16]
Definition chip8.h:54
uint8_t R[8]
Definition chip8.h:53
uint8_t mem[C8_MEMSIZE]
Definition chip8.h:52
int colors[2]
Definition chip8.h:69
c8_display_t display
Definition chip8.h:66
int flags
Definition chip8.h:67
int cs
Definition chip8.h:63
uint8_t dt
Definition chip8.h:56
uint16_t stack[C8_STACK_SIZE]
Definition chip8.h:58
uint8_t sp
Definition chip8.h:55
uint16_t pc
Definition chip8.h:59
uint8_t st
Definition chip8.h:57