Version 0 not fully working
This commit is contained in:
35
src/Chip8.h
Normal file
35
src/Chip8.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef CHIP8_H
|
||||
#define CHIP8_H
|
||||
#include <span>
|
||||
|
||||
#include "Graphics.h"
|
||||
#include "Interpreter.h"
|
||||
|
||||
|
||||
class Chip8 {
|
||||
Graphics graphics;
|
||||
Interpreter interpreter;
|
||||
|
||||
double target_cycle_time;
|
||||
|
||||
Uint64 last_update_time;
|
||||
double accumulator;
|
||||
|
||||
std::span<const bool> keyboard_state;
|
||||
|
||||
void load_keyboard();
|
||||
|
||||
public:
|
||||
Chip8();
|
||||
|
||||
bool init();
|
||||
|
||||
void update();
|
||||
|
||||
std::vector<uint8_t> read_rom(const std::string& path);
|
||||
|
||||
void set_keyboard_state(std::span<const bool> keyboard_state);
|
||||
};
|
||||
|
||||
|
||||
#endif //CHIP8_H
|
||||
Reference in New Issue
Block a user