summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-11-01 18:14:40 +0100
committer hap <happppp@users.noreply.github.com>2022-11-01 18:14:40 +0100
commitb527e43528869fe80f8bd2a3b0a3520b17948d8a (patch)
treefa6e217b46d3f5ec06d48084baf83feb5c70560a /src/devices/machine
parent4e8a667e91a13c6193a816ad51f57770643d5d04 (diff)
Revert "emu_timer: undo prev commit, add running() getter and change some enabled() calls to that"
This reverts commit 957cfaa53d8c44904b62372ed120ccb684afd08c.
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/chessmachine.cpp2
-rw-r--r--src/devices/machine/cxd1185.cpp4
-rw-r--r--src/devices/machine/er1400.cpp6
-rw-r--r--src/devices/machine/i8155.cpp10
-rw-r--r--src/devices/machine/ncr5380.cpp8
-rw-r--r--src/devices/machine/timer.h1
6 files changed, 15 insertions, 16 deletions
diff --git a/src/devices/machine/chessmachine.cpp b/src/devices/machine/chessmachine.cpp
index 1016cec2ec4..fa201f9b11e 100644
--- a/src/devices/machine/chessmachine.cpp
+++ b/src/devices/machine/chessmachine.cpp
@@ -126,7 +126,7 @@ void chessmachine_device::install_bootrom(bool enable)
u32 chessmachine_device::disable_bootrom_r()
{
// disconnect bootrom from the bus after next opcode
- if (m_bootrom_enabled && !m_disable_bootrom->running() && !machine().side_effects_disabled())
+ if (m_bootrom_enabled && !m_disable_bootrom->enabled() && !machine().side_effects_disabled())
m_disable_bootrom->adjust(m_maincpu->cycles_to_attotime(5));
return 0;
diff --git a/src/devices/machine/cxd1185.cpp b/src/devices/machine/cxd1185.cpp
index b854884d29a..9417def1ff8 100644
--- a/src/devices/machine/cxd1185.cpp
+++ b/src/devices/machine/cxd1185.cpp
@@ -172,7 +172,7 @@ u8 cxd1185_device::scsi_data_r()
{
data = m_fifo.dequeue();
- if (m_state != IDLE && !m_state_timer->running())
+ if (m_state != IDLE && !m_state_timer->enabled())
m_state_timer->adjust(attotime::zero);
}
else
@@ -375,7 +375,7 @@ void cxd1185_device::scsi_data_w(u8 data)
{
m_fifo.enqueue(data);
- if (m_state != IDLE && !m_state_timer->running())
+ if (m_state != IDLE && !m_state_timer->enabled())
m_state_timer->adjust(attotime::zero);
}
else
diff --git a/src/devices/machine/er1400.cpp b/src/devices/machine/er1400.cpp
index c2375294ba5..7a49272fe5c 100644
--- a/src/devices/machine/er1400.cpp
+++ b/src/devices/machine/er1400.cpp
@@ -261,7 +261,7 @@ WRITE_LINE_MEMBER(er1400_device::c1_w)
return;
m_code_input = (m_code_input & 3) | (bool(state) << 2);
- if (!m_data_propagation_timer->running())
+ if (!m_data_propagation_timer->enabled())
m_data_propagation_timer->adjust(attotime::from_usec(20));
}
@@ -276,7 +276,7 @@ WRITE_LINE_MEMBER(er1400_device::c2_w)
return;
m_code_input = (m_code_input & 5) | (bool(state) << 1);
- if (!m_data_propagation_timer->running())
+ if (!m_data_propagation_timer->enabled())
m_data_propagation_timer->adjust(attotime::from_usec(20));
}
@@ -291,7 +291,7 @@ WRITE_LINE_MEMBER(er1400_device::c3_w)
return;
m_code_input = (m_code_input & 6) | bool(state);
- if (!m_data_propagation_timer->running())
+ if (!m_data_propagation_timer->enabled())
m_data_propagation_timer->adjust(attotime::from_usec(20));
}
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp
index 810bb001e67..fee07c4a919 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->running())
+ if (m_timer->enabled())
{
// 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->running())
+ if (m_timer->enabled())
{
m_count_loaded = (m_count_loaded & (TIMER_MODE_MASK << 8)) | get_timer_count();
- m_timer->adjust(attotime::never);
+ m_timer->enable(false);
}
- m_timer_tc->adjust(attotime::never);
+ m_timer_tc->enable(false);
// 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->running())
+ if (m_timer->enabled())
{
// if timer is running, start the new mode and CNT length immediately after present TC is reached
}
diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp
index 56fefc4f97f..ec7e2c412b3 100644
--- a/src/devices/machine/ncr5380.cpp
+++ b/src/devices/machine/ncr5380.cpp
@@ -168,7 +168,7 @@ void ncr5380_device::scsi_ctrl_changed()
}
m_state = IDLE;
- m_state_timer->adjust(attotime::never);
+ m_state_timer->enable(false);
// clear scsi bus
scsi_bus->data_w(scsi_refid, 0);
@@ -182,7 +182,7 @@ void ncr5380_device::scsi_ctrl_changed()
if ((ctrl & S_PHASE_MASK) == (m_tcmd & TC_PHASE))
{
// transfer cycle
- if (m_state != IDLE && !m_state_timer->running())
+ if (m_state != IDLE && !m_state_timer->enabled())
m_state_timer->adjust(attotime::zero);
}
else
@@ -190,7 +190,7 @@ void ncr5380_device::scsi_ctrl_changed()
LOG("phase mismatch %d != %d\n", (ctrl & S_PHASE_MASK), (m_tcmd & TC_PHASE));
m_state = IDLE;
- m_state_timer->adjust(attotime::never);
+ m_state_timer->enable(false);
set_drq(true);
set_irq(true);
@@ -286,7 +286,7 @@ void ncr5380_device::mode_w(u8 data)
if ((m_mode & MODE_DMA) && !(data & MODE_DMA))
{
m_state = IDLE;
- m_state_timer->adjust(attotime::never);
+ m_state_timer->enable(false);
m_bas &= ~BAS_ENDOFDMA;
diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h
index 2c138a1565c..dbd7e0763f6 100644
--- a/src/devices/machine/timer.h
+++ b/src/devices/machine/timer.h
@@ -97,7 +97,6 @@ public:
}
// timing information
- bool running() const { return m_timer->running(); }
attotime elapsed() const { return m_timer->elapsed(); }
attotime remaining() const { return m_timer->remaining(); }
attotime start() const { return m_timer->start(); }