DSP: updated condition code

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3099 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-04-28 09:12:29 +00:00
parent f852ea41c4
commit 1f4c000ae6
1 changed files with 4 additions and 5 deletions

View File

@ -89,9 +89,8 @@ int GetMultiplyModifier()
return 2;
}
inline bool isSign() {
return ((g_dsp.r[DSP_REG_SR] & 0x02) || (g_dsp.r[DSP_REG_SR] & 0x08));
return ((g_dsp.r[DSP_REG_SR] & 0x02) != (g_dsp.r[DSP_REG_SR] & 0x08));
}
inline bool isZero() {
@ -115,7 +114,7 @@ bool CheckCondition(u8 _Condition)
break;
case 0x2: // G - GREATER
if (! isSign() && ! isZero())
if (! isSign() || g_dsp.r[DSP_REG_SR] & SR_CARRY)
taken = true;
break;
@ -137,12 +136,12 @@ bool CheckCondition(u8 _Condition)
break;
case 0x6: // L - LESS
if (isSign())
if (g_dsp.r[DSP_REG_SR] & 0x02)
taken = true;
break;
case 0x7: // GE - GREATER EQUAL
if (! isSign() || isZero())
if (g_dsp.r[DSP_REG_SR] & SR_CARRY)
taken = true;
break;