2024-07-21 13:53:04 -04:00
|
|
|
#ifndef ROM_H
|
|
|
|
#define ROM_H
|
|
|
|
|
2024-06-17 05:16:00 -04:00
|
|
|
enum screen_mirroring {
|
|
|
|
M_HORIZONTAL,
|
|
|
|
M_VERTICAL,
|
|
|
|
M_FOUR,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Rom {
|
|
|
|
char *prg_rom;
|
|
|
|
char *chr_rom;
|
|
|
|
size_t prg_rom_size;
|
|
|
|
size_t chr_rom_size;
|
|
|
|
uint8_t mapper;
|
|
|
|
enum screen_mirroring mirror;
|
|
|
|
};
|
|
|
|
|
|
|
|
void parse_rom(const uint8_t *data, size_t data_len, struct Rom *rom);
|
|
|
|
void free_rom(struct Rom *rom);
|
2024-07-21 13:53:04 -04:00
|
|
|
|
|
|
|
#endif /* ROM_H */
|