mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-10-08 08:33:28 +00:00
Merge pull request #8837 from Tilka/dsp
DSPSpy: fix register editing using GC pad on Wii
This commit is contained in:
commit
4fc8674a7a
@ -770,7 +770,6 @@ void movr(const UDSPInstruction opc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ax <<= 16;
|
ax <<= 16;
|
||||||
ax &= ~0xffff;
|
|
||||||
|
|
||||||
ZeroWriteBackLog();
|
ZeroWriteBackLog();
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ void addarn(const UDSPInstruction opc)
|
|||||||
//----
|
//----
|
||||||
|
|
||||||
// SBCLR #I
|
// SBCLR #I
|
||||||
// 0001 0011 aaaa aiii
|
// 0001 0010 aaaa aiii
|
||||||
// bit of status register $sr. Bit number is calculated by adding 6 to
|
// bit of status register $sr. Bit number is calculated by adding 6 to
|
||||||
// immediate value I.
|
// immediate value I.
|
||||||
void sbclr(const UDSPInstruction opc)
|
void sbclr(const UDSPInstruction opc)
|
||||||
@ -120,7 +120,7 @@ void sbclr(const UDSPInstruction opc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SBSET #I
|
// SBSET #I
|
||||||
// 0001 0010 aaaa aiii
|
// 0001 0011 aaaa aiii
|
||||||
// Set bit of status register $sr. Bit number is calculated by adding 6 to
|
// Set bit of status register $sr. Bit number is calculated by adding 6 to
|
||||||
// immediate value I.
|
// immediate value I.
|
||||||
void sbset(const UDSPInstruction opc)
|
void sbset(const UDSPInstruction opc)
|
||||||
@ -133,24 +133,24 @@ void sbset(const UDSPInstruction opc)
|
|||||||
void srbith(const UDSPInstruction opc)
|
void srbith(const UDSPInstruction opc)
|
||||||
{
|
{
|
||||||
ZeroWriteBackLog();
|
ZeroWriteBackLog();
|
||||||
switch ((opc >> 8) & 0xf)
|
switch ((opc >> 8) & 0x7)
|
||||||
{
|
{
|
||||||
case 0xa: // M2
|
case 2: // M2
|
||||||
g_dsp.r.sr &= ~SR_MUL_MODIFY;
|
g_dsp.r.sr &= ~SR_MUL_MODIFY;
|
||||||
break;
|
break;
|
||||||
case 0xb: // M0
|
case 3: // M0
|
||||||
g_dsp.r.sr |= SR_MUL_MODIFY;
|
g_dsp.r.sr |= SR_MUL_MODIFY;
|
||||||
break;
|
break;
|
||||||
case 0xc: // CLR15
|
case 4: // CLR15
|
||||||
g_dsp.r.sr &= ~SR_MUL_UNSIGNED;
|
g_dsp.r.sr &= ~SR_MUL_UNSIGNED;
|
||||||
break;
|
break;
|
||||||
case 0xd: // SET15
|
case 5: // SET15
|
||||||
g_dsp.r.sr |= SR_MUL_UNSIGNED;
|
g_dsp.r.sr |= SR_MUL_UNSIGNED;
|
||||||
break;
|
break;
|
||||||
case 0xe: // SET16 (CLR40)
|
case 6: // SET16 (CLR40)
|
||||||
g_dsp.r.sr &= ~SR_40_MODE_BIT;
|
g_dsp.r.sr &= ~SR_40_MODE_BIT;
|
||||||
break;
|
break;
|
||||||
case 0xf: // SET40
|
case 7: // SET40
|
||||||
g_dsp.r.sr |= SR_40_MODE_BIT;
|
g_dsp.r.sr |= SR_40_MODE_BIT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -265,7 +265,7 @@ void ui_pad_sel(void)
|
|||||||
ui_mode = UIM_EDIT_REG;
|
ui_mode = UIM_EDIT_REG;
|
||||||
reg_value = &dspreg_in[cursor_reg];
|
reg_value = &dspreg_in[cursor_reg];
|
||||||
}
|
}
|
||||||
#else
|
#endif
|
||||||
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
||||||
cursor_reg += 8;
|
cursor_reg += 8;
|
||||||
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
||||||
@ -280,7 +280,6 @@ void ui_pad_sel(void)
|
|||||||
ui_mode = UIM_EDIT_REG;
|
ui_mode = UIM_EDIT_REG;
|
||||||
reg_value = &dspreg_in[cursor_reg];
|
reg_value = &dspreg_in[cursor_reg];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ui_pad_edit_reg(void)
|
void ui_pad_edit_reg(void)
|
||||||
@ -302,7 +301,7 @@ void ui_pad_edit_reg(void)
|
|||||||
*reg_value = 0;
|
*reg_value = 0;
|
||||||
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_2)
|
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_2)
|
||||||
*reg_value = 0xffff;
|
*reg_value = 0xffff;
|
||||||
#else
|
#endif
|
||||||
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_RIGHT)
|
||||||
small_cursor_x++;
|
small_cursor_x++;
|
||||||
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_LEFT)
|
||||||
@ -319,7 +318,6 @@ void ui_pad_edit_reg(void)
|
|||||||
*reg_value = 0;
|
*reg_value = 0;
|
||||||
if (PAD_ButtonsDown(0) & PAD_BUTTON_Y)
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_Y)
|
||||||
*reg_value = 0xffff;
|
*reg_value = 0xffff;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_dsp_mail(void)
|
void handle_dsp_mail(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user