feat: initial version
This commit is contained in:
parent
0a67fb21d1
commit
ee790e99d6
12 changed files with 798 additions and 0 deletions
22
hdrs/memory.h
Normal file
22
hdrs/memory.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue