#ifndef CHIP8_H #define CHIP8_H #include #include "Graphics.h" #include "Interpreter.h" class Chip8 { Graphics graphics; Interpreter interpreter; double target_cycle_time; Uint64 last_update_time; double accumulator; std::span keyboard_state; bool run; bool step; void load_keyboard(); void execute_instructions(); void execute_instruction(); public: Chip8(); bool init(); void update(); std::vector read_rom(const std::string& path); void set_keyboard_state(std::span keyboard_state); void on_keydown(SDL_Scancode scancode); }; #endif //CHIP8_H