summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/mc2661.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/mc2661.cpp')
-rw-r--r--src/devices/machine/mc2661.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/devices/machine/mc2661.cpp b/src/devices/machine/mc2661.cpp
index 8f79893aadd..fa750d47e77 100644
--- a/src/devices/machine/mc2661.cpp
+++ b/src/devices/machine/mc2661.cpp
@@ -9,13 +9,16 @@
#include "emu.h"
#include "mc2661.h"
+//#define VERBOSE 1
+#include "logmacro.h"
+
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type MC2661 = device_creator<mc2661_device>;
+DEFINE_DEVICE_TYPE(MC2661, mc2661_device, "mc2661", "MC2661")
@@ -23,9 +26,6 @@ const device_type MC2661 = device_creator<mc2661_device>;
// MACROS / CONSTANTS
//**************************************************************************
-#define LOG 0
-
-
uint32_t baud_rates[16] =
{
50, 75, 110, 135 /*134.5*/, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200
@@ -96,7 +96,7 @@ enum
//-------------------------------------------------
mc2661_device::mc2661_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, MC2661, "MC2661", tag, owner, clock, "mc2661", __FILE__),
+ device_t(mconfig, MC2661, tag, owner, clock),
device_serial_interface(mconfig, *this),
m_write_txd(*this),
m_write_rxrdy(*this),
@@ -265,7 +265,7 @@ WRITE8_MEMBER( mc2661_device::write )
switch (offset & 0x03)
{
case REGISTER_HOLDING:
- if (LOG) logerror("MC2661 '%s' Transmit Holding Register: %02x\n", tag(), data);
+ LOG("MC2661 Transmit Holding Register: %02x\n", data);
m_thr = data;
if(COMMAND_TXEN)
@@ -284,7 +284,7 @@ WRITE8_MEMBER( mc2661_device::write )
break;
case REGISTER_SYNC:
- if (LOG) logerror("MC2661 '%s' Sync Register %u: %02x\n", tag(), m_sync_index + 1, data);
+ LOG("MC2661 Sync Register %u: %02x\n", m_sync_index + 1, data);
m_sync[m_sync_index] = data;
@@ -293,7 +293,7 @@ WRITE8_MEMBER( mc2661_device::write )
break;
case REGISTER_MODE:
- if (LOG) logerror("MC2661 '%s' Mode Register %u: %02x\n", tag(), m_mode_index + 1, data);
+ LOG("MC2661 Mode Register %u: %02x\n", m_mode_index + 1, data);
m_mr[m_mode_index] = data;
@@ -384,7 +384,7 @@ WRITE8_MEMBER( mc2661_device::write )
break;
case REGISTER_COMMAND:
- if (LOG) logerror("MC2661 '%s' Command Register: %02x\n", tag(), data);
+ LOG("MC2661 Command Register: %02x\n", data);
m_cr = data & 0xef;
@@ -432,7 +432,7 @@ WRITE8_MEMBER( mc2661_device::write )
WRITE_LINE_MEMBER( mc2661_device::dsr_w )
{
- if (LOG) logerror("MC2661 '%s' Data Set Ready: %u\n", tag(), state);
+ LOG("MC2661 Data Set Ready: %u\n", state);
if (state)
{
@@ -451,7 +451,7 @@ WRITE_LINE_MEMBER( mc2661_device::dsr_w )
WRITE_LINE_MEMBER( mc2661_device::dcd_w )
{
- if (LOG) logerror("MC2661 '%s' Data Carrier Detect: %u\n", tag(), state);
+ LOG("MC2661 Data Carrier Detect: %u\n", state);
if (state)
{
@@ -470,7 +470,7 @@ WRITE_LINE_MEMBER( mc2661_device::dcd_w )
WRITE_LINE_MEMBER( mc2661_device::cts_w )
{
- if (LOG) logerror("MC2661 '%s' Clear to Send: %u\n", tag(), state);
+ LOG("MC2661 Clear to Send: %u\n", state);
}