diff options
author | yz70s <yz70s@users.noreply.github.com> | 2019-12-06 10:44:39 +0100 |
---|---|---|
committer | yz70s <yz70s@users.noreply.github.com> | 2019-12-06 10:51:54 +0100 |
commit | ce9205dddaae6ec2cd0eae35765a82039beb7595 (patch) | |
tree | e6b63c6f18effa997460fe3c42e5047573658a66 /src | |
parent | 58a2d5859a60e66f1dea2ba66b953753bb277f8f (diff) |
xbox_pci.cpp: found gpio pins mode registers (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/includes/xbox_pci.h | 1 | ||||
-rw-r--r-- | src/mame/machine/xbox_pci.cpp | 14 |
2 files changed, 15 insertions, 0 deletions
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"); } |