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


C++ device_t类代码示例

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


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

示例1:

param_t::param_t(device_t &device, const pstring &name)
	: device_object_t(device, device.name() + "." + name)
{
	device.setup().register_param_t(this->name(), *this);
}
开发者ID:rfka01,项目名称:mame,代码行数:5,代码来源:nl_base.cpp

示例2:

device_bbc_1mhzbus_interface::device_bbc_1mhzbus_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<bbc_1mhzbus_slot_device *>(device.owner());
}
开发者ID:RalfVB,项目名称:mame,代码行数:5,代码来源:1mhzbus.cpp

示例3:

device_isbx_card_interface::device_isbx_card_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<isbx_slot_device *>(device.owner());
}
开发者ID:Ashura-X,项目名称:mame,代码行数:5,代码来源:isbx.cpp

示例4:

abc_keyboard_interface::abc_keyboard_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig,device)
{
	m_slot = dynamic_cast<abc_keyboard_port_device *>(device.owner());
}
开发者ID:felipesanches,项目名称:ume,代码行数:5,代码来源:abckb.c

示例5:

device_einstein_userport_interface::device_einstein_userport_interface(const machine_config &mconfig, device_t &device) :
	device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<einstein_userport_device *>(device.owner());
}
开发者ID:Dagarman,项目名称:mame,代码行数:5,代码来源:userport.cpp

示例6:

device_tiki100bus_card_interface::device_tiki100bus_card_interface(const machine_config &mconfig, device_t &device) :
    device_slot_card_interface(mconfig, device), m_bus(nullptr),
    m_busak(CLEAR_LINE), m_next(nullptr)
{
    m_slot = dynamic_cast<tiki100_bus_slot_t *>(device.owner());
}
开发者ID:goofwear,项目名称:mame,代码行数:6,代码来源:exp.cpp

示例7:

device_newbrain_expansion_slot_interface::device_newbrain_expansion_slot_interface(const machine_config &mconfig, device_t &device) :
	device_slot_card_interface(mconfig,device)
{
	m_slot = dynamic_cast<newbrain_expansion_slot_t *>(device.owner());
}
开发者ID:broftkd,项目名称:mame,代码行数:5,代码来源:exp.cpp

示例8: rom_region_name

std::string rom_region_name(const device_t &device, const rom_entry *romp)
{
	return device.subtag(ROM_GETNAME(romp));
}
开发者ID:WinCoder,项目名称:mame,代码行数:4,代码来源:romload.cpp

示例9: rom_parameter_name

std::string rom_parameter_name(const device_t &device, const rom_entry *romp)
{
	return device.subtag(romp->_name);
}
开发者ID:WinCoder,项目名称:mame,代码行数:4,代码来源:romload.cpp

示例10:

device_centronics_peripheral_interface::device_centronics_peripheral_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<centronics_device *>(device.owner());
}
开发者ID:Ashura-X,项目名称:mame,代码行数:5,代码来源:ctronics.cpp

示例11: load_software_part_region

