diff options
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 ); |