summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2019-07-08 19:55:36 -0400
committer GitHub <noreply@github.com>2019-07-08 19:55:36 -0400
commit3c0391dc9756678fd6f302ee5de9ad891e79d5c9 (patch)
treec6cb6330b39787796383966e0ef39bfac20f8dd8
parentb11932bfb5ece477a3a9786c684fd4726c319293 (diff)
parent6f80a1a9311134882501cb92e8870a74091a3ab3 (diff)
Merge pull request #5320 from npwoods/fix_mc6847_artifacting
Fixing MC6847 to be responsive to live changes of artifacting config
-rw-r--r--src/devices/video/mc6847.cpp19
-rw-r--r--src/devices/video/mc6847.h2
2 files changed, 17 insertions, 4 deletions
diff --git a/src/devices/video/mc6847.cpp b/src/devices/video/mc6847.cpp
index bb0079a2271..bc4c8d393ea 100644
--- a/src/devices/video/mc6847.cpp
+++ b/src/devices/video/mc6847.cpp
@@ -854,7 +854,7 @@ uint32_t mc6847_base_device::screen_update(screen_device &screen, bitmap_rgb32 &
const pixel_t *palette = m_palette;
/* if the video didn't change, indicate as much */
- if (!has_video_changed())
+ if (!m_artifacter.poll_config() && !has_video_changed())
return UPDATE_HAS_NOT_CHANGED;
/* top border */
@@ -1701,14 +1701,27 @@ mc6847_base_device::artifacter::artifacter()
void mc6847_base_device::artifacter::setup_config(device_t *device)
{
- char port_name[32];
- snprintf(port_name, ARRAY_LENGTH(port_name), "%s:%s", device->tag(), ARTIFACTING_TAG);
+ std::string port_name = util::string_format("%s:%s", device->tag(), ARTIFACTING_TAG);
m_config = device->ioport(port_name);
}
//-------------------------------------------------
+// artifacter::poll_config
+//-------------------------------------------------
+
+bool mc6847_base_device::artifacter::poll_config()
+{
+ ioport_value new_artifacting = m_config ? m_config->read() : 0;
+ bool changed = new_artifacting != m_artifacting;
+ m_artifacting = new_artifacting;
+ return changed;
+}
+
+
+
+//-------------------------------------------------
// artifacter::update_colors
//-------------------------------------------------
diff --git a/src/devices/video/mc6847.h b/src/devices/video/mc6847.h
index c2923d50016..8402db86c2e 100644
--- a/src/devices/video/mc6847.h
+++ b/src/devices/video/mc6847.h
@@ -178,7 +178,7 @@ protected:
// artifacting config
void setup_config(device_t *device);
- void poll_config() { m_artifacting = (m_config!=nullptr) ? m_config->read() : 0; }
+ bool poll_config();
void set_pal_artifacting( bool palartifacting ) { m_palartifacting = palartifacting; }
bool get_pal_artifacting() { return m_palartifacting; }
void create_color_blend_table( const pixel_t *palette );