From 12d6dec1373079f3ef4cbaec62b47a8b4c1e02da Mon Sep 17 00:00:00 2001 From: smf- Date: Sun, 26 Jan 2014 23:37:56 +0000 Subject: [PATCH] added preliminary stop and reset to MSM58321 (nw) --- src/emu/machine/msm58321.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/emu/machine/msm58321.c b/src/emu/machine/msm58321.c index 573067609d6..8e24c90988a 100644 --- a/src/emu/machine/msm58321.c +++ b/src/emu/machine/msm58321.c @@ -14,10 +14,7 @@ TODO: - leap year - - stop - test - - reset - - busy - reference registers */ @@ -262,12 +259,16 @@ void msm58321_device::device_timer(emu_timer &timer, device_timer_id id, int par switch (id) { case TIMER_CLOCK: - advance_seconds(); + if (!m_stop) + advance_seconds(); break; case TIMER_BUSY: - m_busy = !m_busy; - m_busy_handler(m_busy); + if (!m_cs1 || !m_cs2 || !m_write || m_address != REGISTER_RESET) + { + m_busy = !m_busy; + m_busy_handler(m_busy); + } break; } } @@ -414,6 +415,12 @@ void msm58321_device::update_input() { case REGISTER_RESET: if (LOG) logerror("MSM58321 '%s' Reset\n", tag()); + + if (!m_busy) + { + m_busy = 1; + m_busy_handler(m_busy); + } break; case REGISTER_REF0: