From e09d2abdffe78959839e3fcf2b180e3907443a3c Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Fri, 11 Dec 2020 02:31:35 -0500 Subject: [PATCH] Show the SR value as a readable form in the CPU browser --- docs/vj_HistoryNotes.txt | 1 + src/gui/debug/cpubrowser.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index 7af64fc..300badd 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -24,6 +24,7 @@ Release 5 (TBA) 16) Work around fix for a compilation error on Linux -- EEPROM directory creation allowed only for Windows at the moment 17) Project has switched to libdwarf 20201201 library 64bits for VS 2017 +18) Show the SR value as a readable form in the CPU browser Release 4a (15th August 2019) ----------------------------- diff --git a/src/gui/debug/cpubrowser.cpp b/src/gui/debug/cpubrowser.cpp index a2c9c8e..a394f97 100644 --- a/src/gui/debug/cpubrowser.cpp +++ b/src/gui/debug/cpubrowser.cpp @@ -71,7 +71,7 @@ void CPUBrowserWindow::RefreshContents(void) // 68K uint32_t m68kPC = m68k_get_reg(NULL, M68K_REG_PC); uint32_t m68kSR = m68k_get_reg(NULL, M68K_REG_SR); - sprintf(string, "PC: %06X  SR: %04X

", m68kPC, m68kSR); + sprintf(string, "PC: %06X  SR: %04X : %c%c%c%c%c%c%c

", m68kPC, m68kSR, ((m68kSR & 0x8000) ? 'T': '-'), ((m68kSR & 0x2000) ? 'S' : '-'), ((m68kSR & 0x10) ? 'X' : '-'), ((m68kSR & 0x8) ? 'N' : '-'), ((m68kSR & 0x4) ? 'Z' : '-'), ((m68kSR & 0x2) ? 'V' : '-'), ((m68kSR & 0x1) ? 'C' : '-')); s += QString(string); /* SR format: -- 2.20.1