• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ROM_GETHASHDATA函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ROM_GETHASHDATA函数的典型用法代码示例。如果您正苦于以下问题:C++ ROM_GETHASHDATA函数的具体用法?C++ ROM_GETHASHDATA怎么用?C++ ROM_GETHASHDATA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ROM_GETHASHDATA函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: hashes

media_auditor::summary media_auditor::audit_device(device_t *device, const char *validation)
{
    // start fresh
    m_record_list.reset();

    // store validation for later
    m_validation = validation;
    m_searchpath = device->shortname();

    int found = 0;
    int required = 0;

    // now iterate over regions and ROMs within
    for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
    {
        for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
        {
            hash_collection hashes(ROM_GETHASHDATA(rom));

            // count the number of files with hashes
            if (!hashes.flag(hash_collection::FLAG_NO_DUMP) && !ROM_ISOPTIONAL(rom))
            {
                required++;
            }

            // audit a file
            audit_record *record = NULL;
            if (ROMREGION_ISROMDATA(region))
                record = audit_one_rom(rom);

            // audit a disk
            else if (ROMREGION_ISDISKDATA(region))
                record = audit_one_disk(rom);

            // count the number of files that are found.
            if (record != NULL && (record->status() == audit_record::STATUS_GOOD || record->status() == audit_record::STATUS_FOUND_INVALID))
            {
                found++;
            }
        }
    }

    if (found == 0 && required > 0)
    {
        m_record_list.reset();
        return NOTFOUND;
    }

    // return a summary
    return summarize(device->shortname());
}
开发者ID:risico,项目名称:jsmess,代码行数:51,代码来源:audit.c


示例2: open_disk_image

chd_error open_disk_image(const game_driver *gamedrv, const rom_entry *romp, chd_file **image)
{
	const game_driver *drv;
	const rom_entry *region, *rom;
	const char *fname;
	chd_error err;

	/* attempt to open the properly named file */
	fname = assemble_2_strings(ROM_GETNAME(romp), ".chd");
	err = chd_open(fname, CHD_OPEN_READ, NULL, image);
	free((void *)fname);

	/* if that worked, we're done */
	if (err == CHDERR_NONE)
		return err;

	/* otherwise, look at our parents for a CHD with an identical checksum */
	/* and try to open that */
	for (drv = gamedrv; drv != NULL; drv = driver_get_clone(drv))
		for (region = rom_first_region(drv); region != NULL; region = rom_next_region(region))
			if (ROMREGION_ISDISKDATA(region))
				for (rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))

					/* look for a differing name but with the same hash data */
					if (strcmp(ROM_GETNAME(romp), ROM_GETNAME(rom)) != 0 &&
						hash_data_is_equal(ROM_GETHASHDATA(romp), ROM_GETHASHDATA(rom), 0))
					{
						fname = assemble_2_strings(ROM_GETNAME(rom), ".chd");
						err = chd_open(fname, CHD_OPEN_READ, NULL, image);
						free((void *)fname);

						/* if that worked, we're done */
						if (err == CHDERR_NONE)
							return err;
					}

	return err;
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:38,代码来源:romload.c


示例3: match_roms

/* Identifies a rom from from this checksum */
static void match_roms(const struct GameDriver *driver,const char* hash,int *found)
{
	const struct RomModule *region, *rom;

	for (region = rom_first_region(driver); region; region = rom_next_region(region))
	{
		for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
		{
			if (hash_data_is_equal(hash, ROM_GETHASHDATA(rom), 0))
			{
				char baddump = hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_BAD_DUMP);

				if (!silentident)
				{
					if (*found != 0)
						fprintf(stdout_file, "             ");
					fprintf(stdout_file, "= %s%-12s  %s\n",baddump ? "(BAD) " : "",ROM_GETNAME(rom),driver->description);
				}
				(*found)++;
			}
		}
	}
}
开发者ID:CarnyPriest,项目名称:SAMbuild,代码行数:24,代码来源:ident.c


示例4: printromlist

