#pragma once #include #include #include #include #include "memory.h" #define FLAG_ZERO (1 << 0) #define FLAG_NEGATIVE (1 << 1) #define FLAG_OVERFLOW (1 << 2) // -- TYPES -- // typedef struct { uint16_t regs[REG_MAX]; Memory* mem; uint32_t pc; uint32_t ihp; uint32_t sp; bool halted; } Emulator; // -- FUNCTIONS -- // Emulator* initEmulator(uint32_t memorySize); void freeEmulator(Emulator* emu); void startEmulator(Emulator* emu);