From ce9205dddaae6ec2cd0eae35765a82039beb7595 Mon Sep 17 00:00:00 2001 From: yz70s Date: Fri, 6 Dec 2019 10:44:39 +0100 Subject: xbox_pci.cpp: found gpio pins mode registers (nw) --- src/mame/includes/xbox_pci.h | 1 + src/mame/machine/xbox_pci.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/mame/includes/xbox_pci.h b/src/mame/includes/xbox_pci.h index 15820a34776..480c4a2ce9d 100644 --- a/src/mame/includes/xbox_pci.h +++ b/src/mame/includes/xbox_pci.h @@ -147,6 +147,7 @@ private: uint16_t m_gpe0_enable; uint16_t m_global_smi_control; uint8_t m_smi_command_port; + uint8_t m_gpio_mode[26]; lpcbus_device_interface *lpcdevices[16]; uint8_t m_speaker; bool m_refresh; diff --git a/src/mame/machine/xbox_pci.cpp b/src/mame/machine/xbox_pci.cpp index 1af4fa6b711..9c517e529cc 100644 --- a/src/mame/machine/xbox_pci.cpp +++ b/src/mame/machine/xbox_pci.cpp @@ -192,6 +192,7 @@ void mcpx_isalpc_device::device_start() void mcpx_isalpc_device::device_reset() { pci_device::device_reset(); + memset(m_gpio_mode, 0, sizeof(m_gpio_mode)); m_refresh = false; m_pit_out2 = 1; m_spkrdata = 0; @@ -283,6 +284,19 @@ WRITE32_MEMBER(mcpx_isalpc_device::acpi_w) update_smi_line(); logerror("Generate software SMI with value %02X\n", m_smi_command_port); } + else if (((offset >= 0x30) && (offset < 0x36)) || ((offset == 0x36) && ACCESSING_BITS_0_15)) + { + int m = offset != 0x36 ? 4 : 2; + int p = (offset - 0x30) * 4; + + for (int a = 0; a < m; a++) + { + m_gpio_mode[p] = (m_gpio_mode[p] & (~mem_mask & 0xff)) | (data & 0xff); + p++; + data = data >> 8; + mem_mask = mem_mask >> 8; + } + } else logerror("Acpi write not recognized\n"); } -- cgit v1.2.3