void System::load() { audio.coprocessor_enable(false); bus.map_reset(); bus.map_xml(); cpu.enable(); ppu.enable(); if(expansion.i == ExpansionPortDevice::BSX) bsxsatellaview.load(); if(cartridge.mode.i == Cartridge::Mode::Bsx) bsxcartridge.load(); if(cartridge.mode.i == Cartridge::Mode::SufamiTurbo) sufamiturbo.load(); if(cartridge.mode.i == Cartridge::Mode::SuperGameBoy) icd2.load(); if(cartridge.has_bsx_slot()) bsxflash.load(); if(cartridge.has_nss_dip()) nss.load(); if(cartridge.has_superfx()) superfx.load(); if(cartridge.has_sa1()) sa1.load(); if(cartridge.has_necdsp()) necdsp.load(); if(cartridge.has_hitachidsp()) hitachidsp.load(); if(cartridge.has_srtc()) srtc.load(); if(cartridge.has_sdd1()) sdd1.load(); if(cartridge.has_spc7110()) spc7110.load(); if(cartridge.has_obc1()) obc1.load(); if(cartridge.has_st0018()) st0018.load(); if(cartridge.has_msu1()) msu1.load(); if(cartridge.has_link()) link.load(); serialize_init(); cheat.init(); }
void System::load() { string manifest; manifest.readfile({interface->path(ID::System), "manifest.xml"}); XML::Document document(manifest); string firmware = document["system"]["cpu"]["firmware"]["name"].data; interface->loadRequest(ID::BIOS, firmware); if(!file::exists({interface->path(ID::System), firmware})) { interface->notify("Error: required firmware ", firmware, " not found.\n"); } serialize_init(); }
void serialize_add(char *name, char *content, char *alias) { srlz *s; serialize_init(); if ((s = ALLOC(*s)) == NULL) perror("malloc"); s->name = name; s->content = content; s->alias = alias; lc_push(_serializes_list, s); return ; }
void System::load() { string manifest = string::read({interface->path(ID::System), "manifest.bml"}); auto document = Markup::Document(manifest); interface->loadRequest(ID::IPLROM, document["system/smp/rom/name"].data); if(!file::exists({interface->path(ID::System), document["system/smp/rom/name"].data})) { interface->notify("Error: required Super Famicom firmware ipl.rom not found.\n"); } region = config.region; expansion = config.expansion_port; if(region == Region::Autodetect) { region = (cartridge.region() == Cartridge::Region::NTSC ? Region::NTSC : Region::PAL); } cpu_frequency = region() == Region::NTSC ? config.cpu.ntsc_frequency : config.cpu.pal_frequency; apu_frequency = region() == Region::NTSC ? config.smp.ntsc_frequency : config.smp.pal_frequency; audio.coprocessor_enable(false); bus.map_reset(); bus.map_xml(); cpu.enable(); ppu.enable(); if(expansion() == ExpansionPortDevice::Satellaview) satellaviewbaseunit.load(); if(cartridge.has_gb_slot()) icd2.load(); if(cartridge.has_bs_cart()) bsxcartridge.load(); if(cartridge.has_nss_dip()) nss.load(); if(cartridge.has_event()) event.load(); if(cartridge.has_sa1()) sa1.load(); if(cartridge.has_superfx()) superfx.load(); if(cartridge.has_armdsp()) armdsp.load(); if(cartridge.has_hitachidsp()) hitachidsp.load(); if(cartridge.has_necdsp()) necdsp.load(); if(cartridge.has_epsonrtc()) epsonrtc.load(); if(cartridge.has_sharprtc()) sharprtc.load(); if(cartridge.has_spc7110()) spc7110.load(); if(cartridge.has_sdd1()) sdd1.load(); if(cartridge.has_obc1()) obc1.load(); if(cartridge.has_hsu1()) hsu1.load(); if(cartridge.has_msu1()) msu1.load(); if(cartridge.has_bs_slot()) satellaviewcartridge.load(); if(cartridge.has_st_slots()) sufamiturboA.load(), sufamiturboB.load(); serialize_init(); cheat.init(); }
void System::load(Revision revision) { this->revision = revision; serialize_init(); if(revision == Revision::SuperGameBoy) return; //Super Famicom core loads boot ROM for SGB interface->loadRequest(ID::SystemManifest, "manifest.bml", true); auto document = BML::unserialize(information.manifest); if(auto bootROM = document["system/cpu/rom/name"].text()) { interface->loadRequest( revision == Revision::GameBoy ? ID::GameBoyBootROM : ID::GameBoyColorBootROM, bootROM, true ); } }
void System::load() { //string manifest = string::read({interface->path(ID::System), "manifest.bml"}); interface->loadRequest(ID::SystemManifest, "manifest.bml", true); auto document = BML::unserialize(information.manifest); if(auto iplrom = document["system/smp/rom/name"].text()) { interface->loadRequest(ID::IPLROM, iplrom, true); } region = configuration.region; expansion = configuration.expansion_port; if(region == Region::Autodetect) { region = (cartridge.region() == Cartridge::Region::NTSC ? Region::NTSC : Region::PAL); } cpu_frequency = region() == Region::NTSC ? 21477272 : 21281370; apu_frequency = 24607104; audio.coprocessor_enable(false); bus.reset(); bus.map(); cpu.enable(); ppu.enable(); if(expansion() == ExpansionPortDevice::Satellaview) satellaviewbaseunit.load(); if(cartridge.hasICD2()) icd2.load(); if(cartridge.hasMCC()) mcc.load(); if(cartridge.hasNSSDIP()) nss.load(); if(cartridge.hasEvent()) event.load(); if(cartridge.hasSA1()) sa1.load(); if(cartridge.hasSuperFX()) superfx.load(); if(cartridge.hasARMDSP()) armdsp.load(); if(cartridge.hasHitachiDSP()) hitachidsp.load(); if(cartridge.hasNECDSP()) necdsp.load(); if(cartridge.hasEpsonRTC()) epsonrtc.load(); if(cartridge.hasSharpRTC()) sharprtc.load(); if(cartridge.hasSPC7110()) spc7110.load(); if(cartridge.hasSDD1()) sdd1.load(); if(cartridge.hasOBC1()) obc1.load(); if(cartridge.hasMSU1()) msu1.load(); if(cartridge.hasSatellaviewSlot()) satellaviewcartridge.load(); if(cartridge.hasSufamiTurboSlots()) sufamiturboA.load(), sufamiturboB.load(); serialize_init(); }
void System::load(Revision revision) { this->revision = revision; serialize_init(); if(revision == Revision::SuperGameBoy) return; //Super Famicom core loads boot ROM for SGB string manifest, firmware; manifest.readfile({interface->path(ID::System), "manifest.xml"}); XML::Document document(manifest); interface->loadRequest( revision == Revision::GameBoy ? ID::GameBoyBootROM : ID::GameBoyColorBootROM, document["system"]["cpu"]["firmware"]["name"].data ); if(!file::exists({interface->path(ID::System), document["system"]["cpu"]["firmware"]["name"].data})) { interface->notify("Error: required firmware ", firmware, " not found.\n"); } }
bss_status_t sdb_serialize( sdb_table_t *tbl, bss_ctx_t *bss_ctx) { int r; switch( tbl->state) { case SDB_ST_READING: if( tbl->nwrittenobjects < tbl->ncolumns) return SDB_EOK; // empty table r = serialize_init( tbl, bss_ctx); if( r) return r; tbl->state = SDB_ST_SERIALIZING; /* fall through. */ case SDB_ST_SERIALIZING: if( bss_ctx != tbl->serialization_ctx->bss_ctx) return BSS_EINVALID; r = serialize_table( tbl); if( SDB_EOK == r) tbl->state = SDB_ST_READING; return r; default: return SDB_EBADSTATE; } }
void System::load() { region = config.region; expansion = config.expansion_port; if(region == Region::Autodetect) { region = (cartridge.region() == Cartridge::Region::NTSC ? Region::NTSC : Region::PAL); } cpu_frequency = region() == Region::NTSC ? config.cpu.ntsc_frequency : config.cpu.pal_frequency; apu_frequency = region() == Region::NTSC ? config.smp.ntsc_frequency : config.smp.pal_frequency; audio.coprocessor_enable(false); bus.map_reset(); bus.map_xml(); cpu.enable(); ppu.enable(); if(expansion() == ExpansionPortDevice::BSX) bsxsatellaview.load(); if(cartridge.has_gb_slot()) icd2.load(); if(cartridge.has_bs_cart()) bsxcartridge.load(); if(cartridge.has_bs_slot()) bsxflash.load(); if(cartridge.has_st_slots()) sufamiturbo.load(); if(cartridge.has_nss_dip()) nss.load(); if(cartridge.has_superfx()) superfx.load(); if(cartridge.has_sa1()) sa1.load(); if(cartridge.has_necdsp()) necdsp.load(); if(cartridge.has_hitachidsp()) hitachidsp.load(); if(cartridge.has_armdsp()) armdsp.load(); if(cartridge.has_srtc()) srtc.load(); if(cartridge.has_sdd1()) sdd1.load(); if(cartridge.has_spc7110()) spc7110.load(); if(cartridge.has_obc1()) obc1.load(); if(cartridge.has_msu1()) msu1.load(); if(cartridge.has_link()) link.load(); serialize_init(); cheat.init(); }