summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/i8155.cpp
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-10-25 17:44:39 +0200
committer hap <happppp@users.noreply.github.com>2022-10-25 17:44:53 +0200
commit957cfaa53d8c44904b62372ed120ccb684afd08c (patch)
treee21c56b3f74dc093eb75810e96b38cb0e226d40e /src/devices/machine/i8155.cpp
parentf727c63b169e6c5d23154447150e5548dcb1516a (diff)
emu_timer: undo prev commit, add running() getter and change some enabled() calls to that
Diffstat (limited to 'src/devices/machine/i8155.cpp')
-rw-r--r--src/devices/machine/i8155.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp
index fee07c4a919..810bb001e67 100644
--- a/src/devices/machine/i8155.cpp
+++ b/src/devices/machine/i8155.cpp
@@ -116,7 +116,7 @@ inline uint8_t i8155_device::get_timer_mode() const
inline uint16_t i8155_device::get_timer_count() const
{
- if (m_timer->enabled())
+ if (m_timer->running())
{
// timer counts down by twos
return std::min((uint16_t(attotime_to_clocks(m_timer->remaining())) + 1) << 1, m_count_loaded & 0x3ffe) | (m_count_even_phase ? 0 : 1);
@@ -139,12 +139,12 @@ inline void i8155_device::timer_output(int to)
inline void i8155_device::timer_stop_count()
{
// stop counting
- if (m_timer->enabled())
+ if (m_timer->running())
{
m_count_loaded = (m_count_loaded & (TIMER_MODE_MASK << 8)) | get_timer_count();
- m_timer->enable(false);
+ m_timer->adjust(attotime::never);
}
- m_timer_tc->enable(false);
+ m_timer_tc->adjust(attotime::never);
// clear timer output
timer_output(1);
@@ -519,7 +519,7 @@ void i8155_device::write_command(uint8_t data)
case COMMAND_TM_START:
LOGMASKED(LOG_PORT, "Timer Command: Start\n");
- if (m_timer->enabled())
+ if (m_timer->running())
{
// if timer is running, start the new mode and CNT length immediately after present TC is reached
}