psikyo.cpp: Fix side effect in debugging (#7340)

This commit is contained in:
cam900 2020-10-12 10:54:11 +09:00 committed by GitHub
parent 538b3b2a0c
commit 0b32e41c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,7 @@ READ_LINE_MEMBER(psikyo_state::mcu_status_r)
if (m_mcu_status) if (m_mcu_status)
ret = 0x01; ret = 0x01;
if (!machine().side_effects_disabled())
m_mcu_status = !m_mcu_status; /* hack */ m_mcu_status = !m_mcu_status; /* hack */
return ret; return ret;
@ -207,11 +208,13 @@ u32 psikyo_state::s1945_mcu_data_r()
if (m_s1945_mcu_control & 16) if (m_s1945_mcu_control & 16)
{ {
res = m_s1945_mcu_latching & 4 ? 0x0000ff00 : m_s1945_mcu_latch1 << 8; res = m_s1945_mcu_latching & 4 ? 0x0000ff00 : m_s1945_mcu_latch1 << 8;
if (!machine().side_effects_disabled())
m_s1945_mcu_latching |= 4; m_s1945_mcu_latching |= 4;
} }
else else
{ {
res = m_s1945_mcu_latching & 1 ? 0x0000ff00 : m_s1945_mcu_latch2 << 8; res = m_s1945_mcu_latching & 1 ? 0x0000ff00 : m_s1945_mcu_latch2 << 8;
if (!machine().side_effects_disabled())
m_s1945_mcu_latching |= 1; m_s1945_mcu_latching |= 1;
} }
res |= m_s1945_mcu_bctrl & 0xf0; res |= m_s1945_mcu_bctrl & 0xf0;
@ -442,6 +445,7 @@ READ_LINE_MEMBER(psikyo_state::z80_nmi_r)
/* main CPU might be waiting for sound CPU to finish NMI, /* main CPU might be waiting for sound CPU to finish NMI,
so set a timer to give sound CPU a chance to run */ so set a timer to give sound CPU a chance to run */
if (!machine().side_effects_disabled())
machine().scheduler().synchronize(); machine().scheduler().synchronize();
// logerror("%s - Read coin port during Z80 NMI\n", machine().describe_context()); // logerror("%s - Read coin port during Z80 NMI\n", machine().describe_context());
} }