summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2025-09-12 14:51:27 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2025-09-12 14:51:27 +0700
commit358122c01b99f974044aa7645e937cf3ae2ea001 (patch)
tree02821c0b5295bef4ea49f3adf88153f36fd22687
parentf7731929a75b6a617a3663f6efb75c31286278dd (diff)
mb8795.cpp: use packet logging helper
-rw-r--r--src/devices/machine/mb8795.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp
index b2182781879..d7ff12bafd9 100644
--- a/src/devices/machine/mb8795.cpp
+++ b/src/devices/machine/mb8795.cpp
@@ -11,8 +11,9 @@
#define LOG_REGW (1U << 2)
#define LOG_TX (1U << 3)
#define LOG_RX (1U << 4)
+#define LOG_FRAMES (1U << 5)
-//#define VERBOSE (LOG_GENERAL|LOG_REGR|LOG_REGW|LOG_TX|LOG_RX)
+//#define VERBOSE (LOG_GENERAL|LOG_REGR|LOG_REGW|LOG_TX|LOG_RX|LOG_FRAMES)
#include "logmacro.h"
@@ -275,6 +276,9 @@ void mb8795_device::tx_dma_w(u8 data, bool eof)
put_u32le(&m_txbuf[m_txlen], util::crc32_creator::simple(m_txbuf, m_txlen));
m_txlen += 4;
+ if(VERBOSE & LOG_FRAMES)
+ log_bytes(m_txbuf, m_txlen);
+
// count number of bits transmitted
m_txcount = send(m_txbuf, m_txlen, 4) * 8;
@@ -335,6 +339,9 @@ void mb8795_device::receive()
if(!keep)
m_rxlen = 0;
else {
+ if(VERBOSE & LOG_FRAMES)
+ log_bytes(m_rxbuf, m_rxlen);
+
m_rxstat = 0;
if(m_rxlen < 64) {
if(!(m_rxmode & RMD_SHORTENABLE) || (m_rxlen < 10)) {