diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-11-26 19:55:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-11-26 19:55:02 +0100 |
commit | 3d77f3f5ad41e931117425f58c74f49c9503bf7b (patch) | |
tree | 8165c8f10a1b3b3cec27cfb283ee218e7af3a519 /emu/memory.h | |
parent | 394c9fbb6cc243e46b32aa9e7221b0e6cadd4c13 (diff) | |
download | 6502-3d77f3f5ad41e931117425f58c74f49c9503bf7b.tar.gz 6502-3d77f3f5ad41e931117425f58c74f49c9503bf7b.tar.bz2 |
more work on emulator, mainly debug and 7seg stuff
Diffstat (limited to 'emu/memory.h')
-rw-r--r-- | emu/memory.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/emu/memory.h b/emu/memory.h index 35fd0ef..b2abfee 100644 --- a/emu/memory.h +++ b/emu/memory.h @@ -1,6 +1,8 @@ #ifndef MEMORY_H #define MEMORY_H +#include "7seg.h" + #include <stdint.h> enum { @@ -11,11 +13,13 @@ typedef struct memory_t { uint8_t cell[MEMORY_SIZE]; + seg7_t *seg; + uint8_t (*read)( struct memory_t *memory, uint16_t addr ); void (*write)( struct memory_t *memory, uint16_t addr, uint8_t data ); } memory_t; -void memory_init( memory_t *memory ); +void memory_init( memory_t *memory, seg7_t *seg ); uint8_t memory_read( memory_t *memory, uint16_t addr ); void memory_write( memory_t *memory, uint16_t addr, uint8_t data ); void memory_load( memory_t *memory, uint16_t addr, uint16_t size, const char *filename ); |