From 174e7b89d61cf4dd26927418ceaac3b2cea55870 Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 22 Apr 2024 03:06:14 +0900 Subject: cpu/tms34010/tms34010.cpp: Suppress side effects for debugger reads. (#12287) --- src/devices/cpu/tms34010/tms34010.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp index 5f83443da68..7024bff1fb0 100644 --- a/src/devices/cpu/tms34010/tms34010.cpp +++ b/src/devices/cpu/tms34010/tms34010.cpp @@ -1547,7 +1547,8 @@ u16 tms34010_device::io_register_r(offs_t offset) { int result, total; - LOGCONTROLREGS("%s: read %s\n", machine().describe_context(), ioreg_name[offset]); + if (!machine().side_effects_disabled()) + LOGCONTROLREGS("%s: read %s\n", machine().describe_context(), ioreg_name[offset]); switch (offset) { @@ -1588,7 +1589,8 @@ u16 tms34020_device::io_register_r(offs_t offset) { int result, total; - LOGCONTROLREGS("%s: read %s\n", machine().describe_context(), ioreg020_name[offset]); + if (!machine().side_effects_disabled()) + LOGCONTROLREGS("%s: read %s\n", machine().describe_context(), ioreg020_name[offset]); switch (offset) { @@ -1718,13 +1720,16 @@ u16 tms340x0_device::host_r(offs_t offset) addr = (IOREG(REG_HSTADRH) << 16) | IOREG(REG_HSTADRL); result = TMS34010_RDMEM_WORD(addr & 0xfffffff0); - /* optional postincrement (it says preincrement, but data is preloaded, so it - is effectively a postincrement */ - if (IOREG(REG_HSTCTLH) & 0x1000) + if (!machine().side_effects_disabled()) { - addr += 0x10; - IOREG(REG_HSTADRH) = addr >> 16; - IOREG(REG_HSTADRL) = (uint16_t)addr; + /* optional postincrement (it says preincrement, but data is preloaded, so it + is effectively a postincrement */ + if (IOREG(REG_HSTCTLH) & 0x1000) + { + addr += 0x10; + IOREG(REG_HSTADRH) = addr >> 16; + IOREG(REG_HSTADRL) = (uint16_t)addr; + } } break; @@ -1735,7 +1740,8 @@ u16 tms340x0_device::host_r(offs_t offset) /* error case */ default: - logerror("tms34010_host_control_r called on invalid register %d\n", reg); + if (!machine().side_effects_disabled()) + logerror("tms34010_host_control_r called on invalid register %d\n", reg); break; } -- cgit v1.2.3