diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2022-05-04 15:25:31 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2022-05-04 15:26:35 -0400 |
commit | b76ff4cf64cd66ac362d0f8b3b9a089a6beb9b77 (patch) | |
tree | 8a4afc74c71f73d1e613fd7320a224d171142e19 /src/devices/machine | |
parent | 8ffa5ef1d9266033435052417c8b7bfd8cd3bbe3 (diff) |
i8214: Back out previous changes to device emulation in e38360692285e7fa0e0574b8b00585536b696949 except as a system-specific hack
Diffstat (limited to 'src/devices/machine')
-rw-r--r-- | src/devices/machine/i8214.cpp | 16 | ||||
-rw-r--r-- | src/devices/machine/i8214.h | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp index 9cf6f33f7f0..b5a8c4140be 100644 --- a/src/devices/machine/i8214.cpp +++ b/src/devices/machine/i8214.cpp @@ -8,10 +8,8 @@ #include "emu.h" #include "i8214.h" -#include <iostream> //#define VERBOSE 1 -//#define LOG_OUTPUT_STREAM std::cout #include "logmacro.h" @@ -42,8 +40,8 @@ void i8214_device::trigger_interrupt(int level) // set interrupt line m_write_int(ASSERT_LINE); - - //m_write_int(CLEAR_LINE); + if (!m_int_dis_hack) + m_write_int(CLEAR_LINE); // TODO: wait one clock cycle to clear } @@ -56,7 +54,7 @@ void i8214_device::check_interrupt() if (m_int_dis) { LOG("not checking interrupts because m_int_dis (%02x)\n", m_r); - if (m_r == 0xff) + if (m_int_dis_hack && m_r == 0xff) { m_int_dis = 0; m_write_int(CLEAR_LINE); @@ -98,8 +96,11 @@ void i8214_device::check_interrupt() } } - m_int_dis = 0; - m_write_int(CLEAR_LINE); + if (m_int_dis_hack) + { + m_int_dis = 0; + m_write_int(CLEAR_LINE); + } } @@ -116,6 +117,7 @@ i8214_device::i8214_device(const machine_config &mconfig, const char *tag, devic : device_t(mconfig, I8214, tag, owner, clock) , m_write_int(*this) , m_write_enlg(*this) + , m_int_dis_hack(false) , m_inte(0) , m_int_dis(0) , m_a(0) diff --git a/src/devices/machine/i8214.h b/src/devices/machine/i8214.h index 9b567660990..d8514e400ef 100644 --- a/src/devices/machine/i8214.h +++ b/src/devices/machine/i8214.h @@ -32,6 +32,8 @@ public: // construction/destruction i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + void set_int_dis_hack(bool hack) { m_int_dis_hack = hack; } + auto int_wr_callback() { return m_write_int.bind(); } auto enlg_wr_callback() { return m_write_enlg.bind(); } @@ -58,6 +60,8 @@ private: devcb_write_line m_write_int; devcb_write_line m_write_enlg; + bool m_int_dis_hack; + int m_inte; // interrupt enable int m_int_dis; // interrupt (latch) disable flip-flop int m_a; // request level |