From: Toni Wilen Date: Mon, 15 Sep 2025 16:24:51 +0000 (+0300) Subject: CPU OSD shows STOP if CPU is stopped with IPL mask =7 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b4eedd14f820a51e81e85a481915260e689f31cb;p=francis%2Fwinuae.git CPU OSD shows STOP if CPU is stopped with IPL mask =7 --- diff --git a/include/gui.h b/include/gui.h index 12df39e3..4d6ffe85 100644 --- a/include/gui.h +++ b/include/gui.h @@ -71,6 +71,7 @@ struct gui_info uae_s8 md; /* CD32 or CDTV internal storage */ uae_s8 net; /* network */ int cpu_halted; + int cpu_stopped; int fps, lines, lace, idle; int fps_color; int sndbuf, sndbuf_status; diff --git a/newcpu.cpp b/newcpu.cpp index e80a1f4d..4e7030cf 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -2361,9 +2361,14 @@ void m68k_cancel_idle(void) static void m68k_set_stop(int stoptype) { - if (regs.stopped) + if (regs.stopped) { return; + } regs.stopped = stoptype; + if (regs.intmask == 7) { + gui_data.cpu_stopped = 1; + gui_led(LED_CPU, 0, -1); + } if (cpu_last_stop_vpos >= 0) { cpu_last_stop_vpos = vpos; } @@ -2372,6 +2377,10 @@ static void m68k_set_stop(int stoptype) static void m68k_unset_stop(void) { regs.stopped = 0; + if (gui_data.cpu_stopped) { + gui_data.cpu_stopped = 0; + gui_led(LED_CPU, 0, -1); + } if (cpu_last_stop_vpos >= 0) { cpu_stopped_lines += vpos - cpu_last_stop_vpos; cpu_last_stop_vpos = vpos; @@ -3540,8 +3549,9 @@ void NMI (void) static void cpu_halt_clear(void) { regs.halted = 0; - if (gui_data.cpu_halted) { + if (gui_data.cpu_halted || gui_data.cpu_stopped) { gui_data.cpu_halted = 0; + gui_data.cpu_stopped = 0; gui_led(LED_CPU, 0, -1); } } diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index ee7946e4..dfd02aa6 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -24149,11 +24149,11 @@ void gui_led (int led, int on, int brightness) m68label = _T("68k"); m68klabelchange = true; } - if (gui_data.cpu_halted < 0) { + if (gui_data.cpu_halted < 0 || gui_data.cpu_stopped) { if (!m68klabelchange) - _tcscpy(p, _T("STOP")); + _tcscpy(p, _T("CPU:STOP")); else - _tcscat(p, _T(" 68k: STOP")); + _tcscat(p, _T("68k: STOP")); } else { _stprintf(p, _T("%s: %.0f%%"), m68label, (double)((gui_data.idle) / 10.0)); } diff --git a/statusline.cpp b/statusline.cpp index 7cfd3f5a..7c848678 100644 --- a/statusline.cpp +++ b/statusline.cpp @@ -297,16 +297,17 @@ void draw_status_line_single(int monid, uae_u8 *buf, int y, int totalwidth, uae_ pos = 1; on_rgb = 0xcc0000; off_rgb = 0x111111; - if (gui_data.cpu_halted) { + if (gui_data.cpu_halted || gui_data.cpu_stopped) { idle = 0; - on = 1; if (gui_data.cpu_halted < 0) { + on = 1; on_rgb = 0x111111; num1 = 16; // PPC num2 = 16; num3 = 10; am = 3; - } else { + } else if (gui_data.cpu_halted > 0) { + on = 1; on_rgb = 0xcccc00; num1 = gui_data.cpu_halted >= 10 ? 11 : -1; num2 = gui_data.cpu_halted >= 10 ? (gui_data.cpu_halted / 10) % 10 : 11;