microVU: Implemented 'extra' clamp mode (it was doing the same as 'normal' before)

Note:
What extra clamp mode does is whenever an SSE ADD/SUB/MUL/DIV instruction is used in mVU, it will have its operands clamped.
Currently seems to cause sps in some games instead of fixing it...
There might be some reason for it that I'm not aware of yet, or it could be 'random' based on what a game is doing.

A quick explanation of what mVU's clamp modes do:
None   - Does no clamping (fast)
Normal - Clamp certain instructions which have proven to fix games
Extra  - Clamps every SSE instruction (slow)
Extra + Preserve Sign - Same as extra but preserves sign of the NaN (super slow)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2313 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-12-05 09:30:38 +00:00
parent cbc4ee26f6
commit 3fcd2c9aee
2 changed files with 6 additions and 15 deletions

View File

@ -197,16 +197,7 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
#define aWrap(x, m) ((x > m) ? 0 : x) #define aWrap(x, m) ((x > m) ? 0 : x)
#define shuffleSS(x) ((x==1)?(0x27):((x==2)?(0xc6):((x==4)?(0xe1):(0xe4)))) #define shuffleSS(x) ((x==1)?(0x27):((x==2)?(0xc6):((x==4)?(0xe1):(0xe4))))
#define _1mb (0x100000) #define _1mb (0x100000)
#define clampE CHECK_VU_EXTRA_OVERFLOW
//#undef CHECK_VU_OVERFLOW
//#undef CHECK_VU_EXTRA_OVERFLOW
//#undef CHECK_VU_SIGN_OVERFLOW
//#undef CHECK_VU_UNDERFLOW
//#define CHECK_VU_OVERFLOW 1
//#define CHECK_VU_EXTRA_OVERFLOW 1
//#define CHECK_VU_SIGN_OVERFLOW 1
//#define CHECK_VU_UNDERFLOW 1
#define clampE 0//CHECK_VU_EXTRA_OVERFLOW
// Flag Info // Flag Info
#define __Status (mVUregs.needExactMatch & 1) #define __Status (mVUregs.needExactMatch & 1)

View File

@ -456,10 +456,10 @@ void ADD_SS(microVU* mVU, int to, int from, int t1, int t2) {
} }
#define clampOp(opX) { \ #define clampOp(opX) { \
/*mVUclamp3(mVU, to, t1, 0xf);*/ \ mVUclamp3(mVU, to, t1, 0xf); \
/*mVUclamp3(mVU, from, t1, 0xf);*/ \ mVUclamp3(mVU, from, t1, 0xf); \
opX(to, from); \ opX(to, from); \
/*mVUclamp4(to, t1, 0xf);*/ \ mVUclamp4(to, t1, 0xf); \
} }
void SSE_MAXPS(mV, int to, int from, int t1 = -1, int t2 = -1) { void SSE_MAXPS(mV, int to, int from, int t1 = -1, int t2 = -1) {