#ifndef EMUL_H #define EMUL_H #include "6502.h" #include "memory.h" #include #ifdef WITH_GUI #include #endif enum { ROM_START = 0xF800, ROM_SIZE = 2048, CPU_FREQUENCY = 1000000, DISPLAY_FPS = 25 }; typedef struct emul_t { cpu_6502_t *cpu; memory_t *memory; bool gui; #ifdef WITH_GUI SDL_Window *window; SDL_Renderer *renderer; SDL_Surface *background_image; SDL_Texture *background_texture; #endif } emul_t; void emul_init( emul_t *emul, cpu_6502_t *cpu, memory_t *memory ); void emul_start( emul_t *emul ); void emul_run( emul_t *emul ); void emul_free( emul_t *emul ); #endif