summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2020-06-03 23:42:52 +0200
committer Olivier Galibert <galibert@pobox.com>2020-06-11 23:14:03 +0200
commit757c179183c6b4f80375c58900716a1df2b5ac34 (patch)
tree98961a096061f76a135bb4501544f76c5ab35d47
parent610f9fdb72f23d2487600ebf86e94caadbd9632d (diff)
adb logging
-rw-r--r--src/devices/machine/6522via.cpp22
-rw-r--r--src/mame/machine/egret.cpp1
2 files changed, 23 insertions, 0 deletions
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp
index a0b66c138d8..11347fb03e6 100644
--- a/src/devices/machine/6522via.cpp
+++ b/src/devices/machine/6522via.cpp
@@ -389,6 +389,8 @@ void via6522_device::shift_out()
// Only shift out msb on falling edge
if (m_shift_counter & 1)
{
+ if(m_shift_counter == 15)
+ logerror("shift out %02x\n", m_sr);
LOGSHIFT(" %s shift Out SR: %02x->", tag(), m_sr);
m_out_cb2 = (m_sr >> 7) & 1;
m_sr = (m_sr << 1) | m_out_cb2;
@@ -400,6 +402,7 @@ void via6522_device::shift_out()
{
LOGINT("SHIFT EXT out INT request ");
set_int(INT_SR); // IRQ on last falling edge for external clock (mode 7)
+ logerror("int on shift out\n");
}
}
else // Check for INT condition, eg the last and raising edge of the 15-0 falling/raising edges
@@ -418,6 +421,7 @@ void via6522_device::shift_out()
void via6522_device::shift_in()
{
+ logerror("shift in tick %d\n", m_shift_counter);
// Only shift in data on raising edge
if ( !(m_shift_counter & 1) )
{
@@ -427,6 +431,7 @@ void via6522_device::shift_in()
if (m_shift_counter == 0)
{
+ logerror("int on shift in (%02x)\n", m_sr);
LOGINT("SHIFT in INT request ");
// set_int(INT_SR);// TODO: this interrupt is 1-2 clock cycles too early
m_shift_irq_timer->adjust(clocks_to_attotime(2)/2); // Delay IRQ 2 edges for all shift INs (mode 1-3)
@@ -562,6 +567,8 @@ void via6522_device::output_pb()
/*-------------------------------------------------
via_r - CPU interface for VIA read
-------------------------------------------------*/
+static int lpa=-1;
+static int lpb=-1;
u8 via6522_device::read(offs_t offset)
{
@@ -581,6 +588,11 @@ u8 via6522_device::read(offs_t offset)
val = m_latch_b;
}
+ if(val != lpb) {
+ logerror("pb = %02x\n", val);
+ lpb = val;
+ }
+
if (!machine().side_effects_disabled())
{
LOGINT("PB INT ");
@@ -599,6 +611,11 @@ u8 via6522_device::read(offs_t offset)
val = m_latch_a;
}
+ if(val != lpa) {
+ logerror("pa = %02x\n", val);
+ lpa = val;
+ }
+
if (!machine().side_effects_disabled())
{
LOGINT("PA INT ");
@@ -626,6 +643,11 @@ u8 via6522_device::read(offs_t offset)
{
val = m_latch_a;
}
+
+ if(val != lpa) {
+ logerror("pa = %02x\n", val);
+ lpa = val;
+ }
break;
case VIA_DDRB:
diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp
index 281047548ee..b3f362ce323 100644
--- a/src/mame/machine/egret.cpp
+++ b/src/mame/machine/egret.cpp
@@ -133,6 +133,7 @@ void egret_device::send_port(uint8_t offset, uint8_t data)
case 1: // port B
{
+ logerror("portb = %02x\n", data);
if (xcvr_session != ((data>>1)&1))
{
#ifdef EGRET_SUPER_VERBOSE