summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pelletier <plr.vincent@gmail.com>2022-09-26 13:43:08 +0000
committerVincent Pelletier <plr.vincent@gmail.com>2022-09-30 11:07:41 +0000
commit556d18f865a387ff11a3f052d9afc804d20cdf3e (patch)
tree5549ee8eeba15664d59202277ac0e414104d8909
parentd9cd819a76d4f1c171c47cdc81dc2ef7c0adb07f (diff)
DSPSpy: Unhide stack registers
The screen real-estate is already reserved, the values are dumped and restored by the on-DSP code, why not make something out of these values ? Allows following: - where exactly send_back was called from ($st1) - the boundaries and progress of the innermost BLOOP{,I} ($st0, 2 and 3) up to send_back's call
-rw-r--r--Source/DSPSpy/main_spy.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/DSPSpy/main_spy.cpp b/Source/DSPSpy/main_spy.cpp
index 89cf2d3ed7..bfff921e10 100644
--- a/Source/DSPSpy/main_spy.cpp
+++ b/Source/DSPSpy/main_spy.cpp
@@ -149,21 +149,17 @@ void print_reg_block(int x, int y, int sel, const u16* regs, const u16* compare_
{
for (int i = 0; i < 8; i++)
{
- // Do not even display the loop stack registers.
const int reg = j * 8 + i;
+ u8 color1 = regs[reg] == compare_regs[reg] ? CON_BRIGHT_WHITE : CON_BRIGHT_RED;
CON_SetColor(sel == reg ? CON_BRIGHT_YELLOW : CON_GREEN);
CON_Printf(x + j * 9, i + y, "%s ", reg_names[reg]);
- if (j != 1 || i < 4)
+ for (int k = 0; k < 4; k++)
{
- u8 color1 = regs[reg] == compare_regs[reg] ? CON_BRIGHT_WHITE : CON_BRIGHT_RED;
- for (int k = 0; k < 4; k++)
- {
- if (sel == reg && k == small_cursor_x && ui_mode == UIM_EDIT_REG)
- CON_SetColor(CON_BRIGHT_CYAN);
- else
- CON_SetColor(color1);
- CON_Printf(x + 4 + j * 9 + k, i + y, "%01x", (regs[reg] >> ((3 - k) * 4)) & 0xf);
- }
+ if (sel == reg && k == small_cursor_x && ui_mode == UIM_EDIT_REG)
+ CON_SetColor(CON_BRIGHT_CYAN);
+ else
+ CON_SetColor(color1);
+ CON_Printf(x + 4 + j * 9 + k, i + y, "%01x", (regs[reg] >> ((3 - k) * 4)) & 0xf);
}
}
}