PancakeNESEmu
A homebrewed NES Emulator written in C
Loading...
Searching...
No Matches
reader.h
Go to the documentation of this file.
1#ifndef reader_h
2#define reader_h
3
4#include <sys/types.h>
5
6typedef unsigned char* rom_buffer;
7
8typedef struct {
10 size_t buff_size;
11} rom;
12
18rom* open_rom(char* filepath);
19
24void display_rom(rom* r);
25
30void free_rom(rom* r);
31
32#endif // reader_h
unsigned char * rom_buffer
Definition reader.h:6
void free_rom(rom *r)
Frees the rom struct.
Definition reader.c:75
void display_rom(rom *r)
Procedure that displays the content of the rom in hexadecimal.
Definition reader.c:59
rom * open_rom(char *filepath)
A function that open the NES rom at a specified path.
Definition reader.c:7
Definition reader.h:8
size_t buff_size
The size of the buffer.
Definition reader.h:10
rom_buffer buff
The buffer that contains all the ROM's data.
Definition reader.h:9