From 9060f36ae80d5392ab83bb0745149349286a37aa Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 18 Mar 2024 19:19:33 +0100 Subject: h8: don't save the mode settings, move mac_saturating var to h8s2600 and hook it up --- src/devices/cpu/h8/h8.cpp | 5 ----- src/devices/cpu/h8/h8s2319.cpp | 1 + src/devices/cpu/h8/h8s2329.cpp | 2 +- src/devices/cpu/h8/h8s2600.cpp | 15 ++++++++++++++- src/devices/cpu/h8/h8s2600.h | 5 +++++ src/devices/cpu/h8/h8s2655.cpp | 10 +++++++++- src/devices/cpu/mb88xx/mb88xx.cpp | 2 +- 7 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp index 010205f6cda..0b5c9cb0a10 100644 --- a/src/devices/cpu/h8/h8.cpp +++ b/src/devices/cpu/h8/h8.cpp @@ -48,7 +48,6 @@ h8_device::h8_device(const machine_config &mconfig, device_type type, const char m_mode_a20 = false; m_has_exr = false; m_has_mac = false; - m_mac_saturating = false; m_has_trace = false; m_has_hc = true; nvram_enable_backup(false); // disable nvram by default @@ -164,10 +163,6 @@ void h8_device::device_start() save_item(NAME(m_TMP2)); save_item(NAME(m_TMPR)); - save_item(NAME(m_mode_advanced)); - save_item(NAME(m_mode_a20)); - save_item(NAME(m_mac_saturating)); - save_item(NAME(m_inst_state)); save_item(NAME(m_inst_substate)); save_item(NAME(m_requested_state)); diff --git a/src/devices/cpu/h8/h8s2319.cpp b/src/devices/cpu/h8/h8s2319.cpp index 480c7deed89..2f302f43255 100644 --- a/src/devices/cpu/h8/h8s2319.cpp +++ b/src/devices/cpu/h8/h8s2319.cpp @@ -460,6 +460,7 @@ void h8s2319_device::syscr_w(u8 data) // NMIEG m_intc->set_nmi_edge(BIT(data, 3)); + // INTM0/1 m_syscr = data; update_irq_filter(); } diff --git a/src/devices/cpu/h8/h8s2329.cpp b/src/devices/cpu/h8/h8s2329.cpp index 711df3fa601..ab2003f3443 100644 --- a/src/devices/cpu/h8/h8s2329.cpp +++ b/src/devices/cpu/h8/h8s2329.cpp @@ -174,6 +174,6 @@ void h8s2320_device::execute_set_input(int inputnum, int state) void h8s2320_device::device_start() { - h8s2319_device::device_start(); + h8s2321_device::device_start(); m_dma_device = m_dma; } diff --git a/src/devices/cpu/h8/h8s2600.cpp b/src/devices/cpu/h8/h8s2600.cpp index 62a041a5ca1..07b187aa700 100644 --- a/src/devices/cpu/h8/h8s2600.cpp +++ b/src/devices/cpu/h8/h8s2600.cpp @@ -5,7 +5,8 @@ #include "h8s2600d.h" h8s2600_device::h8s2600_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map_delegate) : - h8s2000_device(mconfig, type, tag, owner, clock, map_delegate) + h8s2000_device(mconfig, type, tag, owner, clock, map_delegate), + m_mac_saturating(false) { m_has_mac = true; } @@ -15,4 +16,16 @@ std::unique_ptr h8s2600_device::create_disassembler() return std::make_unique(); } +void h8s2600_device::device_start() +{ + h8s2000_device::device_start(); + save_item(NAME(m_mac_saturating)); +} + +void h8s2600_device::device_reset() +{ + h8s2000_device::device_reset(); + m_mac_saturating = false; +} + #include "cpu/h8/h8s2600.hxx" diff --git a/src/devices/cpu/h8/h8s2600.h b/src/devices/cpu/h8/h8s2600.h index 0673af58957..cb54f24d85a 100644 --- a/src/devices/cpu/h8/h8s2600.h +++ b/src/devices/cpu/h8/h8s2600.h @@ -24,9 +24,14 @@ protected: virtual std::unique_ptr create_disassembler() override; + virtual void device_start() override; + virtual void device_reset() override; + virtual void do_exec_full() override; virtual void do_exec_partial() override; + bool m_mac_saturating; + #define O(o) void o ## _full(); void o ## _partial() O(clrmac); O(ldmac_r32l_mach); O(ldmac_r32l_macl); diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp index ab4fb1fc8eb..6320b745421 100644 --- a/src/devices/cpu/h8/h8s2655.cpp +++ b/src/devices/cpu/h8/h8s2655.cpp @@ -442,7 +442,15 @@ u8 h8s2655_device::syscr_r() void h8s2655_device::syscr_w(u8 data) { + logerror("syscr = %02x\n", data); + + // NMIEG + m_intc->set_nmi_edge(BIT(data, 3)); + + // MACS + m_mac_saturating = bool(data & 0x80); + + // INTM0/1 m_syscr = data; update_irq_filter(); - logerror("syscr = %02x\n", data); } diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp index 24864c8248c..bf7f8b1e691 100644 --- a/src/devices/cpu/mb88xx/mb88xx.cpp +++ b/src/devices/cpu/mb88xx/mb88xx.cpp @@ -332,7 +332,7 @@ TIMER_CALLBACK_MEMBER(mb88_cpu_device::serial_timer) { m_SBcount++; - // if we get too many interrupts with no servicing, disable the timer until somebody does something */ + // if we get too many interrupts with no servicing, disable the timer until somebody does something if (m_SBcount >= SERIAL_DISABLE_THRESH) m_serial->adjust(attotime::never); -- cgit v1.2.3