diff options
Diffstat (limited to 'emu/emul.h')
-rw-r--r-- | emu/emul.h | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -2,7 +2,7 @@ #define EMUL_H #include "6502.h" -#include "memory.h" +#include "bus.h" #include <stdbool.h> @@ -11,15 +11,25 @@ #endif enum { - ROM_START = 0xF800, - ROM_SIZE = 2048, + ROM_START = 0xf800, + ROM_END = 0xffff, + ROM_SIZE = 2048, + + RAM_START = 0x0000, + RAM_END = 0x01ff, + RAM_SIZE = 512, + + VIA_START = 0x6000, + VIA_END = 0x600f, + CPU_FREQUENCY = 1000000, + DISPLAY_FPS = 25 }; typedef struct emul_t { cpu_6502_t *cpu; - memory_t *memory; + bus_t *bus; bool gui; int width; int height; @@ -31,7 +41,7 @@ typedef struct emul_t { #endif } emul_t; -void emul_init( emul_t *emul, cpu_6502_t *cpu, memory_t *memory, int width, int height ); +void emul_init( emul_t *emul, cpu_6502_t *cpu, bus_t *bus, int width, int height ); void emul_start( emul_t *emul ); void emul_run( emul_t *emul, int nof_steps ); void emul_free( emul_t *emul ); |