pci-ide: Added writing to subsystem id register. Fixes power-on PCI Data Test in nbagold. (nw)

This commit is contained in:
Ted Green 2017-06-11 06:52:05 -06:00
parent 5cd3f3621c
commit 72a5561b89
2 changed files with 9 additions and 0 deletions

View File

@ -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);
}

View File

@ -66,6 +66,7 @@ private:
DECLARE_WRITE32_MEMBER(pcictrl_w);
DECLARE_READ32_MEMBER(address_base_r);
DECLARE_WRITE32_MEMBER(address_base_w);
DECLARE_WRITE32_MEMBER(subsystem_id_w);
const char *m_cpu_tag;
cpu_device *m_cpu;