git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

Core/mbc.h

      1 #pragma once
      2 #include "defs.h"
      3 #include <stdbool.h>
      4 
      5 typedef struct {
      6     enum {
      7         GB_NO_MBC,
      8         GB_MBC1,
      9         GB_MBC2,
     10         GB_MBC3,
     11         GB_MBC5,
     12         GB_MBC7,
     13         GB_MMM01,
     14         GB_HUC1,
     15         GB_HUC3,
     16         GB_TPP1,
     17         GB_CAMERA,
     18     } mbc_type;
     19     bool has_ram;
     20     bool has_battery;
     21     bool has_rtc;
     22     bool has_rumble;
     23 } GB_cartridge_t;
     24 
     25 #ifdef GB_INTERNAL
     26 internal extern const GB_cartridge_t GB_cart_defs[256];
     27 internal void GB_update_mbc_mappings(GB_gameboy_t *gb);
     28 internal void GB_configure_cart(GB_gameboy_t *gb);
     29 internal void GB_reset_mbc(GB_gameboy_t *gb);
     30 #endif

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.