From 6643bd0e8b19120725108ac330d62aec9ae8b8fe Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 9 Feb 2024 19:34:41 +0100 Subject: h8: port registers are not modified at reset --- src/devices/cpu/h8/h8_port.cpp | 9 +++++---- src/devices/cpu/h8/h8_port.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/devices/cpu/h8/h8_port.cpp b/src/devices/cpu/h8/h8_port.cpp index 51a589c8146..6f65bfa6ced 100644 --- a/src/devices/cpu/h8/h8_port.cpp +++ b/src/devices/cpu/h8/h8_port.cpp @@ -86,14 +86,15 @@ void h8_port_device::device_start() save_item(NAME(m_pcr)); save_item(NAME(m_odr)); save_item(NAME(m_last_output)); - m_last_output = 0; -} -void h8_port_device::device_reset() -{ + m_last_output = -1; m_dr = 0; m_ddr = m_default_ddr; m_pcr = 0; m_odr = 0; +} + +void h8_port_device::device_reset() +{ update_output(); } diff --git a/src/devices/cpu/h8/h8_port.h b/src/devices/cpu/h8/h8_port.h index 19a8745cb5e..cc809b633af 100644 --- a/src/devices/cpu/h8/h8_port.h +++ b/src/devices/cpu/h8/h8_port.h @@ -45,7 +45,7 @@ protected: uint8_t m_default_ddr, m_ddr, m_pcr, m_odr; uint8_t m_mask; uint8_t m_dr; - uint8_t m_last_output; + int32_t m_last_output; virtual void device_start() override; virtual void device_reset() override; -- cgit v1.2.3