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
This commit is contained in:
Vincent Pelletier 2022-09-26 13:43:08 +00:00
parent d9cd819a76
commit 556d18f865
1 changed files with 7 additions and 11 deletions

View File

@ -149,13 +149,10 @@ void print_reg_block(int x, int y, int sel, const u16* regs, const u16* compare_
{ {
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
// Do not even display the loop stack registers.
const int reg = j * 8 + i; 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_SetColor(sel == reg ? CON_BRIGHT_YELLOW : CON_GREEN);
CON_Printf(x + j * 9, i + y, "%s ", reg_names[reg]); CON_Printf(x + j * 9, i + y, "%s ", reg_names[reg]);
if (j != 1 || i < 4)
{
u8 color1 = regs[reg] == compare_regs[reg] ? CON_BRIGHT_WHITE : CON_BRIGHT_RED;
for (int k = 0; k < 4; k++) for (int k = 0; k < 4; k++)
{ {
if (sel == reg && k == small_cursor_x && ui_mode == UIM_EDIT_REG) if (sel == reg && k == small_cursor_x && ui_mode == UIM_EDIT_REG)
@ -166,7 +163,6 @@ void print_reg_block(int x, int y, int sel, const u16* regs, const u16* compare_
} }
} }
} }
}
CON_SetColor(CON_WHITE); CON_SetColor(CON_WHITE);
CON_Printf(x + 2, y + 9, "ACC0: %02x %04x %04x", regs[DSP_REG_ACH0] & 0xff, regs[DSP_REG_ACM0], CON_Printf(x + 2, y + 9, "ACC0: %02x %04x %04x", regs[DSP_REG_ACH0] & 0xff, regs[DSP_REG_ACM0],