16 lines
No EOL
392 B
C
16 lines
No EOL
392 B
C
#ifndef MEMORY_H
|
|
#define MEMORY_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct s_memory
|
|
{
|
|
uint8_t wram[0x2000]; // Working RAM (0xC000 - 0xDFFF), 8KB
|
|
uint8_t vram[0x2000]; // Video RAM (0x8000 - 0x9FFF), 8KB
|
|
} t_memory;
|
|
|
|
void memory_init(t_memory *memory);
|
|
uint8_t memory_read(t_memory *memory, uint16_t address);
|
|
void memory_write(t_memory *memory, uint16_t address, uint8_t value);
|
|
|
|
#endif |