diff --git a/src/devices/cpu/sh/sh.h b/src/devices/cpu/sh/sh.h index 145f56a734f..0eeba80d23c 100644 --- a/src/devices/cpu/sh/sh.h +++ b/src/devices/cpu/sh/sh.h @@ -168,6 +168,9 @@ public: virtual void WW(offs_t A, uint16_t V) = 0; virtual void WL(offs_t A, uint32_t V) = 0; + virtual void set_frt_input(int state) = 0; + void pulse_frt_input() { set_frt_input(ASSERT_LINE); set_frt_input(CLEAR_LINE); } + protected: // compilation boundaries -- how far back/forward does the analysis extend? enum : u32 diff --git a/src/devices/cpu/sh/sh2.h b/src/devices/cpu/sh/sh2.h index 75f46d2bf48..c5693ca9ebd 100644 --- a/src/devices/cpu/sh/sh2.h +++ b/src/devices/cpu/sh/sh2.h @@ -82,7 +82,7 @@ public: DECLARE_READ32_MEMBER( sh7604_r ); DECLARE_READ32_MEMBER(sh2_internal_a5); - void sh2_set_frt_input(int state); + virtual void set_frt_input(int state) override; void sh2_notify_dma_data_available(); void func_fastirq(); diff --git a/src/devices/cpu/sh/sh2comn.cpp b/src/devices/cpu/sh/sh2comn.cpp index cdc9e78dbf1..8accaaf8ebb 100644 --- a/src/devices/cpu/sh/sh2comn.cpp +++ b/src/devices/cpu/sh/sh2comn.cpp @@ -722,15 +722,8 @@ READ32_MEMBER( sh2_device::sh7604_r ) return m_m[offset]; } -void sh2_device::sh2_set_frt_input(int state) +void sh2_device::set_frt_input(int state) { - if(state == PULSE_LINE) - { - sh2_set_frt_input(ASSERT_LINE); - sh2_set_frt_input(CLEAR_LINE); - return; - } - if(m_frt_input == state) { return; } diff --git a/src/devices/cpu/sh/sh4.h b/src/devices/cpu/sh/sh4.h index a236acac809..8d6af845820 100644 --- a/src/devices/cpu/sh/sh4.h +++ b/src/devices/cpu/sh/sh4.h @@ -216,7 +216,7 @@ public: TIMER_CALLBACK_MEMBER( sh4_timer_callback ); TIMER_CALLBACK_MEMBER( sh4_dmac_callback ); - void sh4_set_frt_input(int state); + virtual void set_frt_input(int state) override; void sh4_set_irln_input(int value); //void sh4_set_ftcsr_callback(sh4_ftcsr_callback callback); int sh4_dma_data(struct sh4_device_dma *s); diff --git a/src/devices/cpu/sh/sh4comn.cpp b/src/devices/cpu/sh/sh4comn.cpp index 0cdc9b0b994..7f4a77c4efa 100644 --- a/src/devices/cpu/sh/sh4comn.cpp +++ b/src/devices/cpu/sh/sh4comn.cpp @@ -1066,18 +1066,11 @@ READ32_MEMBER( sh4_base_device::sh4_internal_r ) return m_m[offset]; } -void sh34_base_device::sh4_set_frt_input(int state) +void sh34_base_device::set_frt_input(int state) { if (m_cpu_type != CPU_TYPE_SH4) fatalerror("sh4_set_frt_input uses m_m[] with SH3\n"); - if(state == PULSE_LINE) - { - sh4_set_frt_input(ASSERT_LINE); - sh4_set_frt_input(CLEAR_LINE); - return; - } - if(m_sh2_state->m_frt_input == state) { return; } diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp index c7dae019b81..e0ef4a62a20 100644 --- a/src/mame/drivers/bublbobl.cpp +++ b/src/mame/drivers/bublbobl.cpp @@ -826,9 +826,12 @@ MACHINE_RESET_MEMBER(bublbobl_state,common) // things common on both tokio and b m_soundnmi->in_w<0>(0); // clear sound NMI stuff m_soundnmi->in_w<1>(0); m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); // if a subcpu nmi is active (extremely remote chance), it is cleared - m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // maincpu is reset - m_subcpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // subcpu is reset - common_sreset(PULSE_LINE); // /SRESET is pulsed + if (!m_sreset_old) + { + // /SRESET is pulsed + common_sreset(ASSERT_LINE); + common_sreset(CLEAR_LINE); + } } diff --git a/src/mame/machine/namcoio.cpp b/src/mame/machine/namcoio.cpp index 2eaa9079f31..2a73c02605a 100644 --- a/src/mame/machine/namcoio.cpp +++ b/src/mame/machine/namcoio.cpp @@ -177,7 +177,10 @@ void namcoio_device::device_reset() elem = 0; if (m_reset != ASSERT_LINE) - set_reset_line(PULSE_LINE); + { + set_reset_line(ASSERT_LINE); + set_reset_line(CLEAR_LINE); + } } /***************************************************************************** diff --git a/src/mame/machine/saturn.cpp b/src/mame/machine/saturn.cpp index 2fbc430a1f7..2975b4cb393 100644 --- a/src/mame/machine/saturn.cpp +++ b/src/mame/machine/saturn.cpp @@ -79,7 +79,7 @@ WRITE32_MEMBER(saturn_state::minit_w) machine().scheduler().boost_interleave(m_minit_boost_timeslice, attotime::from_usec(m_minit_boost)); machine().scheduler().trigger(1000); machine().scheduler().synchronize(); // force resync - m_slave->sh2_set_frt_input(PULSE_LINE); + m_slave->pulse_frt_input(); } WRITE32_MEMBER(saturn_state::sinit_w) @@ -87,7 +87,7 @@ WRITE32_MEMBER(saturn_state::sinit_w) //logerror("%s SINIT write = %08x\n", machine().describe_context(),data); machine().scheduler().boost_interleave(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost)); machine().scheduler().synchronize(); // force resync - m_maincpu->sh2_set_frt_input(PULSE_LINE); + m_maincpu->pulse_frt_input(); } /* @@ -120,7 +120,7 @@ WRITE32_MEMBER(saturn_state::saturn_minit_w) machine().scheduler().trigger(1000); } - m_slave->sh2_set_frt_input(PULSE_LINE); + m_slave->pulse_frt_input(); } WRITE32_MEMBER(saturn_state::saturn_sinit_w) @@ -131,7 +131,7 @@ WRITE32_MEMBER(saturn_state::saturn_sinit_w) else machine().scheduler().boost_interleave(m_sinit_boost_timeslice, attotime::from_usec(m_sinit_boost)); - m_maincpu->sh2_set_frt_input(PULSE_LINE); + m_maincpu->pulse_frt_input(); }