-cdimono2: Added more logging for SERVO ports, nw

This commit is contained in:
MooglyGuy 2020-01-02 02:16:30 +01:00
parent 49e27cd4a6
commit ccfb0091e8
2 changed files with 8 additions and 1 deletions

View file

@ -36,7 +36,7 @@ determines both the COP watchdog timeout and the real-time interrupt rate
#define LOG_UART (1U << 5)
#define LOG_SPI (1U << 6)
#define VERBOSE (LOG_GENERAL | LOG_INT | LOG_COP | LOG_UART)
#define VERBOSE (LOG_GENERAL | LOG_INT | LOG_COP | LOG_UART | LOG_SPI)
//#define LOG_OUTPUT_FUNC printf
#include "logmacro.h"

View file

@ -361,6 +361,7 @@ INPUT_CHANGED_MEMBER(cdimono2_state::mouse_update)
if (BIT(state, 4))
{
logerror("Ctrl pressed\n");
m_mouse_buffer[1] |= 0x20;
}
if (BIT(state, 5))
@ -917,11 +918,17 @@ WRITE8_MEMBER(cdimono2_state::servo_porta_w)
WRITE8_MEMBER(cdimono2_state::servo_portb_w)
{
logerror("%s: servo_portb_w: %02x & %02x\n", machine().describe_context(), data, mem_mask);
const uint8_t old = m_servo_portb_data;
m_servo_portb_data = data;
if (BIT(data, 7))
m_slave->ss_in(0);
else
m_slave->ss_in(1);
if (BIT(old, 5) != BIT(data, 5))
{
printf("New TMOUT: %d\n", BIT(data, 5));
}
}
WRITE8_MEMBER(cdimono2_state::servo_portc_w)