mirror of
https://github.com/andwati/mos-6502.git
synced 2026-11-11 14:35:13 +00:00
add CPU and memory modules with associated header files; update README and .gitignore
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MEM_SIZE 65536 // 64KB memory size
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t data[MEM_SIZE];
|
||||
} Memory;
|
||||
|
||||
uint8_t mem_read(Memory *mem, uint16_t addr);
|
||||
void mem_write(Memory *mem, uint16_t addr, uint8_t value);
|
||||
void mem_reset(Memory *mem);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user