mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
mc14411: Fix potential crashes caused by calling rate select handlers before device timers are instantiated
This commit is contained in:
parent
173a80fe8e
commit
8d25f46228
@ -251,6 +251,7 @@ void mc14411_device::rate_select_w(uint8_t data)
|
|||||||
if (m_divider != (data & 3))
|
if (m_divider != (data & 3))
|
||||||
{
|
{
|
||||||
m_divider = data & 3;
|
m_divider = data & 3;
|
||||||
|
if (started())
|
||||||
notify_clock_changed();
|
notify_clock_changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,6 +268,7 @@ void mc14411_device::rsa_w(int state)
|
|||||||
if ((m_divider & RSA) != (state == ASSERT_LINE ? RSA : 0))
|
if ((m_divider & RSA) != (state == ASSERT_LINE ? RSA : 0))
|
||||||
{
|
{
|
||||||
m_divider = (m_divider & ~RSA) | (state == ASSERT_LINE ? RSA : 0);
|
m_divider = (m_divider & ~RSA) | (state == ASSERT_LINE ? RSA : 0);
|
||||||
|
if (started())
|
||||||
notify_clock_changed();
|
notify_clock_changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -283,6 +285,7 @@ void mc14411_device::rsb_w(int state)
|
|||||||
if ((m_divider & RSB) != (state == ASSERT_LINE ? RSB : 0))
|
if ((m_divider & RSB) != (state == ASSERT_LINE ? RSB : 0))
|
||||||
{
|
{
|
||||||
m_divider = (m_divider & ~RSB) | (state == ASSERT_LINE ? RSB : 0);
|
m_divider = (m_divider & ~RSB) | (state == ASSERT_LINE ? RSB : 0);
|
||||||
|
if (started())
|
||||||
notify_clock_changed();
|
notify_clock_changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user