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