struct Cartridge : property { #include "memory.hpp" readonly loaded; readonly sha256; readonly has_sram; readonly has_eeprom; readonly has_flashrom; struct Information { string markup; } information; struct Media { unsigned id; string name; }; vector memory; void load(const string &manifest); void unload(); void power(); uint8* ram_data(); unsigned ram_size(); uint32 read(uint8 *data, uint32 addr, uint32 size); void write(uint8 *data, uint32 addr, uint32 size, uint32 word); uint32 read(uint32 addr, uint32 size); void write(uint32 addr, uint32 size, uint32 word); void serialize(serializer&); Cartridge(); ~Cartridge(); }; extern Cartridge cartridge;