diff options
author | notaz | 2011-02-05 00:09:39 +0200 |
---|---|---|
committer | notaz | 2011-02-05 00:21:36 +0200 |
commit | 7384197d8a5fd20a4d94f3517a6462f7fe86dd4c (patch) | |
tree | c42031e9519edca8e6f3966b22f77a95630e5115 | |
parent | 916a765bb0a5516ce681c83f479c668b0ef8473f (diff) | |
download | pcsx_rearmed-7384197d8a5fd20a4d94f3517a6462f7fe86dd4c.tar.gz pcsx_rearmed-7384197d8a5fd20a4d94f3517a6462f7fe86dd4c.tar.bz2 pcsx_rearmed-7384197d8a5fd20a4d94f3517a6462f7fe86dd4c.zip |
gte: backport fixes from pcsxr
shalma:
Lego Racers - gte.c
- fix mfc2 r30 (and r29)
- fixes main menu loading
Motor Toon Grand Prix 2 - gte.c
- repair mtc2 - r7,r29
- fixes disappearing objects
Valkyrie Profile - gte.c
- use edgbla value of limH $1000
- fixes world map loading
- seems to work, unverified value
Tales of Destiny 2 - gte.c
- repair SQR - IR output
- fixes underwater lighting
-rw-r--r-- | libpcsxcore/gte.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libpcsxcore/gte.c b/libpcsxcore/gte.c index 00e7954..ec173b5 100644 --- a/libpcsxcore/gte.c +++ b/libpcsxcore/gte.c @@ -211,7 +211,7 @@ static inline u32 limE(u32 result) { #define F(a) BOUNDS((a), 0x7fffffff, (1 << 31) | (1 << 16), -(s64)0x80000000, (1 << 31) | (1 << 15)) #define limG1(a) LIM((a), 0x3ff, -0x400, (1 << 31) | (1 << 14)) #define limG2(a) LIM((a), 0x3ff, -0x400, (1 << 31) | (1 << 13)) -#define limH(a) LIM((a), 0xfff, 0x000, (1 << 12)) +#define limH(a) LIM((a), 0x1000, 0x0000, (1 << 12)) #include "gte_divider.h" @@ -240,9 +240,6 @@ static inline u32 MFC2(int reg) { break; case 28: - case 30: - return 0; - case 29: psxRegs.CP2D.r[reg] = LIM(gteIR1 >> 7, 0x1f, 0, 0) | (LIM(gteIR2 >> 7, 0x1f, 0, 0) << 5) | @@ -289,8 +286,6 @@ static inline void MTC2(u32 value, int reg) { } break; - case 7: - case 29: case 31: return; @@ -483,9 +478,9 @@ void gteSQR() { gteMAC1 = A1((gteIR1 * gteIR1) >> shift); gteMAC2 = A2((gteIR2 * gteIR2) >> shift); gteMAC3 = A3((gteIR3 * gteIR3) >> shift); - gteIR1 = limB1(gteMAC1 >> shift, lm); - gteIR2 = limB2(gteMAC2 >> shift, lm); - gteIR3 = limB3(gteMAC3 >> shift, lm); + gteIR1 = limB1(gteMAC1, lm); + gteIR2 = limB2(gteMAC2, lm); + gteIR3 = limB3(gteMAC3, lm); } void gteNCCS() { |