c8/hdrs/memory.h

22 lines
No EOL
465 B
C

#ifndef MEMORY_H
# define MEMORY_H
#include <stdint.h>
#include <stdio.h>
#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