class SuperGameBoy : public Coprocessor, public MMIO, public Memory, public library { public: static void Enter(); void enter(); void save(); MMIO *mmio[3]; uint8 mmio_read(unsigned addr); void mmio_write(unsigned addr, uint8 data); uint8 read(unsigned addr); void write(unsigned addr, uint8 data); void init(); void enable(); void power(); void reset(); void unload(); void serialize(serializer&); private: uint32_t samplebuffer[4096]; unsigned row; function sgb_rom; function sgb_ram; function sgb_rtc; function sgb_init; function sgb_term; function sgb_power; function sgb_reset; function sgb_row; function sgb_read; function sgb_write; function sgb_run; function sgb_save; function sgb_serialize; friend class Cartridge; }; extern SuperGameBoy supergameboy;