summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/z80ctc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/z80ctc.cpp')
-rw-r--r--src/devices/machine/z80ctc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp
index 4f7a2c32e7c..13c4844c9e3 100644
--- a/src/devices/machine/z80ctc.cpp
+++ b/src/devices/machine/z80ctc.cpp
@@ -85,7 +85,7 @@ z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, dev
m_zc0_cb(*this),
m_zc1_cb(*this),
m_zc2_cb(*this),
- m_zc3_cb(*this),
+ m_zc3_cb(*this),
m_vector(0)
{
}
@@ -183,9 +183,9 @@ int z80ctc_device::z80daisy_irq_state()
// loop over all channels
int state = 0;
- for (int ch = 0; ch < 4; ch++)
+ for (auto & channel : m_channel)
{
- ctc_channel &channel = m_channel[ch];
+
// if we're servicing a request, don't indicate more interrupts
if (channel.m_int_state & Z80_DAISY_IEO)
@@ -284,13 +284,13 @@ void z80ctc_device::interrupt_check()
//-------------------------------------------------
z80ctc_device::ctc_channel::ctc_channel()
- : m_device(NULL),
- m_index(0),
+ : m_device(nullptr),
+ m_index(0),
m_mode(0),
m_tconst(0),
m_down(0),
m_extclk(0),
- m_timer(NULL),
+ m_timer(nullptr),
m_int_state(0)
{
}
@@ -369,7 +369,7 @@ UINT8 z80ctc_device::ctc_channel::read()
VPRINTF_CHANNEL(("CTC clock %f\n",ATTOSECONDS_TO_HZ(period.attoseconds())));
- if (m_timer != NULL)
+ if (m_timer != nullptr)
return ((int)(m_timer->remaining().as_double() / period.as_double()) + 1) & 0xff;
else
return 0;