这篇教程C++ software_get_default_slot函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中software_get_default_slot函数的典型用法代码示例。如果您正苦于以下问题:C++ software_get_default_slot函数的具体用法?C++ software_get_default_slot怎么用?C++ software_get_default_slot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了software_get_default_slot函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: software_get_default_slotstd::string colecovision_cartridge_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { UINT32 length = m_file->size(); if (length == 0x100000 || length == 0x200000) return software_get_default_slot("xin1"); } return software_get_default_slot("standard");}
开发者ID:Ashura-X,项目名称:mame,代码行数:10,
示例2: headvoid a5200_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "a5200"; dynamic_buffer head(0x10); UINT32 len = core_fsize(m_file); int type = A5200_8K; // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { core_fread(m_file, &head[0], 0x10); type = identify_cart_type(&head[0]); std::string info; if (hashfile_extrainfo(*this, info) && info.compare("A13MIRRORING")==0) type = A5200_16K_2CHIPS; } if (type < A5200_4K) osd_printf_info("This game is not designed for A5200. You might want to run it in A800 or A800XL./n"); slot_string = a800_get_slot(type); clear(); result.assign(slot_string); } else software_get_default_slot(result, "a5200");}
开发者ID:stengun,项目名称:mame,代码行数:31,
示例3: headstd::string a800_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; std::vector<uint8_t> head(0x10); uint32_t len = m_file->size(); int type = A800_8K; // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { m_file->read(&head[0], 0x10); type = identify_cart_type(&head[0]); } else // otherwise try to guess based on size { if (len == 0x4000) type = A800_16K; if (len == 0x2000) type = A800_8K; } if (type >= A5200_4K) osd_printf_info("This game is not designed for A800. You might want to run it in A5200./n"); slot_string = a800_get_slot(type); clear(); return std::string(slot_string); } else return software_get_default_slot("a800_8k");}
开发者ID:Enverex,项目名称:mame,代码行数:35,
示例4: core_fsizeconst char * sega8_cart_slot_device::get_default_card_software(const machine_config &config, emu_options &options){ if (open_image_file(options)) { const char *slot_string = "rom"; UINT32 len = core_fsize(m_file), offset = 0; UINT8 *ROM = global_alloc_array(UINT8, len); int type; core_fread(m_file, ROM, len); if ((len % 0x4000) == 512) offset = 512; type = get_cart_type(ROM + offset, len - offset); slot_string = sega8_get_slot(type); //printf("type: %s/n", slot_string); global_free(ROM); clear(); return slot_string; } return software_get_default_slot(config, options, this, "rom");}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:26,
示例5: core_fsizevoid vc4000_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "std"; UINT32 size = core_fsize(m_file); int type = VC4000_STD; // attempt to identify the non-standard types if (size > 0x1000) // 6k rom + 1k ram - Chess2 only type = VC4000_CHESS2; else if (size > 0x0800) // some 4k roms have 1k of mirrored ram type = VC4000_RAM1K; slot_string = vc4000_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "std");}
开发者ID:DanielAeolusLaude,项目名称:mame,代码行数:25,
示例6: core_fsizevoid apf_cart_slot_device::get_default_card_software(astring &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "std"; UINT32 size = core_fsize(m_file); int type = APF_STD; // attempt to identify Space Destroyer, which needs 1K of additional RAM if (size == 0x1800) type = APF_SPACEDST; if (size > 0x2000) type = APF_BASIC; slot_string = apf_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.cpy(slot_string); return; } software_get_default_slot(result, "std");}
开发者ID:crazii,项目名称:mameplus,代码行数:25,
示例7: core_fsizevoid sega8_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "rom"; UINT32 len = core_fsize(m_file), offset = 0; dynamic_buffer rom(len); int type; core_fread(m_file, &rom[0], len); if ((len % 0x4000) == 512) offset = 512; type = get_cart_type(&rom[offset], len - offset); slot_string = sega8_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "rom");}
开发者ID:BrandoCommando,项目名称:mame,代码行数:26,
示例8: romstd::string sega8_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 len = m_file->size(), offset = 0; dynamic_buffer rom(len); int type; m_file->read(&rom[0], len); if ((len % 0x4000) == 512) offset = 512; type = get_cart_type(&rom[offset], len - offset); slot_string = sega8_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("rom");}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:25,
示例9: core_fsizestd::string vectrex_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 size = core_fsize(m_file); dynamic_buffer rom(size); int type = VECTREX_STD; core_fread(m_file, &rom[0], size); if (!memcmp(&rom[0x06], "SRAM", 4)) type = VECTREX_SRAM; if (size > 0x8000) type = VECTREX_64K; slot_string = vectrex_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("vec_rom");}
开发者ID:BenjaminSiskoo,项目名称:mame,代码行数:26,
示例10: cbm_crt_get_cardstd::string c64_expansion_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { if (is_filetype("crt")) return cbm_crt_get_card(*m_file); clear(); } return software_get_default_slot("standard");}
开发者ID:Enverex,项目名称:mame,代码行数:12,
示例11: cbm_crt_get_cardconst char * c64_expansion_slot_device::get_default_card_software(const machine_config &config, emu_options &options){ if (open_image_file(options)) { if (!mame_stricmp(filetype(), "crt")) { return cbm_crt_get_card(m_file); } clear(); } return software_get_default_slot(config, options, this, "standard");}
开发者ID:dezi,项目名称:mame-libretro-odroid,代码行数:14,
示例12: cbm_crt_get_cardvoid c64_expansion_slot_device::get_default_card_software(astring &result){ if (open_image_file(mconfig().options())) { if (!mame_stricmp(filetype(), "crt")) { cbm_crt_get_card(result, m_file); return; } clear(); } software_get_default_slot(result, "standard");}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:15,
示例13: core_fsizevoid crvision_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 size = core_fsize(m_file); int type = CRV_4K; switch (size) { case 0x4800: type = CRV_18K; break; case 0x4000: type = CRV_16K; break; case 0x3000: type = CRV_12K; break; case 0x2800: type = CRV_10K; break; case 0x2000: type = CRV_8K; break; case 0x1800: type = CRV_6K; break; case 0x1000: default: break; } slot_string = crvision_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "crv_rom4k");}
开发者ID:ursine,项目名称:mame,代码行数:44,
示例14: romstd::string vcs_cart_slot_device::get_default_card_software(get_default_card_software_hook &hook) const{ if (hook.image_file()) { const char *slot_string; uint32_t len = hook.image_file()->size(); std::vector<uint8_t> rom(len); int type; hook.image_file()->read(&rom[0], len); type = identify_cart_type(&rom[0], len); slot_string = vcs_get_slot(type); return std::string(slot_string); } else return software_get_default_slot("a26_4k");}
开发者ID:Dagarman,项目名称:mame,代码行数:19,
示例15: romstd::string vcs_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; m_file->read(&rom[0], len); type = identify_cart_type(&rom[0], len); slot_string = vcs_get_slot(type); clear(); return std::string(slot_string); } else return software_get_default_slot("a26_4k");}
开发者ID:Ashura-X,项目名称:mame,代码行数:21,
示例16: core_fsizevoid vcs_cart_slot_device::get_default_card_software(astring &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "a26_4k"; UINT32 len = core_fsize(m_file); dynamic_buffer rom(len); int type; core_fread(m_file, rom, len); type = identify_cart_type(rom, len); slot_string = vcs_get_slot(type); clear(); result.cpy(slot_string); } else software_get_default_slot(result, "a26_4k");}
开发者ID:jbaicoianu,项目名称:mame,代码行数:21,
示例17: romstd::string gba_cart_slot_device::get_default_card_software(get_default_card_software_hook &hook) const{ if (hook.image_file()) { const char *slot_string; uint32_t len = hook.image_file()->size(); std::vector<uint8_t> rom(len); int type; hook.image_file()->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = gba_get_slot(type); //printf("type: %s/n", slot_string); return std::string(slot_string); } return software_get_default_slot("gba_rom");}
开发者ID:Dagarman,项目名称:mame,代码行数:21,
示例18: chanf_get_slotstd::string channelf_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; uint32_t len = m_file->size(); int type; if (len == 0x40000) type = CF_MULTI; else type = CF_CHESS; // is there any way to detect the other carts from fullpath? slot_string = chanf_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("chess");}
开发者ID:Robbbert,项目名称:store1,代码行数:22,
示例19: romstd::string scv_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; m_file->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = scv_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("rom8k");}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:22,
示例20: core_fsizevoid gba_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "gba_rom"; UINT32 len = core_fsize(m_file); dynamic_buffer rom(len); int type; core_fread(m_file, &rom[0], len); type = get_cart_type(&rom[0], len); slot_string = gba_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "gba_rom");}
开发者ID:dientaufan,项目名称:mame,代码行数:23,
示例21: core_fsizeconst char * gba_cart_slot_device::get_default_card_software(const machine_config &config, emu_options &options){ if (open_image_file(options)) { const char *slot_string = "gba_rom"; UINT32 len = core_fsize(m_file); UINT8 *ROM = global_alloc_array(UINT8, len); int type; core_fread(m_file, ROM, len); type = get_cart_type(ROM, len); slot_string = gba_get_slot(type); //printf("type: %s/n", slot_string); global_free(ROM); clear(); return slot_string; } return software_get_default_slot(config, options, this, "gba_rom");}
开发者ID:antervud,项目名称:MAMEHub,代码行数:23,
示例22: core_fsizevoid channelf_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "chess"; UINT32 len = core_fsize(m_file); int type; if (len == 0x40000) type = CF_MULTI; else type = CF_CHESS; // is there any way to detect the other carts from fullpath? slot_string = chanf_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "chess");}
开发者ID:robsonfr,项目名称:mame,代码行数:23,
示例23: core_fsizestd::string astrocade_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 size = core_fsize(m_file); int type = ASTROCADE_STD; if (size == 0x40000) type = ASTROCADE_256K; if (size == 0x80000) type = ASTROCADE_512K; slot_string = astrocade_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("rom");}
开发者ID:DragonMinded,项目名称:mame,代码行数:23,
示例24: o2_get_slotstd::string o2_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; UINT32 size = m_file->size(); int type = O2_STD; if (size == 12288) type = O2_ROM12; if (size == 16384) type = O2_ROM16; slot_string = o2_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("o2_rom");}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:23,
示例25: core_fsizevoid o2_cart_slot_device::get_default_card_software(std::string &result){ if (open_image_file(mconfig().options())) { const char *slot_string = "o2_rom"; UINT32 size = core_fsize(m_file); int type = O2_STD; if (size == 12288) type = O2_ROM12; if (size == 16384) type = O2_ROM16; slot_string = o2_get_slot(type); //printf("type: %s/n", slot_string); clear(); result.assign(slot_string); return; } software_get_default_slot(result, "o2_rom");}
开发者ID:stengun,项目名称:mame,代码行数:24,
示例26: ifstd::string vc4000_cart_slot_device::get_default_card_software(){ if (open_image_file(mconfig().options())) { const char *slot_string; uint32_t size = m_file->size(); int type = VC4000_STD; // attempt to identify the non-standard types if (size > 0x1000) // 6k rom + 1k ram - Chess2 only type = VC4000_CHESS2; else if (size > 0x0800) // some 4k roms have 1k of mirrored ram type = VC4000_RAM1K; slot_string = vc4000_get_slot(type); //printf("type: %s/n", slot_string); clear(); return std::string(slot_string); } return software_get_default_slot("std");}
开发者ID:Enverex,项目名称:mame,代码行数:24,
注:本文中的software_get_default_slot函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ sol_flow_send_error_packet函数代码示例 C++ software_entry函数代码示例 |