From fe6851a2d5fa2d0ea7ad21d9969bae6698f32505 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Wed, 4 Jul 2018 21:14:30 +0200 Subject: 68000: stop the cpu on recursive berr (nw) --- src/devices/cpu/m68000/m68kcpu.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 4d6f119b91c..d11eab56958 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -669,9 +669,14 @@ void m68000_base_device::postload() void m68000_base_device::m68k_cause_bus_error() { - uint32_t sr; + // Halt the cpu on berr when writing the stack frame. + if (m_run_mode == RUN_MODE_BERR_AERR_RESET) + { + m_stopped = STOP_LEVEL_HALT; + return; + } - sr = m68ki_init_exception(); + uint32_t sr = m68ki_init_exception(); m_run_mode = RUN_MODE_BERR_AERR_RESET; -- cgit v1.2.3