summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Joakim Larsson Edstrom <joakimlarsson42@gmail.com>2017-07-11 00:31:18 +0200
committer Joakim Larsson Edstrom <joakimlarsson42@gmail.com>2017-07-11 00:31:18 +0200
commitf27ee36f13f62165b7a23026d8728a2c71e09cf3 (patch)
tree8e1dabf97b1ac76b3dae82f2981442c3e31c45ce
parent63e8b29502bcecc8b5fa1f6ced0ac36b696c7a2f (diff)
mc14411: new methods added for disabling all output timers and set line methods for RSA and RSB inputs
-rw-r--r--src/devices/machine/mc14411.cpp40
-rw-r--r--src/devices/machine/mc14411.h3
2 files changed, 42 insertions, 1 deletions
diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp
index c70041e1c6b..726964370ca 100644
--- a/src/devices/machine/mc14411.cpp
+++ b/src/devices/machine/mc14411.cpp
@@ -58,7 +58,7 @@
***************************************************************************/
const int mc14411_device::s_counter_divider[16] = {
- ////////// X64 /////// X16 /////// X4 //////// X1 ////////
+ ////////// X64 /////// X16 /////// X8 //////// X1 ////////
3, // F1: 614.4 kHz 153.6 kHz 76800 Hz 9600 Hz
4, // F2: 460.8 kHz 115.2 kHz 57600 Hz 7200 Hz
6, // F3: 307.2 kHz 76800 Hz 36400 Hz 4800 Hz
@@ -164,6 +164,11 @@ void mc14411_device::timer_enable(timer_id i, bool enable)
arm_timer(i);
}
+void mc14411_device::timer_disable_all()
+{
+ for (int i = TIMER_F1; i <= TIMER_F16; i++)
+ timer_enable((timer_id) i, false);
+}
//-------------------------------------------------
// arm_timer - arm the timer based on selected
@@ -207,6 +212,7 @@ void mc14411_device::device_reset()
}
}
+
//-------------------------------------------------
// device_timer - handler timer events
//-------------------------------------------------
@@ -253,6 +259,38 @@ WRITE8_MEMBER(mc14411_device::rate_select_w)
//------------------------------------------------
+// rsa_w - set RSA input line
+//------------------------------------------------
+
+WRITE_LINE_MEMBER(mc14411_device::rsa_w)
+{
+ LOGSETUP("%s %02x\n", FUNCNAME, state);
+
+ if ((m_divider & RSA) != (state == ASSERT_LINE ? RSA : 0))
+ {
+ m_divider = (m_divider & ~RSA) | (state == ASSERT_LINE ? RSA : 0);
+ notify_clock_changed();
+ }
+}
+
+
+//------------------------------------------------
+// rsb_w - set RSB input line
+//------------------------------------------------
+
+WRITE_LINE_MEMBER(mc14411_device::rsb_w)
+{
+ LOGSETUP("%s %02x\n", FUNCNAME, state);
+
+ if ((m_divider & RSB) != (state == ASSERT_LINE ? RSB : 0))
+ {
+ m_divider = (m_divider & ~RSB) | (state == ASSERT_LINE ? RSB : 0);
+ notify_clock_changed();
+ }
+}
+
+
+//------------------------------------------------
// reset_w - software controlled reset
//------------------------------------------------
diff --git a/src/devices/machine/mc14411.h b/src/devices/machine/mc14411.h
index 95d0639adae..4130fa746c9 100644
--- a/src/devices/machine/mc14411.h
+++ b/src/devices/machine/mc14411.h
@@ -92,8 +92,11 @@ public:
DECLARE_WRITE_LINE_MEMBER(reset_w);
DECLARE_WRITE8_MEMBER(rate_select_w);
+ DECLARE_WRITE_LINE_MEMBER(rsa_w);
+ DECLARE_WRITE_LINE_MEMBER(rsb_w);
void timer_enable(timer_id i, bool enable);
+ void timer_disable_all();
protected:
mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);