diff options
Diffstat (limited to 'src/devices/machine/i8214.cpp')
-rw-r--r-- | src/devices/machine/i8214.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp index a1f0977baca..ce6077717b5 100644 --- a/src/devices/machine/i8214.cpp +++ b/src/devices/machine/i8214.cpp @@ -9,17 +9,12 @@ #include "emu.h" #include "i8214.h" +//#define VERBOSE 1 +#include "logmacro.h" // device type definition -const device_type I8214 = device_creator<i8214_device>; - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define LOG 0 +DEFINE_DEVICE_TYPE(I8214, i8214_device, "i8214", "Intel 8214 PIC") @@ -33,7 +28,7 @@ const device_type I8214 = device_creator<i8214_device>; void i8214_device::trigger_interrupt(int level) { - if (LOG) logerror("I8214 '%s' Interrupt Level %u\n", tag(), level); + LOG("I8214 Interrupt Level %u\n", level); m_a = level; @@ -87,7 +82,7 @@ void i8214_device::check_interrupt() //------------------------------------------------- i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, I8214, "I8214", tag, owner, clock, "i8214", __FILE__) + : device_t(mconfig, I8214, tag, owner, clock) , m_write_irq(*this) , m_write_enlg(*this) , m_inte(0) @@ -133,7 +128,7 @@ uint8_t i8214_device::a_r() { uint8_t a = m_a & 0x07; - if (LOG) logerror("I8214 '%s' A: %01x\n", tag(), a); + LOG("I8214 A: %01x\n", a); return a; } @@ -147,7 +142,7 @@ void i8214_device::b_w(uint8_t data) { m_current_status = data & 0x07; - if (LOG) logerror("I8214 '%s' B: %01x\n", tag(), m_current_status); + LOG("I8214 B: %01x\n", m_current_status); // enable interrupts m_int_dis = 0; @@ -166,7 +161,7 @@ void i8214_device::b_w(uint8_t data) void i8214_device::r_w(int line, int state) { - if (LOG) logerror("I8214 '%s' R%d: %d\n", tag(), line, state); + LOG("I8214 R%d: %d\n", line, state); m_r &= ~(1 << line); m_r |= (state << line); @@ -181,7 +176,7 @@ void i8214_device::r_w(int line, int state) WRITE_LINE_MEMBER( i8214_device::sgs_w ) { - if (LOG) logerror("I8214 '%s' SGS: %u\n", tag(), state); + LOG("I8214 SGS: %u\n", state); m_sgs = state; @@ -195,7 +190,7 @@ WRITE_LINE_MEMBER( i8214_device::sgs_w ) WRITE_LINE_MEMBER( i8214_device::etlg_w ) { - if (LOG) logerror("I8214 '%s' ETLG: %u\n", tag(), state); + LOG("I8214 ETLG: %u\n", state); m_etlg = state; } @@ -207,7 +202,7 @@ WRITE_LINE_MEMBER( i8214_device::etlg_w ) WRITE_LINE_MEMBER( i8214_device::inte_w ) { - if (LOG) logerror("I8214 '%s' INTE: %u\n", tag(), state); + LOG("I8214 INTE: %u\n", state); m_inte = state; } |