void printromlist(const struct RomModule *romp,const char *basename)
{
	const struct RomModule *region, *rom, *chunk;
	char buf[512];

	if (!romp) return;

#ifdef MESS
	if (!strcmp(basename,"nes")) return;
#endif

	printf("This is the list of the ROMs required for driver \"%s\".\n"
			"Name              Size       Checksum\n",basename);

	for (region = romp; region; region = rom_next_region(region))
	{
		for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
		{
			const char *name = ROM_GETNAME(rom);
			const char* hash = ROM_GETHASHDATA(rom);
			int length = -1; /* default is for disks! */

			if (ROMREGION_ISROMDATA(region))
			{
				length = 0;
				for (chunk = rom_first_chunk(rom); chunk; chunk = rom_next_chunk(chunk))
					length += ROM_GETLENGTH(chunk);
			}

			printf("%-12s ", name);
			if (length >= 0)
				printf("%7d",length);
				else
				printf("       ");

			if (!hash_data_has_info(hash, HASH_INFO_NO_DUMP))
			{
				if (hash_data_has_info(hash, HASH_INFO_BAD_DUMP))
					printf(" BAD");

				hash_data_print(hash, 0, buf);
				printf(" %s", buf);
			}
			else
				printf(" NO GOOD DUMP KNOWN");

			printf("\n");
		}
	}
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:50,代码来源:common.c


示例5: hashes

device_t *media_auditor::find_shared_device(device_t &device, const char *name, const hash_collection &romhashes, UINT64 romlength)
{
	bool dumped = !romhashes.flag(hash_collection::FLAG_NO_DUMP);

	// special case for non-root devices
	device_t *highest_device = nullptr;
	if (device.owner() != nullptr)
	{
		for (const rom_entry *region = rom_first_region(device); region != nullptr; region = rom_next_region(region))
			for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
				if (ROM_GETLENGTH(rom) == romlength)
				{
					hash_collection hashes(ROM_GETHASHDATA(rom));
					if ((dumped && hashes == romhashes) || (!dumped && ROM_GETNAME(rom) == name))
						highest_device = &device;
				}
	}
	else
	{
		// iterate up the parent chain
		for (int drvindex = m_enumerator.find(m_enumerator.driver().parent); drvindex != -1; drvindex = m_enumerator.find(m_enumerator.driver(drvindex).parent))
		{
			device_iterator deviter(m_enumerator.config(drvindex).root_device());
			for (device_t *scandevice = deviter.first(); scandevice != nullptr; scandevice = deviter.next())
				for (const rom_entry *region = rom_first_region(*scandevice); region; region = rom_next_region(region))
					for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
						if (ROM_GETLENGTH(rom) == romlength)
						{
							hash_collection hashes(ROM_GETHASHDATA(rom));
							if ((dumped && hashes == romhashes) || (!dumped && ROM_GETNAME(rom) == name))
								highest_device = scandevice;
						}
		}
	}

	return highest_device;
}
开发者ID:RJRetro,项目名称:mame,代码行数:37,代码来源:audit.cpp


示例6: rom_used_by_parent

static int rom_used_by_parent(const game_driver *gamedrv, const rom_entry *romentry, const game_driver **parent)
{
	const char *hash = ROM_GETHASHDATA(romentry);
	const game_driver *drv;

	/* iterate up the parent chain */
	for (drv = driver_get_clone(gamedrv); drv != NULL; drv = driver_get_clone(drv))
	{
		const rom_entry *region;
		const rom_entry *rom;

		/* see if the parent has the same ROM or not */
		for (region = rom_first_region(drv, NULL); region; region = rom_next_region(region))
			for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
				if (hash_data_is_equal(ROM_GETHASHDATA(rom), hash, 0))
				{
					if (parent != NULL)
						*parent = drv;
					return TRUE;
				}
	}

	return FALSE;
}
开发者ID:libretro,项目名称:mame2010-libretro,代码行数:24,代码来源:audit.c


示例7: match_roms

static void match_roms(const char *hash, int length, int *found)
{
	int drvindex;

	/* iterate over drivers */
	for (drvindex = 0; drivers[drvindex]; drvindex++)
	{
		const rom_entry *region, *rom;

		/* iterate over regions and files within the region */
		for (region = rom_first_region(drivers[drvindex]); region; region = rom_next_region(region))
			for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
				if (hash_data_is_equal(hash, ROM_GETHASHDATA(rom), 0))
				{
					int baddump = hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_BAD_DUMP);

					/* output information about the match */
					if (*found != 0)
						mame_printf_info("                    ");
					mame_printf_info("= %s%-20s  %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), drivers[drvindex]->description);
					(*found)++;
				}
	}
}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:24,代码来源:clifront.c


示例8: fill_rom_data

static void fill_rom_data(romload_private *romdata, const rom_entry *romp)
{
	UINT32 numbytes = ROM_GETLENGTH(romp);
	UINT8 *base = romdata->region->base() + ROM_GETOFFSET(romp);

	/* make sure we fill within the region space */
	if (ROM_GETOFFSET(romp) + numbytes > romdata->region->bytes())
		fatalerror("Error in RomModule definition: FILL out of memory region space\n");

	/* make sure the length was valid */
	if (numbytes == 0)
		fatalerror("Error in RomModule definition: FILL has an invalid length\n");

	/* fill the data (filling value is stored in place of the hashdata) */
	memset(base, (FPTR)ROM_GETHASHDATA(romp) & 0xff, numbytes);
}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:16,代码来源:romload.c


示例9: hashes

int media_auditor::also_used_by_parent(const hash_collection &romhashes)
{
	// iterate up the parent chain
	for (int drvindex = m_enumerator.find(m_enumerator.driver().parent); drvindex != -1; drvindex = m_enumerator.find(m_enumerator.driver(drvindex).parent))

		// see if the parent has the same ROM or not
		for (const rom_source *source = rom_first_source(m_enumerator.config(drvindex)); source != NULL; source = rom_next_source(*source))
			for (const rom_entry *region = rom_first_region(*source); region; region = rom_next_region(region))
				for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
				{
					hash_collection hashes(ROM_GETHASHDATA(rom));
					if (!hashes.flag(hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
						return drvindex;
				}

	// nope, return -1
	return -1;
}
开发者ID:lidibupa,项目名称:ClientServerMAME,代码行数:18,代码来源:audit.c


示例10: lstrcpy

STDMETHODIMP CRom::Audit(VARIANT_BOOL fStrict)
{
	int err;
	char szHash[256];
	lstrcpy(szHash, fStrict?"":ROM_GETHASHDATA(m_rom));

	/* obtain CRC-32 and length of ROM file */
	const struct GameDriver *drv = m_gamedrv;
	do
	{
		err = mame_fchecksum(drv->name, m_pszName, (unsigned int*) &m_dwLength, szHash);
		drv = drv->clone_of;
	} while (err && drv);

	if (err)
	{
		if (!m_dwChecksum)
			/* not found but it's not good anyway */
			m_dwState = AUD_NOT_AVAILABLE;
		else
			/* not found */
			m_dwState = AUD_ROM_NOT_FOUND;
	}
	else {
		m_dwChecksum = GetChecksumFromHash(szHash);

		/* all cases below assume the ROM was at least found */
		if (m_dwExpLength != m_dwLength)
			m_dwState = AUD_LENGTH_MISMATCH;
		else if (m_dwExpChecksum != m_dwChecksum)
		{
			if (!m_dwExpChecksum)
				m_dwState = AUD_ROM_NEED_DUMP; /* new case - found but not known to be dumped */
			else if (m_dwChecksum == BADCRC(m_dwExpChecksum))
				m_dwState = AUD_ROM_NEED_REDUMP;
			else
				m_dwState = AUD_BAD_CHECKSUM;
		}
		else
			m_dwState = AUD_ROM_GOOD;
	}

	return S_OK;
}
开发者ID:CarnyPriest,项目名称:SAMbuild,代码行数:44,代码来源:ControllerRom.cpp


示例11: open_rom_file

static int open_rom_file(struct rom_load_data *romdata, const struct RomModule *romp)
{
	const struct GameDriver *drv;

	++romdata->romsloaded;

	/* update status display */
	if (osd_display_loading_rom_message(ROM_GETNAME(romp), romdata))
       return 0;

	/* Attempt reading up the chain through the parents. It automatically also
	   attempts any kind of load by checksum supported by the archives. */
	romdata->file = NULL;
	for (drv = Machine->gamedrv; !romdata->file && drv; drv = drv->clone_of)
		if (drv->name && *drv->name)
			romdata->file = mame_fopen_rom(drv->name, ROM_GETNAME(romp), ROM_GETHASHDATA(romp));

	/* return the result */
	return (romdata->file != NULL);
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:20,代码来源:common.c


示例12: copy_rom_data

static int copy_rom_data(struct rom_load_data *romdata, const struct RomModule *romp)
{
	UINT8 *base = romdata->regionbase + ROM_GETOFFSET(romp);
	int srcregion = ROM_GETFLAGS(romp) >> 24;
	UINT32 numbytes = ROM_GETLENGTH(romp);
	UINT32 srcoffs = (UINT32)ROM_GETHASHDATA(romp);  /* srcoffset in place of hashdata */
	UINT8 *srcbase;

	/* make sure we copy within the region space */
	if (ROM_GETOFFSET(romp) + numbytes > romdata->regionlength)
	{
		printf("Error in RomModule definition: COPY out of target memory region space\n");
		return 0;
	}

	/* make sure the length was valid */
	if (numbytes == 0)
	{
		printf("Error in RomModule definition: COPY has an invalid length\n");
		return 0;
	}

	/* make sure the source was valid */
	srcbase = memory_region(srcregion);
	if (!srcbase)
	{
		printf("Error in RomModule definition: COPY from an invalid region\n");
		return 0;
	}

	/* make sure we find within the region space */
	if (srcoffs + numbytes > memory_region_length(srcregion))
	{
		printf("Error in RomModule definition: COPY out of source memory region space\n");
		return 0;
	}

	/* fill the data */
	memcpy(base, srcbase + srcoffs, numbytes);
	return 1;
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:41,代码来源:common.c


示例13: while

/*-------------------------------------------------
    load_software - software image loading
-------------------------------------------------*/
bool legacy_image_device_base::load_software(char *swlist, char *swname, rom_entry *start)
{
	const rom_entry *region;
	astring regiontag;
	bool retVal = FALSE;
	for (region = start; region != NULL; region = rom_next_region(region))
	{
		/* loop until we hit the end of this region */
		const rom_entry *romp = region + 1;
		while (!ROMENTRY_ISREGIONEND(romp))
		{
			/* handle files */
			if (ROMENTRY_ISFILE(romp))
			{
				UINT32 crc = 0;
				UINT8 crcbytes[4];
				file_error filerr;

				bool has_crc = hash_data_extract_binary_checksum(ROM_GETHASHDATA(romp), HASH_CRC, crcbytes);
				if (has_crc)
					crc = (crcbytes[0] << 24) | (crcbytes[1] << 16) | (crcbytes[2] << 8) | crcbytes[3];

				astring fname(swlist, PATH_SEPARATOR, swname, PATH_SEPARATOR, ROM_GETNAME(romp));
				if (has_crc)
					filerr = mame_fopen_crc(libretro_content_directory, fname, crc, OPEN_FLAG_READ, &m_mame_file);
				else
					filerr = mame_fopen(libretro_content_directory, fname, OPEN_FLAG_READ, &m_mame_file);

				if (filerr == FILERR_NONE)
				{
					m_file = mame_core_file(m_mame_file);
					retVal = TRUE;
				}
				break; // load first item for start
			}
			romp++;	/* something else; skip */
		}
	}
	return retVal;
}
开发者ID:libretro,项目名称:mame2010-libretro,代码行数:43,代码来源:devimage.c


示例14: deviter

void ui_menu_bios_selection::populate()
{
	/* cycle through all devices for this system */
	device_iterator deviter(machine().root_device());
	for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
	{
		if (device->rom_region()) {
			const char *val = "default";
			for (const rom_entry *rom = device->rom_region(); !ROMENTRY_ISEND(rom); rom++)
			{
				if (ROMENTRY_ISSYSTEM_BIOS(rom) && ROM_GETBIOSFLAGS(rom)==device->system_bios())
				{
					val = ROM_GETHASHDATA(rom);
				}
			}
			item_append(strcmp(device->tag(),":")==0 ? "driver" : device->tag()+1, val, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)device);
		}
	}

	item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
	item_append(_("Reset"),  nullptr, 0, (void *)1);
}
开发者ID:ndpduc,项目名称:mame,代码行数:22,代码来源:miscmenu.cpp


示例15: name

void rom_load_manager::handle_missing_file(const rom_entry *romp, std::string tried_file_names, chd_error chderr)
{
	if(tried_file_names.length() != 0)
		tried_file_names = " (tried in " + tried_file_names + ")";

	std::string name(ROM_GETNAME(romp));

	bool is_chd = (chderr != CHDERR_NONE);
	if (is_chd)
		name += ".chd";

	bool is_chd_error = (is_chd && chderr != CHDERR_FILE_NOT_FOUND);
	if (is_chd_error)
		strcatprintf(m_errorstring, "%s CHD ERROR: %s\n", name.c_str(), chd_file::error_string(chderr));

	/* optional files are okay */
	if (ROM_ISOPTIONAL(romp))
	{
		if (!is_chd_error)
			strcatprintf(m_errorstring, "OPTIONAL %s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str());
		m_warnings++;
	}

	/* no good dumps are okay */
	else if (hash_collection(ROM_GETHASHDATA(romp)).flag(hash_collection::FLAG_NO_DUMP))
	{
		if (!is_chd_error)
			strcatprintf(m_errorstring, "%s NOT FOUND (NO GOOD DUMP KNOWN)%s\n", name.c_str(), tried_file_names.c_str());
		m_knownbad++;
	}

	/* anything else is bad */
	else
	{
		if (!is_chd_error)
			strcatprintf(m_errorstring, "%s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str());
		m_errors++;
	}
}
开发者ID:notaz,项目名称:mame,代码行数:39,代码来源:romload.cpp


示例16: phashes

const char *info_xml_creator::get_merge_name(const hash_collection &romhashes)
{
	const char *merge_name = NULL;
	// walk the parent chain
	for (int clone_of = m_drivlist.find(m_drivlist.driver().parent); clone_of != -1; clone_of = m_drivlist.find(m_drivlist.driver(clone_of).parent))

		// look in the parent's ROMs
		for (const rom_source *psource = rom_first_source(m_drivlist.config(clone_of,m_lookup_options)); psource != NULL; psource = rom_next_source(*psource))
			for (const rom_entry *pregion = rom_first_region(*psource); pregion != NULL; pregion = rom_next_region(pregion))
				for (const rom_entry *prom = rom_first_file(pregion); prom != NULL; prom = rom_next_file(prom))
				{
					hash_collection phashes(ROM_GETHASHDATA(prom));
					if (!phashes.flag(hash_collection::FLAG_NO_DUMP) && romhashes == phashes)
					{
						// stop when we find a match
						merge_name = ROM_GETNAME(prom);
						break;
					}
				}

	return merge_name;
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:22,代码来源:info.c


示例17: ROM_GETHASHDATA

void ui_menu_bios_selection::populate()
{
	/* cycle through all devices for this system */
	for (device_t &device : device_iterator(machine().root_device()))
	{
		if (device.rom_region())
		{
			const char *val = "default";
			for (const rom_entry *rom = device.rom_region(); !ROMENTRY_ISEND(rom); rom++)
			{
				if (ROMENTRY_ISSYSTEM_BIOS(rom) && ROM_GETBIOSFLAGS(rom) == device.system_bios())
				{
					val = ROM_GETHASHDATA(rom);
				}
			}
			item_append(device.owner() == nullptr ? "driver" : device.tag()+1, val, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)&device);
		}
	}

	item_append(ui_menu_item_type::SEPARATOR);
	item_append(_("Reset"),  nullptr, 0, (void *)1);
}
开发者ID:chrisisonwildcode,项目名称:mame,代码行数:22,代码来源:miscmenu.cpp


示例18: handle_missing_file

static void handle_missing_file(romload_private *romdata, const rom_entry *romp, astring tried_file_names, chd_error chderr)
{
	if(tried_file_names.len() != 0)
		tried_file_names = " (tried in " + tried_file_names + ")";

	astring name(ROM_GETNAME(romp));

	bool is_chd = (chderr != CHDERR_NONE);
	if (is_chd)
		name += ".chd";

	bool is_chd_error = (is_chd && chderr != CHDERR_FILE_NOT_FOUND);
	if (is_chd_error)
		romdata->errorstring.catprintf("%s CHD ERROR: %s\n", name.cstr(), chd_file::error_string(chderr));

	/* optional files are okay */
	if (ROM_ISOPTIONAL(romp))
	{
		if (!is_chd_error)
			romdata->errorstring.catprintf("OPTIONAL %s NOT FOUND%s\n", name.cstr(), tried_file_names.cstr());
		romdata->warnings++;
	}

	/* no good dumps are okay */
	else if (hash_collection(ROM_GETHASHDATA(romp)).flag(hash_collection::FLAG_NO_DUMP))
	{
		if (!is_chd_error)
			romdata->errorstring.catprintf("%s NOT FOUND (NO GOOD DUMP KNOWN)%s\n", name.cstr(), tried_file_names.cstr());
		romdata->knownbad++;
	}

	/* anything else is bad */
	else
	{
		if (!is_chd_error)
			romdata->errorstring.catprintf("%s NOT FOUND%s\n", name.cstr(), tried_file_names.cstr());
		romdata->errors++;
	}
}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:39,代码来源:romload.c


示例19: specbios

void ui_menu_machine_configure::setup_bios()
{
	if (m_drv->rom == nullptr)
		return;

	std::string specbios(m_opts.bios());
	std::string default_name;
	for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom)
		if (ROMENTRY_ISDEFAULT_BIOS(rom))
			default_name = ROM_GETNAME(rom);
	
	int bios_count = 0;
	for (const rom_entry *rom = m_drv->rom; !ROMENTRY_ISEND(rom); ++rom)
	{
		if (ROMENTRY_ISSYSTEM_BIOS(rom))
		{
			std::string name(ROM_GETHASHDATA(rom));
			std::string biosname(ROM_GETNAME(rom));
			int bios_flags = ROM_GETBIOSFLAGS(rom);
			std::string bios_number = std::to_string(bios_flags - 1);

			// check biosnumber and name
			if (bios_number == specbios || biosname == specbios)
				m_curbios = bios_count;

			if (biosname == default_name)
			{
				name.append(_(" (default)"));
				if (specbios == "default")
					m_curbios = bios_count;
			}

			m_bios.emplace_back(name, bios_flags - 1);
			bios_count++;
		}
	}

}
开发者ID:chrisisonwildcode,项目名称:mame,代码行数:38,代码来源:miscmenu.cpp


示例20: handle_missing_file

static void handle_missing_file(rom_load_data *romdata, const rom_entry *romp)
{
	/* optional files are okay */
	if (ROM_ISOPTIONAL(romp))
	{
		romdata->errorstring.catprintf("OPTIONAL %s NOT FOUND\n", ROM_GETNAME(romp));
		romdata->warnings++;
	}

	/* no good dumps are okay */
	else if (hash_collection(ROM_GETHASHDATA(romp)).flag(hash_collection::FLAG_NO_DUMP))
	{
		romdata->errorstring.catprintf("%s NOT FOUND (NO GOOD DUMP KNOWN)\n", ROM_GETNAME(romp));
		romdata->knownbad++;
	}

	/* anything else is bad */
	else
	{
		romdata->errorstring.catprintf("%s NOT FOUND\n", ROM_GETNAME(romp));
		romdata->errors++;
	}
}
开发者ID:broftkd,项目名称:mess-svn,代码行数:23,代码来源:romload.c



注:本文中的ROM_GETHASHDATA函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ROM_GETLENGTH函数代码示例发布时间:2022-05-30
下一篇:
C++ ROM_FPULazyStackingEnable函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap