struct Cartridge : property { enum class Region : unsigned { NTSC, PAL, }; enum class Slot : unsigned { Base, Bsx, SufamiTurbo, SufamiTurboA, SufamiTurboB, GameBoy, }; MappedRAM rom; MappedRAM ram; readonly loaded; readonly sha256; readonly region; readonly has_gb_slot; readonly has_bs_cart; readonly has_bs_slot; readonly has_st_slots; readonly has_nss_dip; readonly has_event; readonly has_sa1; readonly has_superfx; readonly has_armdsp; readonly has_hitachidsp; readonly has_necdsp; readonly has_epsonrtc; readonly has_sharprtc; readonly has_spc7110; readonly has_sdd1; readonly has_obc1; readonly has_hsu1; readonly has_msu1; struct Mapping { function reader; function writer; string addr; unsigned size; unsigned base; unsigned mask; Mapping(); Mapping(const function&, const function&); Mapping(SuperFamicom::Memory&); }; vector mapping; struct Memory { unsigned id; string name; }; vector memory; struct Information { struct Markup { string cartridge; string gameBoy; string satellaview; string sufamiTurboA; string sufamiTurboB; } markup; struct Title { string cartridge; string gameBoy; string satellaview; string sufamiTurboA; string sufamiTurboB; } title; } information; string title(); void load(); void unload(); void serialize(serializer&); Cartridge(); ~Cartridge(); private: void load_super_game_boy(); void load_satellaview(); void load_sufami_turbo_a(); void load_sufami_turbo_b(); void parse_markup(const char*); void parse_markup_map(Mapping&, Markup::Node); void parse_markup_memory(MappedRAM&, Markup::Node, unsigned id, bool writable); void parse_markup_cartridge(Markup::Node); void parse_markup_icd2(Markup::Node); void parse_markup_bsx(Markup::Node); void parse_markup_satellaview(Markup::Node); void parse_markup_sufamiturbo(Markup::Node, bool slot); void parse_markup_nss(Markup::Node); void parse_markup_event(Markup::Node); void parse_markup_sa1(Markup::Node); void parse_markup_superfx(Markup::Node); void parse_markup_armdsp(Markup::Node); void parse_markup_hitachidsp(Markup::Node, unsigned roms); void parse_markup_necdsp(Markup::Node); void parse_markup_epsonrtc(Markup::Node); void parse_markup_sharprtc(Markup::Node); void parse_markup_spc7110(Markup::Node); void parse_markup_sdd1(Markup::Node); void parse_markup_obc1(Markup::Node); void parse_markup_msu1(Markup::Node); friend class Interface; }; extern Cartridge cartridge;