From b4f207606320a81634a033e2637c842dfe510005 Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 20 Feb 2024 20:56:53 +0100 Subject: video/voodoo_pci: fix Voodoo 1 PCI default values, allows sis85c496 to detect card --- src/devices/video/voodoo_pci.cpp | 19 ++++++++++++++----- src/mame/pc/pcipc_sis.cpp | 8 +++++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp index 856b5fcc589..864be7c6b1b 100644 --- a/src/devices/video/voodoo_pci.cpp +++ b/src/devices/video/voodoo_pci.cpp @@ -99,23 +99,30 @@ void voodoo_pci_device::device_start() machine().save().register_postload(save_prepost_delegate(FUNC(voodoo_pci_device::postload), this)); } -//void set_ids(u32 main_id, u8 revision, u32 pclass, u32 subsystem_id); void voodoo_1_pci_device::device_start() { - set_ids(0x121a0001, 0x02, 0x030000, 0x000000); + // NOTE: class code = 0 (backward compatible non-VGA device) + set_ids(0x121a0001, 0x02, 0x000000, 0x000000); voodoo_pci_device::device_start(); add_map(16 * 1024 * 1024, M_MEM | M_PREF, *m_voodoo, FUNC(voodoo_1_device::core_map)); bank_infos[0].adr = 0xff000000; - // TODO: verify int settings across the arch (should be same, following is from Voodoo 3) - //intr_line = 5; + + command = 0; + command_mask = 2; + status = 0; + + // no max_gnt / max_lat (hardwired to 0, cannot bus master) + + intr_line = 5; // INTA# - //intr_pin = 1; + intr_pin = 1; } void voodoo_2_pci_device::device_start() { + // FIXME: proper PCI values (check manual) set_ids(0x121a0002, 0x02, 0x038000, 0x000000); voodoo_pci_device::device_start(); @@ -126,6 +133,7 @@ void voodoo_2_pci_device::device_start() void voodoo_banshee_pci_device::device_start() { + // FIXME: proper PCI values (check manual) set_ids(0x121a0003, 0x02, 0x030000, 0x000000); voodoo_pci_device::device_start(); @@ -140,6 +148,7 @@ void voodoo_banshee_pci_device::device_start() void voodoo_3_pci_device::device_start() { + // FIXME: proper PCI values (check manual) set_ids(0x121a0005, 0x02, 0x030000, 0x000000); voodoo_pci_device::device_start(); diff --git a/src/mame/pc/pcipc_sis.cpp b/src/mame/pc/pcipc_sis.cpp index 1f59f41ca4e..8d8eb902bb5 100644 --- a/src/mame/pc/pcipc_sis.cpp +++ b/src/mame/pc/pcipc_sis.cpp @@ -38,7 +38,7 @@ private: void main_map(address_map &map); }; -#define PCI_ID_VIDEO "pci:08.0" +#define PCI_ID_VIDEO "pci:09.0" class sis496_voodoo1_state : public sis496_state { @@ -46,7 +46,7 @@ public: sis496_voodoo1_state(const machine_config &mconfig, device_type type, const char *tag) : sis496_state(mconfig, type, tag) , m_voodoo(*this, PCI_ID_VIDEO) - , m_screen(*this, "screen") + , m_screen(*this, "voodoo_screen") { } void sis496_voodoo1(machine_config &config); @@ -80,6 +80,8 @@ void sis496_state::sis496(machine_config &config) ISA16_SLOT(config, "isa1", 0, "pci:05.0:isabus", pc_isa16_cards, "svga_et4k", false); ISA16_SLOT(config, "isa2", 0, "pci:05.0:isabus", pc_isa16_cards, nullptr, false); ISA16_SLOT(config, "isa3", 0, "pci:05.0:isabus", pc_isa16_cards, nullptr, false); + + // TODO: 9-10-11-12 for PCI_SLOT (according to BIOS) } void sis496_voodoo1_state::sis496_voodoo1(machine_config &config) @@ -91,8 +93,8 @@ void sis496_voodoo1_state::sis496_voodoo1(machine_config &config) m_voodoo->set_tmumem(4, 0); m_voodoo->set_status_cycles(1000); + // TODO: wrong, needs VGA passthru SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - // Screeen size and timing is re-calculated later in voodoo card m_screen->set_refresh_hz(57); m_screen->set_size(640, 480); m_screen->set_visarea(0, 640 - 1, 0, 480 - 1); -- cgit v1.2.3