diff options
author | 2017-05-25 11:44:19 -0400 | |
---|---|---|
committer | 2017-05-25 11:44:19 -0400 | |
commit | a7fbc354c04b442c23aaaecbafbac516e6c625b8 (patch) | |
tree | a10ae8f6add2fd2241ec93eaa7c8ffe9dacabc9d | |
parent | 9422e167cab9b80dbeb06e5ccdfc93c2e0409620 (diff) |
z8: Timer clock cleanup (nw)
-rw-r--r-- | src/devices/cpu/z8/z8.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index eb6fdc0703c..1211bb566da 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -361,7 +361,7 @@ void z8_device::register_write(uint8_t offset, uint8_t data) if (data & Z8_TMR_LOAD_T0) { m_t0 = T0; - m_t0_timer->adjust(attotime::zero, 0, attotime::from_hz(m_clock / 2 / 4 / ((PRE0 >> 2) + 1))); + m_t0_timer->adjust(attotime::zero, 0, cycles_to_attotime(4 * ((PRE0 >> 2) + 1))); } m_t0_timer->enable(data & Z8_TMR_ENABLE_T0); @@ -369,7 +369,7 @@ void z8_device::register_write(uint8_t offset, uint8_t data) if (data & Z8_TMR_LOAD_T1) { m_t1 = T1; - m_t1_timer->adjust(attotime::zero, 0, attotime::from_hz(m_clock / 2 / 4 / ((PRE1 >> 2) + 1))); + m_t1_timer->adjust(attotime::zero, 0, cycles_to_attotime(4 * ((PRE1 >> 2) + 1))); } m_t1_timer->enable(data & Z8_TMR_ENABLE_T1); @@ -641,7 +641,7 @@ TIMER_CALLBACK_MEMBER( z8_device::t0_tick ) if (m_t0 == 0) { m_t0 = T0; - m_t0_timer->adjust(attotime::zero, 0, attotime::from_hz(m_clock / 2 / 4 / ((PRE0 >> 2) + 1))); + m_t0_timer->adjust(attotime::zero, 0, cycles_to_attotime(4 * ((PRE0 >> 2) + 1))); m_t0_timer->enable(PRE0 & Z8_PRE0_COUNT_MODULO_N); m_irq[4] = ASSERT_LINE; } @@ -654,7 +654,7 @@ TIMER_CALLBACK_MEMBER( z8_device::t1_tick ) if (m_t1 == 0) { m_t1 = T1; - m_t1_timer->adjust(attotime::zero, 0, attotime::from_hz(m_clock / 2 / 4 / ((PRE1 >> 2) + 1))); + m_t1_timer->adjust(attotime::zero, 0, cycles_to_attotime(4 * ((PRE1 >> 2) + 1))); m_t1_timer->enable(PRE1 & Z8_PRE0_COUNT_MODULO_N); m_irq[5] = ASSERT_LINE; } |