summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2025-08-16 12:54:31 +0200
committer angelosa <lordkale4@gmail.com>2025-08-16 14:01:38 +0200
commitbaa1c1528cced2b417e52bcbc6a5f25cf7c81541 (patch)
tree9227d4486aae89b67190f2f6faf362d4ddb31eb6
parent6ff310bddda0bc0258576a31d28361318f0ec51c (diff)
video/pc_vga_paradise: hookup DDR callback for PR11 writes
* fix teradrive and megapc going in MDA video mode
-rw-r--r--src/devices/bus/isa/svga_paradise.cpp1
-rw-r--r--src/devices/video/pc_vga_paradise.cpp5
-rw-r--r--src/devices/video/pc_vga_paradise.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/bus/isa/svga_paradise.cpp b/src/devices/bus/isa/svga_paradise.cpp
index 21baa921364..7d601fda7fb 100644
--- a/src/devices/bus/isa/svga_paradise.cpp
+++ b/src/devices/bus/isa/svga_paradise.cpp
@@ -384,6 +384,7 @@ void isa16_wd90c11_lr_device::device_add_mconfig(machine_config &config)
m_vga->set_vram_size(0x100000);
// required by megapc and teradrive for color
m_vga->read_cnf15_callback().set_constant(1);
+ m_vga->cnf_write_ddr_callback().set_constant(0x7f);
}
void isa16_wd90c11_lr_device::io_isa_map(address_map &map)
diff --git a/src/devices/video/pc_vga_paradise.cpp b/src/devices/video/pc_vga_paradise.cpp
index b9027b6578b..237741c9401 100644
--- a/src/devices/video/pc_vga_paradise.cpp
+++ b/src/devices/video/pc_vga_paradise.cpp
@@ -305,6 +305,7 @@ wd90c00_vga_device::wd90c00_vga_device(const machine_config &mconfig, device_typ
, m_cnf14_read_cb(*this, 1)
, m_cnf13_read_cb(*this, 1)
, m_cnf12_read_cb(*this, 1)
+ , m_cnf_write_ddr_cb(*this, 0xff)
{
m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(wd90c00_vga_device::crtc_map), this));
}
@@ -464,7 +465,9 @@ u8 wd90c00_vga_device::egasw_r(offs_t offset)
void wd90c00_vga_device::egasw_w(offs_t offset, u8 data)
{
LOG("PR11 EGA Switch W %02x\n", data);
- m_pr11 = data & 0xff;
+ // NOTE: teradrive and megapc will flush the entire CRTC range after setup mode
+ // expecting bit 7 still high on reads afterwards (pullup)
+ m_pr11 = (data & m_cnf_write_ddr_cb()) | (m_pr11 & ~m_cnf_write_ddr_cb());
}
/*
diff --git a/src/devices/video/pc_vga_paradise.h b/src/devices/video/pc_vga_paradise.h
index c71c2a3b67c..080be8d0775 100644
--- a/src/devices/video/pc_vga_paradise.h
+++ b/src/devices/video/pc_vga_paradise.h
@@ -60,6 +60,7 @@ public:
auto read_cnf14_callback() { return m_cnf14_read_cb.bind(); }
auto read_cnf13_callback() { return m_cnf13_read_cb.bind(); }
auto read_cnf12_callback() { return m_cnf12_read_cb.bind(); }
+ auto cnf_write_ddr_callback() { return m_cnf_write_ddr_cb.bind(); }
// NOTE: these are internal shadows, for the input sense.
ioport_value egasw4_r();
@@ -106,6 +107,7 @@ private:
devcb_read_line m_cnf14_read_cb;
devcb_read_line m_cnf13_read_cb;
devcb_read_line m_cnf12_read_cb;
+ devcb_read8 m_cnf_write_ddr_cb;
};
class wd90c11a_vga_device : public wd90c00_vga_device