From b62907a03ce6e8f8e7bb26c742e7a63b5613562a Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Thu, 7 Jun 2018 19:46:17 +0700 Subject: mc146818: don't restart timer unnecessarily (nw) --- src/devices/machine/mc146818.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp index 8780643c2e3..254fa8a23b2 100644 --- a/src/devices/machine/mc146818.cpp +++ b/src/devices/machine/mc146818.cpp @@ -582,8 +582,11 @@ WRITE8_MEMBER( mc146818_device::write ) case REG_A: // top bit of A is read only - m_data[REG_A] = data & ~REG_A_UIP; - update_timer(); + if ((data ^ m_data[REG_A]) & ~REG_A_UIP) + { + m_data[REG_A] = data & ~REG_A_UIP; + update_timer(); + } break; case REG_B: -- cgit v1.2.3