summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/i8089/i8089_channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/i8089/i8089_channel.cpp')
-rw-r--r--src/devices/cpu/i8089/i8089_channel.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/devices/cpu/i8089/i8089_channel.cpp b/src/devices/cpu/i8089/i8089_channel.cpp
index 8cfcdc6cca7..8511e924b33 100644
--- a/src/devices/cpu/i8089/i8089_channel.cpp
+++ b/src/devices/cpu/i8089/i8089_channel.cpp
@@ -9,8 +9,8 @@
***************************************************************************/
#include "emu.h"
-#include "debugger.h"
#include "i8089_channel.h"
+#include "debugger.h"
//**************************************************************************
@@ -37,7 +37,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type I8089_CHANNEL = device_creator<i8089_channel>;
+DEFINE_DEVICE_TYPE(I8089_CHANNEL, i8089_channel_device, "i8089_channel", "Intel 8089 I/O Channel")
//**************************************************************************
@@ -45,11 +45,11 @@ const device_type I8089_CHANNEL = device_creator<i8089_channel>;
//**************************************************************************
//-------------------------------------------------
-// i8089_channel - constructor
+// i8089_channel_device - constructor
//-------------------------------------------------
-i8089_channel::i8089_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, I8089_CHANNEL, "Intel 8089 I/O Channel", tag, owner, clock, "i8089_channel", __FILE__),
+i8089_channel_device::i8089_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, I8089_CHANNEL, tag, owner, clock),
m_write_sintr(*this),
m_iop(nullptr),
m_icount(0),
@@ -65,7 +65,7 @@ i8089_channel::i8089_channel(const machine_config &mconfig, const char *tag, dev
// device_start - device-specific startup
//-------------------------------------------------
-void i8089_channel::device_start()
+void i8089_channel_device::device_start()
{
// get parent device
m_iop = downcast<i8089_device *>(owner());
@@ -91,7 +91,7 @@ void i8089_channel::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void i8089_channel::device_reset()
+void i8089_channel_device::device_reset()
{
m_xfer_pending = false;
@@ -109,7 +109,7 @@ void i8089_channel::device_reset()
// IMPLEMENTATION
//**************************************************************************
-void i8089_channel::set_reg(int reg, uint32_t value, int tag)
+void i8089_channel_device::set_reg(int reg, uint32_t value, int tag)
{
if((reg == BC) || (reg == IX) || (reg == CC) || (reg == MC))
{
@@ -134,14 +134,14 @@ void i8089_channel::set_reg(int reg, uint32_t value, int tag)
}
// channel status
-bool i8089_channel::executing() { return BIT(m_r[PSW].w, 2); }
-bool i8089_channel::transferring() { return BIT(m_r[PSW].w, 6); }
-bool i8089_channel::priority() { return BIT(m_r[PSW].w, 7); }
-int i8089_channel::chan_prio() { return m_prio; }
-bool i8089_channel::chained() { return CC_CHAIN; }
-bool i8089_channel::lock() { return CC_LOCK; }
-
-int16_t i8089_channel::displacement(int wb)
+bool i8089_channel_device::executing() { return BIT(m_r[PSW].w, 2); }
+bool i8089_channel_device::transferring() { return BIT(m_r[PSW].w, 6); }
+bool i8089_channel_device::priority() { return BIT(m_r[PSW].w, 7); }
+int i8089_channel_device::chan_prio() { return m_prio; }
+bool i8089_channel_device::chained() { return CC_CHAIN; }
+bool i8089_channel_device::lock() { return CC_LOCK; }
+
+int16_t i8089_channel_device::displacement(int wb)
{
int16_t displacement = 0;
@@ -159,7 +159,7 @@ int16_t i8089_channel::displacement(int wb)
return displacement;
}
-uint32_t i8089_channel::offset(int aa, int mm, int w)
+uint32_t i8089_channel_device::offset(int aa, int mm, int w)
{
uint32_t offset = 0;
switch(aa)
@@ -182,14 +182,14 @@ uint32_t i8089_channel::offset(int aa, int mm, int w)
return offset & 0xfffff;
}
-int8_t i8089_channel::imm8()
+int8_t i8089_channel_device::imm8()
{
int8_t imm8 = (int8_t)m_iop->read_byte(m_r[TP].t, m_r[TP].w);
set_reg(TP, m_r[TP].w + 1);
return imm8;
}
-int16_t i8089_channel::imm16()
+int16_t i8089_channel_device::imm16()
{
int16_t imm16 = (int16_t)m_iop->read_word(m_r[TP].t, m_r[TP].w);
set_reg(TP, m_r[TP].w + 2);
@@ -197,7 +197,7 @@ int16_t i8089_channel::imm16()
}
// adjust task pointer and continue execution
-void i8089_channel::terminate_dma(int offset)
+void i8089_channel_device::terminate_dma(int offset)
{
if (VERBOSE)
logerror("%s('%s'): terminating dma transfer\n", shortname(), tag());
@@ -208,7 +208,7 @@ void i8089_channel::terminate_dma(int offset)
m_dma_state = DMA_IDLE;
}
-int i8089_channel::execute_run()
+int i8089_channel_device::execute_run()
{
m_icount = 0;
@@ -676,7 +676,7 @@ int i8089_channel::execute_run()
return m_icount;
}
-void i8089_channel::examine_ccw(uint8_t ccw)
+void i8089_channel_device::examine_ccw(uint8_t ccw)
{
// priority and bus load limit, bit 7 and 5
m_r[PSW].w = (m_r[PSW].w & 0x5f) | (ccw & 0xa0);
@@ -698,7 +698,7 @@ void i8089_channel::examine_ccw(uint8_t ccw)
}
}
-void i8089_channel::attention()
+void i8089_channel_device::attention()
{
// examine control byte
uint8_t ccw = m_iop->read_byte(m_r[CP].t, m_r[CP].w);
@@ -826,12 +826,12 @@ void i8089_channel::attention()
}
}
-void i8089_channel::ca()
+void i8089_channel_device::ca()
{
m_prio = PRIO_CHAN_ATTN;
}
-WRITE_LINE_MEMBER( i8089_channel::ext_w )
+WRITE_LINE_MEMBER( i8089_channel_device::ext_w )
{
if (VERBOSE)
logerror("%s('%s'): ext_w: %d\n", shortname(), tag(), state);
@@ -840,7 +840,7 @@ WRITE_LINE_MEMBER( i8089_channel::ext_w )
terminate_dma((CC_TX - 1) * 4);
}
-WRITE_LINE_MEMBER( i8089_channel::drq_w )
+WRITE_LINE_MEMBER( i8089_channel_device::drq_w )
{
if (VERBOSE_DMA)
logerror("%s('%s'): drq_w: %d\n", shortname(), tag(), state);