]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
CPU OSD shows STOP if CPU is stopped with IPL mask =7
authorToni Wilen <twilen@winuae.net>
Mon, 15 Sep 2025 16:24:51 +0000 (19:24 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 15 Sep 2025 16:24:51 +0000 (19:24 +0300)
include/gui.h
newcpu.cpp
od-win32/win32gui.cpp
statusline.cpp

index 12df39e38db5e75b81a54760d1264108cecc6601..4d6ffe85a68cbe516cc58de02bb886aa8a0e4765 100644 (file)
@@ -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;
index e80a1f4dc403a2b0cd3797d4e615091fa3b98b22..4e7030cfc5729f351ee0eec50f63e4d3fbe5a93a 100644 (file)
@@ -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);
        }
 }
index ee7946e4f8904f9adac30d6b5d382c76e00bbe81..dfd02aa63455f48510810139832ed226be9e1e2b 100644 (file)
@@ -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));
                }
index 7cfd3f5abd9a2580a537fe81801314147efcfab9..7c848678e52aba79b3b7ea1273fc60885c0c382d 100644 (file)
@@ -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;