From 38516f4b250f7ca3b6d17553365459f34f0affdf Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 23 Feb 2024 14:27:02 +0100 Subject: [PATCH] h8(cpu devices): add variables to save_item --- src/devices/cpu/h8/h83002.cpp | 8 ++++++-- src/devices/cpu/h8/h83002.h | 4 ++-- src/devices/cpu/h8/h83003.cpp | 8 ++++++-- src/devices/cpu/h8/h83003.h | 4 ++-- src/devices/cpu/h8/h83006.cpp | 2 +- src/devices/cpu/h8/h83008.cpp | 2 +- src/devices/cpu/h8/h83032.cpp | 1 + src/devices/cpu/h8/h83042.cpp | 1 + src/devices/cpu/h8/h83048.cpp | 1 + src/devices/cpu/h8/h8s2245.cpp | 3 +++ src/devices/cpu/h8/h8s2320.cpp | 2 ++ src/devices/cpu/h8/h8s2357.cpp | 1 + src/devices/cpu/h8/h8s2655.cpp | 1 + src/devices/cpu/h8/swx00.cpp | 1 + 14 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/devices/cpu/h8/h83002.cpp b/src/devices/cpu/h8/h83002.cpp index 60e60fc2fed..d29b7e8ef5a 100644 --- a/src/devices/cpu/h8/h83002.cpp +++ b/src/devices/cpu/h8/h83002.cpp @@ -26,9 +26,9 @@ h83002_device::h83002_device(const machine_config &mconfig, const char *tag, dev m_timer16_3(*this, "timer16:3"), m_timer16_4(*this, "timer16:4"), m_watchdog(*this, "watchdog"), - m_tend_cb(*this) + m_tend_cb(*this), + m_syscr(0) { - m_syscr = 0; } void h83002_device::map(address_map &map) @@ -237,12 +237,16 @@ void h83002_device::device_start() { h8h_device::device_start(); m_dma_device = m_dma; + + save_item(NAME(m_syscr)); + save_item(NAME(m_rtmcsr)); } void h83002_device::device_reset() { h8h_device::device_reset(); m_syscr = 0x09; + m_rtmcsr = 0x00; } u8 h83002_device::syscr_r() diff --git a/src/devices/cpu/h8/h83002.h b/src/devices/cpu/h8/h83002.h index eb03a757ce9..c45fad83711 100644 --- a/src/devices/cpu/h8/h83002.h +++ b/src/devices/cpu/h8/h83002.h @@ -76,11 +76,11 @@ protected: required_device m_timer16_4; required_device m_watchdog; + devcb_write_line::array<2> m_tend_cb; + u8 m_syscr; u8 m_rtmcsr; - devcb_write_line::array<2> m_tend_cb; - virtual void update_irq_filter() override; virtual void interrupt_taken() override; virtual int trapa_setup() override; diff --git a/src/devices/cpu/h8/h83003.cpp b/src/devices/cpu/h8/h83003.cpp index f68692a4f53..ba9c8aabafa 100644 --- a/src/devices/cpu/h8/h83003.cpp +++ b/src/devices/cpu/h8/h83003.cpp @@ -30,9 +30,9 @@ h83003_device::h83003_device(const machine_config &mconfig, const char *tag, dev m_timer16_3(*this, "timer16:3"), m_timer16_4(*this, "timer16:4"), m_watchdog(*this, "watchdog"), - m_tend_cb(*this) + m_tend_cb(*this), + m_syscr(0) { - m_syscr = 0; } void h83003_device::map(address_map &map) @@ -264,12 +264,16 @@ void h83003_device::device_start() { h8h_device::device_start(); m_dma_device = m_dma; + + save_item(NAME(m_syscr)); + save_item(NAME(m_rtmcsr)); } void h83003_device::device_reset() { h8h_device::device_reset(); m_syscr = 0x09; + m_rtmcsr = 0x00; } u8 h83003_device::syscr_r() diff --git a/src/devices/cpu/h8/h83003.h b/src/devices/cpu/h8/h83003.h index 7bd52c3ceb5..a10ec7e8241 100644 --- a/src/devices/cpu/h8/h83003.h +++ b/src/devices/cpu/h8/h83003.h @@ -86,11 +86,11 @@ protected: required_device m_timer16_4; required_device m_watchdog; + devcb_write_line::array<4> m_tend_cb; + u8 m_syscr; u8 m_rtmcsr; - devcb_write_line::array<4> m_tend_cb; - virtual void update_irq_filter() override; virtual void interrupt_taken() override; virtual int trapa_setup() override; diff --git a/src/devices/cpu/h8/h83006.cpp b/src/devices/cpu/h8/h83006.cpp index a03b4ac763f..586b9d1f720 100644 --- a/src/devices/cpu/h8/h83006.cpp +++ b/src/devices/cpu/h8/h83006.cpp @@ -230,6 +230,7 @@ void h83006_device::internal_update(u64 current_time) void h83006_device::device_start() { h8h_device::device_start(); + save_item(NAME(m_syscr)); } void h83006_device::device_reset() @@ -238,7 +239,6 @@ void h83006_device::device_reset() m_syscr = 0x09; } - u8 h83006_device::syscr_r() { return m_syscr; diff --git a/src/devices/cpu/h8/h83008.cpp b/src/devices/cpu/h8/h83008.cpp index 5535a31ac2a..96aa5b9546e 100644 --- a/src/devices/cpu/h8/h83008.cpp +++ b/src/devices/cpu/h8/h83008.cpp @@ -207,6 +207,7 @@ void h83008_device::internal_update(u64 current_time) void h83008_device::device_start() { h8h_device::device_start(); + save_item(NAME(m_syscr)); } void h83008_device::device_reset() @@ -215,7 +216,6 @@ void h83008_device::device_reset() m_syscr = 0x09; } - u8 h83008_device::syscr_r() { return m_syscr; diff --git a/src/devices/cpu/h8/h83032.cpp b/src/devices/cpu/h8/h83032.cpp index 16c6ab94480..269158d4f87 100644 --- a/src/devices/cpu/h8/h83032.cpp +++ b/src/devices/cpu/h8/h83032.cpp @@ -231,6 +231,7 @@ void h83032_device::internal_update(u64 current_time) void h83032_device::device_start() { h8h_device::device_start(); + save_item(NAME(m_syscr)); } void h83032_device::device_reset() diff --git a/src/devices/cpu/h8/h83042.cpp b/src/devices/cpu/h8/h83042.cpp index 82465893ae3..f0f35a0ea77 100644 --- a/src/devices/cpu/h8/h83042.cpp +++ b/src/devices/cpu/h8/h83042.cpp @@ -266,6 +266,7 @@ void h83042_device::internal_update(u64 current_time) void h83042_device::device_start() { h8h_device::device_start(); + save_item(NAME(m_syscr)); } void h83042_device::device_reset() diff --git a/src/devices/cpu/h8/h83048.cpp b/src/devices/cpu/h8/h83048.cpp index e32874ddee3..be0fdc0936c 100644 --- a/src/devices/cpu/h8/h83048.cpp +++ b/src/devices/cpu/h8/h83048.cpp @@ -271,6 +271,7 @@ void h83048_device::internal_update(u64 current_time) void h83048_device::device_start() { h8h_device::device_start(); + save_item(NAME(m_syscr)); } void h83048_device::device_reset() diff --git a/src/devices/cpu/h8/h8s2245.cpp b/src/devices/cpu/h8/h8s2245.cpp index 90059698b7b..fe93cbca226 100644 --- a/src/devices/cpu/h8/h8s2245.cpp +++ b/src/devices/cpu/h8/h8s2245.cpp @@ -304,6 +304,9 @@ void h8s2245_device::device_start() { h8s2000_device::device_start(); m_dtc_device = m_dtc; + + save_item(NAME(m_syscr)); + save_item(NAME(m_mstpcr)); } void h8s2245_device::device_reset() diff --git a/src/devices/cpu/h8/h8s2320.cpp b/src/devices/cpu/h8/h8s2320.cpp index c329c0950cb..b853310a79e 100644 --- a/src/devices/cpu/h8/h8s2320.cpp +++ b/src/devices/cpu/h8/h8s2320.cpp @@ -440,6 +440,8 @@ void h8s2320_device::device_start() h8s2000_device::device_start(); m_dma_device = m_dma; m_dtc_device = m_dtc; + + save_item(NAME(m_syscr)); } void h8s2320_device::device_reset() diff --git a/src/devices/cpu/h8/h8s2357.cpp b/src/devices/cpu/h8/h8s2357.cpp index 8e8943dd8c0..b8378575c84 100644 --- a/src/devices/cpu/h8/h8s2357.cpp +++ b/src/devices/cpu/h8/h8s2357.cpp @@ -398,6 +398,7 @@ void h8s2357_device::internal_update(u64 current_time) void h8s2357_device::device_start() { h8s2000_device::device_start(); + save_item(NAME(m_syscr)); } void h8s2357_device::device_reset() diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp index b04ab8f74b8..54a644ded06 100644 --- a/src/devices/cpu/h8/h8s2655.cpp +++ b/src/devices/cpu/h8/h8s2655.cpp @@ -411,6 +411,7 @@ void h8s2655_device::internal_update(u64 current_time) void h8s2655_device::device_start() { h8s2600_device::device_start(); + save_item(NAME(m_syscr)); } void h8s2655_device::device_reset() diff --git a/src/devices/cpu/h8/swx00.cpp b/src/devices/cpu/h8/swx00.cpp index 634fc7bab86..c65a10e301c 100644 --- a/src/devices/cpu/h8/swx00.cpp +++ b/src/devices/cpu/h8/swx00.cpp @@ -417,6 +417,7 @@ void swx00_device::internal_update(u64 current_time) void swx00_device::device_start() { h8s2000_device::device_start(); + save_item(NAME(m_syscr)); } void swx00_device::device_reset()