2016-07-09 14:34:55 +00:00
|
|
|
#ifndef MBC_h
|
|
|
|
#define MBC_h
|
2017-04-17 17:16:17 +00:00
|
|
|
#include "gb_struct_def.h"
|
2018-05-27 16:30:23 +00:00
|
|
|
#include <stdbool.h>
|
2016-07-09 14:34:55 +00:00
|
|
|
|
2017-04-17 17:16:17 +00:00
|
|
|
typedef struct {
|
|
|
|
enum {
|
|
|
|
GB_NO_MBC,
|
|
|
|
GB_MBC1,
|
|
|
|
GB_MBC2,
|
|
|
|
GB_MBC3,
|
|
|
|
GB_MBC5,
|
2020-05-13 19:21:31 +00:00
|
|
|
GB_HUC1,
|
2017-04-17 17:16:17 +00:00
|
|
|
GB_HUC3,
|
2021-04-10 20:56:41 +00:00
|
|
|
GB_TPP1,
|
2017-04-17 17:16:17 +00:00
|
|
|
} mbc_type;
|
|
|
|
enum {
|
|
|
|
GB_STANDARD_MBC,
|
|
|
|
GB_CAMERA,
|
|
|
|
} mbc_subtype;
|
|
|
|
bool has_ram;
|
|
|
|
bool has_battery;
|
|
|
|
bool has_rtc;
|
|
|
|
bool has_rumble;
|
|
|
|
} GB_cartridge_t;
|
|
|
|
|
|
|
|
#ifdef GB_INTERNAL
|
2016-07-09 14:34:55 +00:00
|
|
|
extern const GB_cartridge_t GB_cart_defs[256];
|
|
|
|
void GB_update_mbc_mappings(GB_gameboy_t *gb);
|
2016-07-09 16:25:13 +00:00
|
|
|
void GB_configure_cart(GB_gameboy_t *gb);
|
2017-04-17 17:16:17 +00:00
|
|
|
#endif
|
|
|
|
|
2016-07-09 14:34:55 +00:00
|
|
|
#endif /* MBC_h */
|