コード例 #1
0
ファイル: nforcepc.cpp プロジェクト: fesh0r/mame-full
void it8703f_device::write_logical_configuration_register(int index, int data)
{
	configuration_registers[logical_device][index] = data;
	switch (logical_device)
	{
	case LogicalDevice::Keyboard:
		if (index == 0x30)
		{
			if (data & 1)
			{
				if (enabled_logical[LogicalDevice::Keyboard] == false)
					map_keyboard_addresses();
				enabled_logical[LogicalDevice::Keyboard] = true;
				logerror("Enabled Keyboard\n");
			}
			else
			{
				if (enabled_logical[LogicalDevice::Keyboard] == true)
					unmap_keyboard_addresses();
				enabled_logical[LogicalDevice::Keyboard] = false;
			}
		}
		break;
	}
}
コード例 #2
0
ファイル: fdc37c93x.cpp プロジェクト: SailorSat/cabmame
void fdc37c93x_device::write_keyboard_configuration_register(int index, int data)
{
	if (index == 0x30)
	{
		if (data & 1)
		{
			if (enabled_logical[LogicalDevice::Keyboard] == false)
				map_keyboard_addresses();
			enabled_logical[LogicalDevice::Keyboard] = true;
			logerror("Enabled Keyboard\n");
		}
		else
		{
			if (enabled_logical[LogicalDevice::Keyboard] == true)
				unmap_keyboard_addresses();
			enabled_logical[LogicalDevice::Keyboard] = false;
		}
	}
}