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


C++ device_t::interface方法代码示例

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


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

示例1: emu_fatalerror

address_map::address_map(device_t &device, address_spacenum spacenum)
	: m_spacenum(spacenum),
	  m_databits(0xff),
	  m_unmapval(0),
	  m_globalmask(0)
{
	// get our memory interface
	const device_memory_interface *memintf;
	if (!device.interface(memintf))
		throw emu_fatalerror("No memory interface defined for device '%s'\n", device.tag());

	// and then the configuration for the current address space
	const address_space_config *spaceconfig = memintf->space_config(spacenum);
	if (!device.interface(memintf))
		throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", device.tag(), spacenum);

	// append the internal device map (first so it takes priority) */
	if (spaceconfig->m_internal_map != NULL)
		(*spaceconfig->m_internal_map)(*this, device);

	// construct the standard map */
	if (memintf->address_map(spacenum) != NULL)
		(*memintf->address_map(spacenum))(*this, *device.owner());

	// append the default device map (last so it can be overridden) */
	if (spaceconfig->m_default_map != NULL)
		(*spaceconfig->m_default_map)(*this, device);
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:28,代码来源:addrmap.c

示例2: emu_fatalerror

address_map::address_map(device_t &device, address_spacenum spacenum)
	: m_spacenum(spacenum),
		m_databits(0xff),
		m_unmapval(0),
		m_globalmask(0)
{
	// get our memory interface
	const device_memory_interface *memintf;
	if (!device.interface(memintf))
		throw emu_fatalerror("No memory interface defined for device '%s'\n", device.tag());

	// and then the configuration for the current address space
	const address_space_config *spaceconfig = memintf->space_config(spacenum);
	if (!device.interface(memintf))
		throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", device.tag(), spacenum);

	// construct the internal device map (first so it takes priority)
	if (spaceconfig->m_internal_map != NULL)
		(*spaceconfig->m_internal_map)(*this, device);
	if (!spaceconfig->m_internal_map_delegate.isnull())
		spaceconfig->m_internal_map_delegate(*this, device);

	// append the map provided by the owner
	if (memintf->address_map(spacenum) != NULL)
		(*memintf->address_map(spacenum))(*this, *device.owner());
	else
	{
		// if the owner didn't provide a map, use the default device map
		if (spaceconfig->m_default_map != NULL)
			(*spaceconfig->m_default_map)(*this, device);
		if (!spaceconfig->m_default_map_delegate.isnull())
			spaceconfig->m_default_map_delegate(*this, device);
	}
}
开发者ID:kara1001000,项目名称:mame,代码行数:34,代码来源:addrmap.cpp

示例3: static_set_disable

void device_execute_interface::static_set_disable(device_t &device)
{
	device_execute_interface *exec;
	if (!device.interface(exec))
		throw emu_fatalerror("MCFG_DEVICE_DISABLE called on device '%s' with no execute interface", device.tag());
	exec->m_disabled = true;
}
开发者ID:crazii,项目名称:mameplus,代码行数:7,代码来源:diexec.c

示例4: static_set_irq_acknowledge_callback

void device_execute_interface::static_set_irq_acknowledge_callback(device_t &device, device_irq_acknowledge_delegate callback)
{
	device_execute_interface *exec;
	if (!device.interface(exec))
		throw emu_fatalerror("MCFG_DEVICE_IRQ_ACKNOWLEDGE called on device '%s' with no execute interface", device.tag());
	exec->m_driver_irq = callback;
}
开发者ID:crazii,项目名称:mameplus,代码行数:7,代码来源:diexec.c

示例5: static_set_dasm_override

void device_disasm_interface::static_set_dasm_override(device_t &device, dasm_override_delegate dasm_override)
{
    device_disasm_interface *dasm;
    if (!device.interface(dasm))
        throw emu_fatalerror("MCFG_DEVICE_DISASSEMBLE_OVERRIDE called on device '%s' with no disasm interface", device.tag());
    dasm->m_dasm_override = dasm_override;
}
开发者ID:Robbbert,项目名称:store1,代码行数:7,代码来源:didisasm.cpp

示例6: emu_fatalerror

//-------------------------------------------------
//  static_set_daisy_config - configuration helper
//  to set up the daisy chain
//-------------------------------------------------
void z80_daisy_chain_interface::static_set_daisy_config(device_t &device, const z80_daisy_config *config)
{
	z80_daisy_chain_interface *daisyintf;
	if (!device.interface(daisyintf))
		throw emu_fatalerror("MCFG_Z80_DAISY_CHAIN called on device '%s' with no daisy chain interface", device.tag());
	daisyintf->m_daisy_config = config;
}
开发者ID:mp-lee,项目名称:mameui,代码行数:11,代码来源:z80daisy.cpp

示例7: static_set_screen

void device_video_interface::static_set_screen(device_t &device, const char *tag)
{
	// find our video interface
	device_video_interface *video;
	if (!device.interface(video))
		throw emu_fatalerror("MCFG_VIDEO_SET_SCREEN called on device '%s' with no video interface", device.tag());
	video->m_screen_tag = tag;
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:8,代码来源:divideo.c

示例8: static_set_periodic_int

void device_execute_interface::static_set_periodic_int(device_t &device, device_interrupt_delegate function, const attotime &rate)
{
	device_execute_interface *exec;
	if (!device.interface(exec))
		throw emu_fatalerror("MCFG_DEVICE_PERIODIC_INT called on device '%s' with no execute interface", device.tag());
	exec->m_timed_interrupt = function;
	exec->m_timed_interrupt_period = rate;
}
开发者ID:crazii,项目名称:mameplus,代码行数:8,代码来源:diexec.c

示例9: static_set_vblank_int

void device_execute_interface::static_set_vblank_int(device_t &device, device_interrupt_delegate function, const char *tag, int rate)
{
	device_execute_interface *exec;
	if (!device.interface(exec))
		throw emu_fatalerror("MCFG_DEVICE_VBLANK_INT called on device '%s' with no execute interface", device.tag());
	exec->m_vblank_interrupt = function;
	exec->m_vblank_interrupt_screen = tag;
}
开发者ID:crazii,项目名称:mameplus,代码行数:8,代码来源:diexec.c

示例10: static_set_info

void device_gfx_interface::static_set_info(device_t &device, const gfx_decode_entry *gfxinfo)
{
	device_gfx_interface *gfx;
	if (!device.interface(gfx))
		throw emu_fatalerror("MCFG_GFX_INFO called on device '%s' with no gfx interface\n", device.tag());

	gfx->m_gfxdecodeinfo = gfxinfo;
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:8,代码来源:digfx.c

示例11: static_set_addrmap

void device_memory_interface::static_set_addrmap(device_t &device, address_spacenum spacenum, address_map_constructor map)
{
	device_memory_interface *memory;
	if (!device.interface(memory))
		throw emu_fatalerror("MCFG_DEVICE_ADDRESS_MAP called on device '%s' with no memory interface", device.tag());
	if (spacenum >= ARRAY_LENGTH(memory->m_address_map))
		throw emu_fatalerror("MCFG_DEVICE_ADDRESS_MAP called on device '%s' with out-of-range space number %d", device.tag(), spacenum);
	memory->m_address_map[spacenum] = map;
}
开发者ID:Robbbert,项目名称:store1,代码行数:9,代码来源:dimemory.cpp

示例12: static_set_palette

void device_gfx_interface::static_set_palette(device_t &device, const char *tag)
{
	device_gfx_interface *gfx;
	if (!device.interface(gfx))
		throw emu_fatalerror("MCFG_GFX_PALETTE called on device '%s' with no gfx interface\n", device.tag());

	gfx->m_palette_tag = tag;
	gfx->m_palette_is_sibling = true;
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:9,代码来源:digfx.c

示例13: static_set_slot_info

void device_slot_interface::static_set_slot_info(device_t &device, const slot_interface *slots_info, const char *default_card, bool fixed)
{
	device_slot_interface *slot;
	if (!device.interface(slot))
		throw emu_fatalerror("set_default_slot_card called on device '%s' with no slot interface", device.tag());

	slot->m_slot_interfaces = slots_info;
	slot->m_default_card = default_card;
	slot->m_fixed = fixed;
}
开发者ID:fesh0r,项目名称:old-mame,代码行数:10,代码来源:dislot.c

示例14: static_reset_routes

void device_sound_interface::static_reset_routes(device_t &device)
{
    // find our sound interface
    device_sound_interface *sound;
    if (!device.interface(sound))
        throw emu_fatalerror("MCFG_SOUND_ROUTES_RESET called on device '%s' with no sound interface", device.tag());

    // reset the routine list
    sound->m_route_list.reset();
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:10,代码来源:disound.c

示例15: static_set_slot_info

void device_slot_interface::static_set_slot_info(device_t &device, const slot_interface *slots_info, const char *default_card,const input_device_default *default_input, const void *default_config, UINT32 default_clock, bool fixed)
{
	device_slot_interface *slot;
	if (!device.interface(slot))
		throw emu_fatalerror("set_default_slot_card called on device '%s' with no slot interface", device.tag());

	slot->m_slot_interfaces = slots_info;
	slot->m_default_card = default_card;
	slot->m_input_defaults = default_input;
	slot->m_default_config = default_config;
	slot->m_default_clock = default_clock;
	slot->m_fixed = fixed;
}
开发者ID:broftkd,项目名称:mess-svn,代码行数:13,代码来源:dislot.c


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