diff --git a/Source/Core/Core/DSP/Interpreter/DSPIntArithmetic.cpp b/Source/Core/Core/DSP/Interpreter/DSPIntArithmetic.cpp index ca2a562eac..54c36b449c 100644 --- a/Source/Core/Core/DSP/Interpreter/DSPIntArithmetic.cpp +++ b/Source/Core/Core/DSP/Interpreter/DSPIntArithmetic.cpp @@ -770,7 +770,6 @@ void movr(const UDSPInstruction opc) break; } ax <<= 16; - ax &= ~0xffff; ZeroWriteBackLog(); diff --git a/Source/Core/Core/DSP/Interpreter/DSPIntMisc.cpp b/Source/Core/Core/DSP/Interpreter/DSPIntMisc.cpp index bf30aa2312..2285aec37f 100644 --- a/Source/Core/Core/DSP/Interpreter/DSPIntMisc.cpp +++ b/Source/Core/Core/DSP/Interpreter/DSPIntMisc.cpp @@ -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: diff --git a/Source/DSPSpy/main_spy.cpp b/Source/DSPSpy/main_spy.cpp index 5be2598404..b5681a7857 100644 --- a/Source/DSPSpy/main_spy.cpp +++ b/Source/DSPSpy/main_spy.cpp @@ -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)