summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <github@mizapf.de>2020-04-10 16:28:16 +0200
committer Michael Zapf <github@mizapf.de>2020-04-10 16:29:14 +0200
commit03df5583d5c22658340dd21362ed18a9a02435e5 (patch)
tree2a0905285865d39a3600bdcb73e59f835a338aaa
parentc88445676736d2bd9238036197cd82cd9f957356 (diff)
rtc65271: Use existing interrupt flag for intrq_r. (nw)
-rw-r--r--src/devices/machine/rtc65271.cpp6
-rw-r--r--src/devices/machine/rtc65271.h2
2 files changed, 1 insertions, 7 deletions
diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp
index 0f53c1fe875..1eb84d89171 100644
--- a/src/devices/machine/rtc65271.cpp
+++ b/src/devices/machine/rtc65271.cpp
@@ -450,14 +450,12 @@ void rtc65271_device::field_interrupts()
{
if (m_regs[reg_C] & m_regs[reg_B] & (reg_C_PF | reg_C_AF | reg_C_UF))
{
- m_int_pending = true;
m_regs[reg_C] |= reg_C_IRQF;
if (!m_interrupt_cb.isnull())
m_interrupt_cb(1);
}
else
{
- m_int_pending = false;
m_regs[reg_C] &= ~reg_C_IRQF;
if (!m_interrupt_cb.isnull())
m_interrupt_cb(0);
@@ -466,7 +464,7 @@ void rtc65271_device::field_interrupts()
READ_LINE_MEMBER(rtc65271_device::intrq_r)
{
- return (m_int_pending)? ASSERT_LINE : CLEAR_LINE;
+ return (m_regs[reg_C] & reg_C_IRQF)? ASSERT_LINE : CLEAR_LINE;
}
/*
@@ -662,7 +660,6 @@ rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, RTC65271, tag, owner, clock)
, device_nvram_interface(mconfig, *this)
, m_interrupt_cb(*this)
- , m_int_pending(false)
{
}
@@ -681,5 +678,4 @@ void rtc65271_device::device_start()
save_item(NAME(m_xram));
save_item(NAME(m_cur_xram_page));
save_item(NAME(m_SQW_internal_state));
- save_item(NAME(m_int_pending));
}
diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h
index cb2c5b4bcb2..151344d6e7c 100644
--- a/src/devices/machine/rtc65271.h
+++ b/src/devices/machine/rtc65271.h
@@ -63,8 +63,6 @@ private:
/* callback called when interrupt pin state changes (may be nullptr) */
devcb_write_line m_interrupt_cb;
-
- bool m_int_pending;
};
// device type definition