summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2026-05-10 21:55:13 +0200
committer angelosa <lordkale4@gmail.com>2026-05-10 22:32:26 +0200
commit6c6d9ce007d33d83391d782e4e7d1e5215f5c5dc (patch)
treeeab50c12c970ee9641941445b8620555917bd194 /src
parentcbabab0b2fb36a8f572e2c9a2d8f36e76f335e98 (diff)
bus/isa/svga_trident: convert to ISA remap
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/isa/svga_trident.cpp84
-rw-r--r--src/devices/bus/isa/svga_trident.h4
2 files changed, 58 insertions, 30 deletions
diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp
index 1854f9b76be..afc29c0d551 100644
--- a/src/devices/bus/isa/svga_trident.cpp
+++ b/src/devices/bus/isa/svga_trident.cpp
@@ -18,7 +18,7 @@
#include "screen.h"
ROM_START( tvga9000 )
- ROM_REGION( 0x8000, "tvga9000", 0 )
+ ROM_REGION( 0x8000, "bios", 0 )
ROM_SYSTEM_BIOS(0, "v350", "Version D3.50 12/02/92")
ROMX_LOAD( "trident_quadtel_tvga9000_isa16.bin", 0x0000, 0x8000, CRC(ad0e7351) SHA1(eb525460a80e1c1baa34642b93d54caf2607920d), ROM_BIOS(0) )
ROM_IGNORE ( 0x8000 )
@@ -52,33 +52,45 @@ isa16_svga_tvga9000_device::isa16_svga_tvga9000_device(const machine_config &mco
{
}
-void isa16_svga_tvga9000_device::io_isa_map(address_map &map)
-{
- map(0x00, 0x2f).m(m_vga, FUNC(tvga9000_device::io_map));
-}
-
uint8_t isa16_svga_tvga9000_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); }
void isa16_svga_tvga9000_device::device_start()
{
set_isa_device();
+}
- m_isa->install_rom(this, 0xc0000, 0xc7fff, "tvga9000");
-
- m_isa->install_device(0x03b0, 0x03df, *this, &isa16_svga_tvga9000_device::io_isa_map);
+void isa16_svga_tvga9000_device::device_reset()
+{
+ remap(AS_PROGRAM, 0, 0xfffff);
+ remap(AS_IO, 0, 0xffff);
+}
- m_isa->install_device(0x43c4, 0x43cb, read8sm_delegate(*m_vga, FUNC(tvga9000_device::port_43c6_r)), write8sm_delegate(*m_vga, FUNC(tvga9000_device::port_43c6_w)));
- m_isa->install_device(0x83c4, 0x83cb, read8sm_delegate(*m_vga, FUNC(tvga9000_device::port_83c6_r)), write8sm_delegate(*m_vga, FUNC(tvga9000_device::port_83c6_w)));
+void isa16_svga_tvga9000_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(tvga9000_device::mem_r)), write8sm_delegate(*m_vga, FUNC(tvga9000_device::mem_w)));
+ m_isa->install_rom(this, 0xc0000, 0xc7fff, "bios");
+ }
+ else if (space_id == AS_IO)
+ m_isa->install_device(0x0000, 0xffff, *this, &isa16_svga_tvga9000_device::io_isa_map);
+}
- m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(tvga9000_device::mem_r)), write8sm_delegate(*m_vga, FUNC(tvga9000_device::mem_w)));
+void isa16_svga_tvga9000_device::io_isa_map(address_map &map)
+{
+ map(0x03b0, 0x03df).m(m_vga, FUNC(tvga9000_device::io_map));
+ map(0x43c4, 0x43cb).rw(m_vga, FUNC(tvga9000_device::port_43c6_r), FUNC(tvga9000_device::port_43c6_w));
+ map(0x83c4, 0x83cb).rw(m_vga, FUNC(tvga9000_device::port_83c6_r), FUNC(tvga9000_device::port_83c6_w));
}
+
+
/*
* TGUI9680
*/
ROM_START( tgui9680 )
- ROM_REGION( 0x8000, "tgui9680", 0 )
+ ROM_REGION( 0x8000, "bios", 0 )
ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) )
ROM_CONTINUE( 0x0001, 0x4000 )
ROM_END
@@ -126,11 +138,6 @@ isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mco
{
}
-void isa16_svga_tgui9680_device::io_isa_map(address_map &map)
-{
- map(0x00, 0x2f).m(m_vga, FUNC(trident_vga_device::io_map));
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -139,22 +146,39 @@ uint8_t isa16_svga_tgui9680_device::input_port_0_r() { return 0xff; } //return m
void isa16_svga_tgui9680_device::device_start()
{
set_isa_device();
+}
- m_isa->install_rom(this, 0xc0000, 0xc7fff, "tgui9680");
-
- m_isa->install_device(0x03b0, 0x03df, *this, &isa16_svga_tgui9680_device::io_isa_map);
-
- m_isa->install_device(0x43c4, 0x43cb, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_w)));
- m_isa->install_device(0x83c4, 0x83cb, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_w)));
+void isa16_svga_tgui9680_device::device_reset()
+{
+ remap(AS_PROGRAM, 0, 0xfffff);
+ remap(AS_IO, 0, 0xffff);
+}
- m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::mem_w)));
+void isa16_svga_tgui9680_device::remap(int space_id, offs_t start, offs_t end)
+{
+ if (space_id == AS_PROGRAM)
+ {
+ // TODO: stuff that really maps thru PCI BAR ...
+ // uncomment to test Windows 3.1 TGUI9440AGi driver
+ // m_isa->install_memory(0x4400000, 0x45fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_w)));
+
+ // win95 drivers
+ // m_isa->install_memory(0x4000000, 0x41fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_w)));
+
+ m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(tgui9680_device::mem_r)), write8sm_delegate(*m_vga, FUNC(tgui9680_device::mem_w)));
+ m_isa->install_rom(this, 0xc0000, 0xc7fff, "bios");
+ }
+ else if (space_id == AS_IO)
+ m_isa->install_device(0x0000, 0xffff, *this, &isa16_svga_tgui9680_device::io_isa_map);
+}
- // uncomment to test Windows 3.1 TGUI9440AGi driver
-// m_isa->install_memory(0x4400000, 0x45fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_w)));
+void isa16_svga_tgui9680_device::io_isa_map(address_map &map)
+{
+ map(0x03b0, 0x03df).m(m_vga, FUNC(tgui9680_device::io_map));
- // win95 drivers
-// m_isa->install_memory(0x4000000, 0x41fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_w)));
+ map(0x43c4, 0x43cb).rw(m_vga, FUNC(tgui9680_device::port_43c6_r), FUNC(tgui9680_device::port_43c6_w));
+ map(0x83c4, 0x83cb).rw(m_vga, FUNC(tgui9680_device::port_83c6_r), FUNC(tgui9680_device::port_83c6_w));
// acceleration ports
- m_isa->install_device(0x2120, 0x21ff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::accel_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::accel_w)));
+ map(0x2120, 0x21ff).rw(m_vga, FUNC(tgui9680_device::accel_r), FUNC(tgui9680_device::accel_w));
}
diff --git a/src/devices/bus/isa/svga_trident.h b/src/devices/bus/isa/svga_trident.h
index 016809e9791..56029b0f80f 100644
--- a/src/devices/bus/isa/svga_trident.h
+++ b/src/devices/bus/isa/svga_trident.h
@@ -29,12 +29,14 @@ public:
protected:
// device-level overrides
virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
void io_isa_map(address_map &map) ATTR_COLD;
+ virtual void remap(int space_id, offs_t start, offs_t end) override;
private:
required_device<tvga9000_device> m_vga;
@@ -53,12 +55,14 @@ public:
protected:
// device-level overrides
virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
void io_isa_map(address_map &map) ATTR_COLD;
+ virtual void remap(int space_id, offs_t start, offs_t end) override;
private:
required_device<tgui9680_device> m_vga;