24 lines
464 B
C
24 lines
464 B
C
|
#ifndef CHIP8_CHIP8_H
|
||
|
#define CHIP8_CHIP8_H
|
||
|
|
||
|
#include <string>
|
||
|
|
||
|
class InstructionHandler;
|
||
|
class Display;
|
||
|
|
||
|
class Chip8 {
|
||
|
private:
|
||
|
unsigned char memory[0xFFF] = {};
|
||
|
unsigned char v[0x10] = {};
|
||
|
unsigned short pc;
|
||
|
Display* display;
|
||
|
InstructionHandler* instructionHandler;
|
||
|
public:
|
||
|
Chip8();
|
||
|
~Chip8();
|
||
|
void loadRom(const std::string& file);
|
||
|
[[nodiscard]] Display* getDisplay() const;
|
||
|
void emulateCycle();
|
||
|
};
|
||
|
#endif //CHIP8_CHIP8_H
|