From f829f6893d94ed52044bf007bc447526c9d5e653 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 27 Nov 2020 20:04:18 +0100 Subject: emulator uses a bus now in the cpu, ROM, RAM and VIA (7-seg) are devices connected to the bus --- emu/6502.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'emu/6502.h') 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 #include +#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 ); -- cgit v1.2.3-54-g00ecf