20 lines
341 B
C
20 lines
341 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "memory.h"
|
|
|
|
// -- TYPES -- //
|
|
typedef struct {
|
|
uint16_t regs[REG_MAX];
|
|
Memory* mem;
|
|
|
|
uint32_t pc;
|
|
uint32_t ihp;
|
|
uint32_t sp;
|
|
} Emulator;
|
|
|
|
// -- FUNCTIONS -- //
|
|
Emulator* initEmulator(uint32_t memorySize);
|
|
void freeEmulator(Emulator* emu); |