c8/hdrs/chip8.h

34 lines
No EOL
538 B
C

#ifndef CHIP8_H
# define CHIP8_H
#include <stdint.h>
#include "memory.h"
#include "graphics.h"
#include "input.h"
#define FRAME_TIME_MS 1000 / 60
typedef struct s_chip8
{
t_memory memory;
t_display display;
t_keyboard keyboard;
uint8_t v[16];
uint16_t i;
uint16_t pc;
uint8_t delay_timer;
uint8_t sound_timer;
uint16_t stack[16];
uint8_t sp;
int running;
} t_chip8;
int chip8_load_rom(t_chip8 *emu, const char *path);
void chip8_init(t_chip8 *emu);
void chip8_run(t_chip8 *emu);
#endif