当前位置: 首页>>代码示例>>C++>>正文


C++ device_image_interface::get_feature方法代码示例

本文整理汇总了C++中device_image_interface::get_feature方法的典型用法代码示例。如果您正苦于以下问题:C++ device_image_interface::get_feature方法的具体用法?C++ device_image_interface::get_feature怎么用?C++ device_image_interface::get_feature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在device_image_interface的用法示例。


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

示例1: if

static void c64_software_list_cartridge_load(device_image_interface &image)
{
	legacy_c64_state *state = image.device().machine().driver_data<legacy_c64_state>();

	// initialize ROML and ROMH pointers
	state->m_roml = state->m_c64_roml;
	state->m_romh = state->m_c64_romh;

	// clear ROML and ROMH areas
	memset(state->m_roml, 0, 0x2000);
	memset(state->m_romh, 0, 0x2000);

	// set GAME and EXROM
	state->m_game = atol(image.get_feature("game"));
	state->m_exrom = atol(image.get_feature("exrom"));

	// determine cartridge type
	const char *cart_type = image.get_feature("cart_type");

	if (cart_type == NULL)
	{
		load_standard_c64_cartridge(image);
	}
	else
	{
		if (!strcmp(cart_type, "vizawrite"))
			load_vizawrite_cartridge(image);

		else if (!strcmp(cart_type, "hugo"))
			load_hugo_cartridge(image);

		else if (!strcmp(cart_type, "easy_calc_result"))
			load_easy_calc_result_cartridge(image);

		else if (!strcmp(cart_type, "pagefox"))
			load_pagefox_cartridge(image);

		else if (!strcmp(cart_type, "multiscreen"))
			/*

                TODO: crashes on protection check after cartridge RAM test

                805A: lda  $01
                805C: and  #$FE
                805E: sta  $01
                8060: m6502_brk#$00 <-- BOOM!

            */
			load_multiscreen_cartridge(image);

		else if (!strcmp(cart_type, "simons_basic"))
			load_simons_basic_cartridge(image);

		else if (!strcmp(cart_type, "super_explode"))
			load_super_explode_cartridge(image);

		else
			load_standard_c64_cartridge(image);
	}
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:60,代码来源:c64.c

示例2: install_protection

// handle protected carts
static void install_protection(device_image_interface& image)
{
	neogeo_state *state = image.device().machine().driver_data<neogeo_state>();
	const char *crypt_feature = image.get_feature( "crypt" );

	if(crypt_feature == NULL)
		return;

	if(strcmp(crypt_feature,"fatfury2_prot") == 0)
	{
		fatfury2_install_protection(image.device().machine());
		logerror("Installed Fatal Fury 2 protection\n");
	}
	if(strcmp(crypt_feature,"kof99_crypt") == 0)
	{
		kof99_decrypt_68k(image.device().machine());
		state->m_fixed_layer_bank_type = 1;
		kof99_neogeo_gfx_decrypt(image.device().machine(), 0x00);
		kof99_install_protection(image.device().machine());
		logerror("Decrypted KOF99 code and graphics.\n");
	}
	if(strcmp(crypt_feature,"mslug3_crypt") == 0)
	{
		state->m_fixed_layer_bank_type = 1;
		kof99_neogeo_gfx_decrypt(image.device().machine(), 0xad);
		logerror("Decrypted Metal Slug 3 graphics\n");
	}
	if(strcmp(crypt_feature,"matrim_crypt") == 0)
	{
		matrim_decrypt_68k(image.device().machine());
		neo_pcm2_swap(image.device().machine(), 1);
		state->m_fixed_layer_bank_type = 2;
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x6a);
		logerror("Decrypted Matrimelee code, sound and graphics\n");
	}
	if(strcmp(crypt_feature,"svc_crypt") == 0)
	{
		svc_px_decrypt(image.device().machine());
		neo_pcm2_swap(image.device().machine(), 3);
		state->m_fixed_layer_bank_type = 2;
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x57);
		install_pvc_protection(image.device().machine());
		logerror("Decrypted SvC code, sound and graphics.\n");
	}
	if(strcmp(crypt_feature,"samsho5_crypt") == 0)
	{
		samsho5_decrypt_68k(image.device().machine());
		neo_pcm2_swap(image.device().machine(), 4);
		state->m_fixed_layer_bank_type = 1;
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x0f);
		logerror("Decrypted Samurai Shodown V code, sound and graphics.\n");
	}
	if(strcmp(crypt_feature,"kof2000_crypt") == 0)
	{
		kof2000_decrypt_68k(image.device().machine());
		state->m_fixed_layer_bank_type = 2;
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x00);
		kof2000_install_protection(image.device().machine());
		logerror("Decrypted KOF2000 code, sound and graphics.\n");
	}
	if(strcmp(crypt_feature,"kof2001_crypt") == 0)
	{
		state->m_fixed_layer_bank_type = 1;
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x1e);
		neogeo_cmc50_m1_decrypt(image.device().machine());
		logerror("Decrypted KOF2001 code and graphics.\n");
	}
	if(strcmp(crypt_feature,"kof2002_crypt") == 0)
	{
		kof2002_decrypt_68k(image.device().machine());
		neo_pcm2_swap(image.device().machine(), 0);
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0xec);
		logerror("Decrypted KOF2002 code, sound and graphics.\n");
	}
	if(strcmp(crypt_feature,"mslug4_crypt") == 0)
	{
		state->m_fixed_layer_bank_type = 1; /* USA violent content screen is wrong -- not a bug, confirmed on real hardware! */
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x31);
		neo_pcm2_snk_1999(image.device().machine(), 8);
		logerror("Decrypted Metal Slug 4 code, sound and graphics.\n");
	}
	if(strcmp(crypt_feature,"mslug5_crypt") == 0)
	{
		mslug5_decrypt_68k(image.device().machine());
		neo_pcm2_swap(image.device().machine(), 2);
		state->m_fixed_layer_bank_type = 1;
		neogeo_cmc50_m1_decrypt(image.device().machine());
		kof2000_neogeo_gfx_decrypt(image.device().machine(), 0x19);
		install_pvc_protection(image.device().machine());
		logerror("Decrypted Metal Slug 5 code and graphics, and installed protection routines.\n");
	}
	if(strcmp(crypt_feature,"kof2003_crypt") == 0)
	{
//.........这里部分代码省略.........
开发者ID:cdenix,项目名称:psmame,代码行数:101,代码来源:aescart.c


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