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


C++ emu_file::read方法代码示例

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


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

示例1: sizeof

void ds1204_device::nvram_read( emu_file &file )
{
	file.read( m_unique_pattern, sizeof( m_unique_pattern ) );
	file.read( m_identification, sizeof( m_identification ) );
	file.read( m_security_match, sizeof( m_security_match ) );
	file.read( m_secure_memory, sizeof( m_secure_memory ) );
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:7,代码来源:ds1204.c

示例2: nvram_read

void intelfsh_device::nvram_read(emu_file &file)
{
	dynamic_buffer buffer(m_size);
	file.read(&buffer[0], m_size);
	for (int byte = 0; byte < m_size; byte++)
		m_addrspace[0]->write_byte(byte, buffer[byte]);
}
开发者ID:curtiszimmerman,项目名称:mame,代码行数:7,代码来源:intelfsh.c

示例3: nvram_read

void nvram_device::nvram_read(emu_file &file)
{
	// make sure we have a valid base pointer
	determine_final_base();

	file.read(m_base, m_length);
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:7,代码来源:nvram.c

示例4: sizeof

void er2055_device::nvram_read(emu_file &file)
{
	UINT8 buffer[SIZE_DATA];
	file.read(buffer, sizeof(buffer));
	for (int byte = 0; byte < SIZE_DATA; byte++)
		m_addrspace[0]->write_byte(byte, buffer[byte]);
}
开发者ID:pinchyCZN,项目名称:mameppk,代码行数:7,代码来源:er2055.c

示例5: nvram_read

void eeprom_base_device::nvram_read(emu_file &file)
{
	uint32_t eeprom_length = 1 << m_address_bits;
	uint32_t eeprom_bytes = eeprom_length * m_data_bits / 8;

	file.read(&m_data[0], eeprom_bytes);
}
开发者ID:goofwear,项目名称:mame,代码行数:7,代码来源:eeprom.cpp

示例6: nvram_read

void intelfsh_device::nvram_read(emu_file &file)
{
	UINT8 *buffer = global_alloc_array(UINT8, m_size);
	file.read(buffer, m_size);
	for (int byte = 0; byte < m_size; byte++)
		m_addrspace[0]->write_byte(byte, buffer[byte]);
	global_free(buffer);
}
开发者ID:tweakoz,项目名称:vindigo,代码行数:8,代码来源:intelfsh.c

示例7:

void mc146818_device::nvram_read(emu_file &file)
{
	file.read(m_data, data_size());

	set_base_datetime();
	update_timer();
	update_irq();
}
开发者ID:dezi,项目名称:mame-libretro-odroid,代码行数:8,代码来源:mc146818.c

示例8: sizeof

void x2212_device::nvram_read(emu_file &file)
{
	UINT8 buffer[SIZE_DATA];
	file.read(buffer, sizeof(buffer));
	for (int byte = 0; byte < SIZE_DATA; byte++)
	{
		m_sram->write_byte(byte, 0xff);
		m_e2prom->write_byte(byte, buffer[byte]);
	}
}
开发者ID:bdidier,项目名称:MAME-OS-X,代码行数:10,代码来源:x2212.c

示例9: nvram_read

void horizon_ramdisk_device::nvram_read(emu_file &file)
{
	int size = get_size();
	int readsize = file.read(m_nvram, size);
	// If we increased the size, fill the remaining parts with 0
	if (readsize < size)
	{
		memset(m_nvram + readsize, 0, size-readsize);
	}
}
开发者ID:ursine,项目名称:mame,代码行数:10,代码来源:horizon.cpp

示例10: nvram_read

void serflash_device::nvram_read(emu_file &file)
{
	if (m_length % FLASH_PAGE_SIZE) return; // region size must be multiple of flash page size
	int size = m_length /= FLASH_PAGE_SIZE;


	if (file)
	{
		UINT32 page;
		file.read(&page, 4);
		while (page < size)
		{
			m_flashwritemap[page] = 1;
			file.read(m_region + page * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);
			file.read(&page, 4);
		}
	}

}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:19,代码来源:serflash.c

示例11: alloca

void x2212_device::nvram_read(emu_file &file)
{
	UINT8 *buffer = (UINT8 *) alloca(SIZE_DATA);
	file.read(buffer, SIZE_DATA);
	for (int byte = 0; byte < SIZE_DATA; byte++)
	{
		m_sram->write_byte(byte, 0xff);
		m_e2prom->write_byte(byte, buffer[byte]);
	}
}
开发者ID:Ander-son,项目名称:libretro-mame,代码行数:10,代码来源:x2212.c

示例12: nvram_read

void eeprom_base_device::nvram_read(emu_file &file)
{
	UINT32 eeprom_length = 1 << m_address_bits;
	UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8;

	dynamic_buffer buffer(eeprom_bytes);
	file.read(&buffer[0], eeprom_bytes);
	for (offs_t offs = 0; offs < eeprom_bytes; offs++)
		m_addrspace[0]->write_byte(offs, buffer[offs]);
}
开发者ID:DragonMinded,项目名称:mame,代码行数:10,代码来源:eeprom.cpp

示例13: buffer

void at28c16_device::nvram_read( emu_file &file )
{
	std::vector<uint8_t> buffer( AT28C16_TOTAL_BYTES );

	file.read( &buffer[0], AT28C16_TOTAL_BYTES );

	for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
	{
		space(AS_PROGRAM).write_byte( offs, buffer[ offs ] );
	}
}
开发者ID:Dagarman,项目名称:mame,代码行数:11,代码来源:at28c16.cpp

示例14: buffer

void at28c16_device::nvram_read( emu_file &file )
{
	dynamic_buffer buffer( AT28C16_TOTAL_BYTES );

	file.read( &buffer[0], AT28C16_TOTAL_BYTES );

	for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
	{
		m_addrspace[ 0 ]->write_byte( offs, buffer[ offs ] );
	}
}
开发者ID:curtiszimmerman,项目名称:mame,代码行数:11,代码来源:at28c16.c

示例15: nvram_read

void eeprom_device::nvram_read(emu_file &file)
{
	UINT32 eeprom_length = 1 << m_address_bits;
	UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8;

	UINT8 *buffer = auto_alloc_array(machine(), UINT8, eeprom_bytes);
	file.read(buffer, eeprom_bytes);
	for (offs_t offs = 0; offs < eeprom_bytes; offs++)
		m_addrspace[0]->write_byte(offs, buffer[offs]);
	auto_free(machine(), buffer);
}
开发者ID:broftkd,项目名称:mess-svn,代码行数:11,代码来源:eeprom.c


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