#ifndef MEMORY_H # define MEMORY_H #include #include #include "graphics.h" #define MEMORY_SIZE 4096 typedef struct s_memory { uint8_t memory[MEMORY_SIZE]; uint8_t screen[SCREEN_WIDTH * SCREEN_HEIGHT]; } t_memory; void memory_init(t_memory *mem); int memory_load_rom(t_memory *mem, FILE *fp); void memory_load_fontset(t_memory *mem); void memory_clear_screen(t_memory *mem); void memory_dump(t_memory *mem, const char *path); #endif