28 lines
386 B
C
28 lines
386 B
C
#pragma once
|
|
|
|
#include<stdint.h>
|
|
|
|
struct Gb;
|
|
|
|
#include"cpu.h"
|
|
#include"ppu.h"
|
|
|
|
typedef struct Gb
|
|
{
|
|
struct Cpu*cpu;
|
|
struct Ppu*ppu;
|
|
uint32_t nclocks;
|
|
uint32_t romsize;
|
|
uint8_t *ram;
|
|
uint8_t *rom;
|
|
uint8_t op;
|
|
uint8_t paused;
|
|
bool video;
|
|
bool log;
|
|
size_t timer; // How often to show disassembly
|
|
} Gb;
|
|
|
|
Gb gb_new(void);
|
|
void gb_free(Gb*gb);
|
|
void gb_print_cpu_state(Gb*gb);
|