diff options
author | Ted Green <tedgreen99@protonmail.com> | 2017-06-11 06:52:05 -0600 |
---|---|---|
committer | Ted Green <tedgreen99@protonmail.com> | 2017-06-11 06:52:37 -0600 |
commit | 72a5561b899d4153b712ac79dc6e99d46e0310b8 (patch) | |
tree | c2f29a4222ce970890d8407611ed4921c2663f87 /src/devices/machine/pci-ide.cpp | |
parent | 5cd3f3621c8a7ee81810805ba90bee25f5b3abbb (diff) |
pci-ide: Added writing to subsystem id register. Fixes power-on PCI Data Test in nbagold. (nw)
Diffstat (limited to 'src/devices/machine/pci-ide.cpp')
-rw-r--r-- | src/devices/machine/pci-ide.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/devices/machine/pci-ide.cpp b/src/devices/machine/pci-ide.cpp index b88049a7258..216f67ac5fa 100644 --- a/src/devices/machine/pci-ide.cpp +++ b/src/devices/machine/pci-ide.cpp @@ -19,6 +19,7 @@ ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, d DEVICE_ADDRESS_MAP_START(config_map, 32, ide_pci_device) AM_RANGE(0x08, 0x0b) AM_WRITE8(prog_if_w, 0x0000ff00) AM_RANGE(0x10, 0x1f) AM_READWRITE(address_base_r, address_base_w) + AM_RANGE(0x2c, 0x2f) AM_WRITE(subsystem_id_w); AM_RANGE(0x40, 0x5f) AM_READWRITE(pcictrl_r, pcictrl_w) AM_RANGE(0x70, 0x77) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, bmdma_r, bmdma_w) // PCI646 AM_RANGE(0x78, 0x7f) AM_DEVREADWRITE("ide2", bus_master_ide_controller_device, bmdma_r, bmdma_w) // PCI646 @@ -242,3 +243,10 @@ WRITE32_MEMBER(ide_pci_device::address_base_w) } logerror("Mapping bar[%i] = %08x\n", offset, data); } + +WRITE32_MEMBER(ide_pci_device::subsystem_id_w) +{ + // Config register 0x4f enables subsystem id writing for CMD646 + if (m_config_data[0xc / 4] & 0x01000000) + subsystem_id = (data << 16) | (data >> 16); +} |