From 0509fe803954475acd45a697d7d0e5dbab392243 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 28 Feb 2024 01:50:54 +0100 Subject: [PATCH] pc/pcipc_sis: replace svga_et4k default map with wd90c31_lr --- src/devices/bus/isa/svga_paradise.cpp | 25 +++++++++++++++++++++++++ src/devices/bus/isa/svga_paradise.h | 4 ++++ src/mame/pc/pcipc_sis.cpp | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/devices/bus/isa/svga_paradise.cpp b/src/devices/bus/isa/svga_paradise.cpp index 7a318ca124af2..955096ea3aa5c 100644 --- a/src/devices/bus/isa/svga_paradise.cpp +++ b/src/devices/bus/isa/svga_paradise.cpp @@ -106,6 +106,17 @@ void isa16_pvga1a_device::device_start() m_isa->install_device(0x03b0, 0x03df, *this, &isa16_pvga1a_device::io_isa_map); } +void isa16_pvga1a_device::remap(int space_id, offs_t start, offs_t end) +{ + if (space_id == AS_PROGRAM) + { + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(pvga1a_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(pvga1a_vga_device::mem_w))); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga_rom"); + } + else if (space_id == AS_IO) + m_isa->install_device(0x03b0, 0x03df, *this, &isa16_pvga1a_device::io_isa_map); +} + /****************** * * PVGA1A-JK @@ -460,6 +471,20 @@ void isa16_wd90c31_lr_device::device_start() m_isa->install_device(0x23c0, 0x23c7, *m_vga, &wd90c31_vga_device::ext_io_map); } +void isa16_wd90c31_lr_device::remap(int space_id, offs_t start, offs_t end) +{ + if (space_id == AS_PROGRAM) + { + m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga_rom"); + + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(wd90c31_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(wd90c31_vga_device::mem_w))); + } + else if (space_id == AS_IO) + { + m_isa->install_device(0x03b0, 0x03df, *this, &isa16_wd90c31_lr_device::io_isa_map); + m_isa->install_device(0x23c0, 0x23c7, *m_vga, &wd90c31_vga_device::ext_io_map); + } +} /****************** * diff --git a/src/devices/bus/isa/svga_paradise.h b/src/devices/bus/isa/svga_paradise.h index 35ab345b5d9f8..8b9eeea63679e 100644 --- a/src/devices/bus/isa/svga_paradise.h +++ b/src/devices/bus/isa/svga_paradise.h @@ -21,6 +21,8 @@ class isa16_pvga1a_device : // construction/destruction isa16_pvga1a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + virtual void remap(int space_id, offs_t start, offs_t end) override; + protected: // device-level overrides virtual void device_start() override; @@ -153,6 +155,8 @@ class isa16_wd90c31_lr_device : // construction/destruction isa16_wd90c31_lr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + virtual void remap(int space_id, offs_t start, offs_t end) override; + protected: // device-level overrides virtual void device_start() override; diff --git a/src/mame/pc/pcipc_sis.cpp b/src/mame/pc/pcipc_sis.cpp index 8d8eb902bb5a8..b5574a5ed7afe 100644 --- a/src/mame/pc/pcipc_sis.cpp +++ b/src/mame/pc/pcipc_sis.cpp @@ -77,7 +77,7 @@ void sis496_state::sis496(machine_config &config) PCI_ROOT(config, "pci", 0); SIS85C496_HOST(config, "pci:05.0", 0, "maincpu", 32*1024*1024); - ISA16_SLOT(config, "isa1", 0, "pci:05.0:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa1", 0, "pci:05.0:isabus", pc_isa16_cards, "wd90c31_lr", 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);