Show the SR value as a readable form in the CPU browser
authorJean-Paul Mari <djipi.mari@gmail.com>
Fri, 11 Dec 2020 07:31:35 +0000 (02:31 -0500)
committerJean-Paul Mari <djipi.mari@gmail.com>
Fri, 11 Dec 2020 07:31:35 +0000 (02:31 -0500)
docs/vj_HistoryNotes.txt
src/gui/debug/cpubrowser.cpp

index 7af64fc..300badd 100644 (file)
@@ -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
 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)
 -----------------------------
 
 Release 4a (15th August 2019)
 -----------------------------
index a2c9c8e..a394f97 100644 (file)
@@ -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);
                // 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&nbsp;&nbsp;SR: %04X<br><br>", m68kPC, m68kSR);
+               sprintf(string, "PC: %06X&nbsp;&nbsp;SR: %04X : %c%c%c%c%c%c%c<br><br>", 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:
                s += QString(string);
                /*
                SR format: