Merge pull request #8837 from Tilka/dsp

DSPSpy: fix register editing using GC pad on Wii
This commit is contained in:
Tilka 2020-05-31 22:21:14 +01:00 committed by GitHub
commit 4fc8674a7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 14 deletions

View file

@ -770,7 +770,6 @@ void movr(const UDSPInstruction opc)
break;
}
ax <<= 16;
ax &= ~0xffff;
ZeroWriteBackLog();

View file

@ -110,7 +110,7 @@ void addarn(const UDSPInstruction opc)
//----
// SBCLR #I
// 0001 0011 aaaa aiii
// 0001 0010 aaaa aiii
// bit of status register $sr. Bit number is calculated by adding 6 to
// immediate value I.
void sbclr(const UDSPInstruction opc)
@ -120,7 +120,7 @@ void sbclr(const UDSPInstruction opc)
}
// SBSET #I
// 0001 0010 aaaa aiii
// 0001 0011 aaaa aiii
// Set bit of status register $sr. Bit number is calculated by adding 6 to
// immediate value I.
void sbset(const UDSPInstruction opc)
@ -133,24 +133,24 @@ void sbset(const UDSPInstruction opc)
void srbith(const UDSPInstruction opc)
{
ZeroWriteBackLog();
switch ((opc >> 8) & 0xf)
switch ((opc >> 8) & 0x7)
{
case 0xa: // M2
case 2: // M2
g_dsp.r.sr &= ~SR_MUL_MODIFY;
break;
case 0xb: // M0
case 3: // M0
g_dsp.r.sr |= SR_MUL_MODIFY;
break;
case 0xc: // CLR15
case 4: // CLR15
g_dsp.r.sr &= ~SR_MUL_UNSIGNED;
break;
case 0xd: // SET15
case 5: // SET15
g_dsp.r.sr |= SR_MUL_UNSIGNED;
break;
case 0xe: // SET16 (CLR40)
case 6: // SET16 (CLR40)
g_dsp.r.sr &= ~SR_40_MODE_BIT;
break;
case 0xf: // SET40
case 7: // SET40
g_dsp.r.sr |= SR_40_MODE_BIT;
break;
default:

View file

@ -265,7 +265,7 @@ void ui_pad_sel(void)
ui_mode = UIM_EDIT_REG;
reg_value = &dspreg_in[cursor_reg];
}
#else
#endif
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
cursor_reg += 8;
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
@ -280,7 +280,6 @@ void ui_pad_sel(void)
ui_mode = UIM_EDIT_REG;
reg_value = &dspreg_in[cursor_reg];
}
#endif
}
void ui_pad_edit_reg(void)
@ -302,7 +301,7 @@ void ui_pad_edit_reg(void)
*reg_value = 0;
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_2)
*reg_value = 0xffff;
#else
#endif
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
small_cursor_x++;
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
@ -319,7 +318,6 @@ void ui_pad_edit_reg(void)
*reg_value = 0;
if (PAD_ButtonsDown(0) & PAD_BUTTON_Y)
*reg_value = 0xffff;
#endif
}
void handle_dsp_mail(void)