summaryrefslogtreecommitdiff
path: root/emu/6502.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-11-27 20:04:18 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-11-27 20:04:18 +0100
commitf829f6893d94ed52044bf007bc447526c9d5e653 (patch)
treec1c98d8b9240b4507719aa8b78eb3ee03dd64ab5 /emu/6502.h
parent3d77f3f5ad41e931117425f58c74f49c9503bf7b (diff)
download6502-f829f6893d94ed52044bf007bc447526c9d5e653.tar.gz
6502-f829f6893d94ed52044bf007bc447526c9d5e653.tar.bz2
emulator uses a bus now in the cpu, ROM, RAM and VIA (7-seg) are devices connected to the bus
Diffstat (limited to 'emu/6502.h')
-rw-r--r--emu/6502.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/emu/6502.h b/emu/6502.h
index 20574c3..22da89f 100644
--- a/emu/6502.h
+++ b/emu/6502.h
@@ -4,6 +4,8 @@
#include <inttypes.h>
#include <stdbool.h>
+#include "bus.h"
+
typedef struct
{
uint8_t A;
@@ -13,7 +15,7 @@ typedef struct
uint16_t PC;
uint8_t PS;
- struct memory_t *memory;
+ bus_t *bus;
int debug_flags;
@@ -57,7 +59,7 @@ enum {
TXS_IMPL = 0x9A
};
-void cpu_6502_init( cpu_6502_t *cpu, struct memory_t *memory );
+void cpu_6502_init( cpu_6502_t *cpu, bus_t *bus );
void cpu_6502_reset( cpu_6502_t *cpu );
uint8_t cpu_6502_read_byte( cpu_6502_t *cpu, uint16_t addr );
uint16_t cpu_6502_read_word( cpu_6502_t *cpu, uint16_t addr );