void rom_load_manager::load_software_part_region(device_t &device, software_list_device &swlist, const char *swname, const rom_entry *start_region)
{
	std::string locationtag(swlist.list_name()), breakstr("%");
	const rom_entry *region;
	std::string regiontag;

	m_errorstring.clear();
	m_softwarningstring.clear();

	m_romstotal = 0;
	m_romstotalsize = 0;
	m_romsloadedsize = 0;

	software_info *swinfo = swlist.find(swname);
	if (swinfo != nullptr)
	{
		UINT32 supported = swinfo->supported();
		if (supported == SOFTWARE_SUPPORTED_PARTIAL)
		{
			m_errorstring.append(string_format("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name()));
			m_softwarningstring.append(string_format("Support for software %s (in list %s) is only partial\n", swname, swlist.list_name()));
		}
		if (supported == SOFTWARE_SUPPORTED_NO)
		{
			m_errorstring.append(string_format("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()));
			m_softwarningstring.append(string_format("Support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()));
		}

		// attempt reading up the chain through the parents and create a locationtag std::string in the format
		// " swlist % clonename % parentname "
		// open_rom_file contains the code to split the elements and to create paths to load from

		locationtag.append(breakstr);

		while (swinfo != nullptr)
		{
			locationtag.append(swinfo->shortname()).append(breakstr);
			const char *parentname = swinfo->parentname();
			swinfo = (parentname != nullptr) ? swlist.find(parentname) : nullptr;
		}
		// strip the final '%'
		locationtag.erase(locationtag.length() - 1, 1);
	}


	/* loop until we hit the end */
	for (region = start_region; region != nullptr; region = rom_next_region(region))
	{
		UINT32 regionlength = ROMREGION_GETLENGTH(region);

		regiontag = device.subtag(ROMREGION_GETTAG(region));
		LOG(("Processing region \"%s\" (length=%X)\n", regiontag.c_str(), regionlength));

		/* the first entry must be a region */
		assert(ROMENTRY_ISREGION(region));

		/* if this is a device region, override with the device width and endianness */
		endianness_t endianness = ROMREGION_ISBIGENDIAN(region) ? ENDIANNESS_BIG : ENDIANNESS_LITTLE;
		UINT8 width = ROMREGION_GETWIDTH(region) / 8;
		memory_region *memregion = machine().root_device().memregion(regiontag.c_str());
		if (memregion != nullptr)
		{
			if (machine().device(regiontag.c_str()) != nullptr)
				normalize_flags_for_device(machine(), regiontag.c_str(), width, endianness);

			/* clear old region (todo: should be moved to an image unload function) */
			machine().memory().region_free(memregion->name());
		}

		/* remember the base and length */
		m_region = machine().memory().region_alloc(regiontag.c_str(), regionlength, width, endianness);
		LOG(("Allocated %X bytes @ %p\n", m_region->bytes(), m_region->base()));

		/* clear the region if it's requested */
		if (ROMREGION_ISERASE(region))
			memset(m_region->base(), ROMREGION_GETERASEVAL(region), m_region->bytes());

		/* or if it's sufficiently small (<= 4MB) */
		else if (m_region->bytes() <= 0x400000)
			memset(m_region->base(), 0, m_region->bytes());

#ifdef MAME_DEBUG
		/* if we're debugging, fill region with random data to catch errors */
		else
			fill_random(m_region->base(), m_region->bytes());
#endif

		/* update total number of roms */
		for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
		{
			m_romstotal++;
			m_romstotalsize += rom_file_size(rom);
		}

		/* now process the entries in the region */
		if (ROMREGION_ISROMDATA(region))
			process_rom_entries(locationtag.c_str(), region, region + 1, &device, TRUE);
		else if (ROMREGION_ISDISKDATA(region))
			process_disk_entries(regiontag.c_str(), region, region + 1, locationtag.c_str());
	}
//.........这里部分代码省略.........
开发者ID:WinCoder,项目名称:mame,代码行数:101,代码来源:romload.cpp

示例12:

device_compis_graphics_card_interface::device_compis_graphics_card_interface(const machine_config &mconfig, device_t &device) :
	device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<compis_graphics_slot_t *>(device.owner());
}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:5,代码来源:graphics.cpp

示例13: get_initial

pstring param_t::get_initial(const device_t &dev, bool *found)
{
	pstring res = dev.setup().get_initial_param_val(this->name(), "");
	*found = (res != "");
	return res;
}
开发者ID:rfka01,项目名称:mame,代码行数:6,代码来源:nl_base.cpp

示例14:

scsi_port_interface::scsi_port_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig, device)
{
	m_slot = dynamic_cast<SCSI_PORT_SLOT_device *>(device.owner());
}
开发者ID:kara1001000,项目名称:mame,代码行数:5,代码来源:scsi.cpp

示例15:

device_ql_expansion_card_interface::device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device) :
	device_slot_card_interface(mconfig, device),
	m_romoeh(0)
{
	m_slot = dynamic_cast<ql_expansion_slot_device *>(device.owner());
}
开发者ID:Tauwasser,项目名称:mame,代码行数:6,代码来源:exp.cpp


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