feat: added cpu.h, memory.h and zboy.h
This commit is contained in:
parent
16b355f92b
commit
32a2eab015
3 changed files with 54 additions and 0 deletions
16
hdrs/memory.h
Normal file
16
hdrs/memory.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue