Added hacks to VU interpreters, only accessible via source. Note: these hacks are more like a reference, they help show what makes interpreters so slow. Most games break with these enabled, but my testing game is fine. Speedup in it is about 30%.

Note2: I'll remove these hacks, once interpreters are fast enough.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@123 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
ramapcsx2 2008-09-15 08:01:11 +00:00 committed by Gregory Hainaut
parent 79d632c69b
commit 8edd66c662
4 changed files with 19 additions and 1 deletions

View File

@ -36,6 +36,10 @@
#define REG_VPU_STAT 29
#define REG_CMSAR1 31
//interpreter hacks, WIP
//#define INT_VUSTALLHACK //some games work without those, big speedup
//#define INT_VUDOUBLEHACK
enum VUStatus {
VU_Ready = 0,
VU_Run = 1,

View File

@ -273,7 +273,9 @@ void _vu0Exec(VURegs* VU) {
VU->code = ptr[1];
VU0regs_UPPER_OPCODE[VU->code & 0x3f](&uregs);
#ifndef INT_VUSTALLHACK
_vuTestUpperStalls(VU, &uregs);
#endif
/* check upper flags */
if (ptr[1] & 0x80000000) { /* I flag */
@ -284,7 +286,9 @@ void _vu0Exec(VURegs* VU) {
} else {
VU->code = ptr[0];
VU0regs_LOWER_OPCODE[VU->code >> 25](&lregs);
#ifndef INT_VUSTALLHACK
_vuTestLowerStalls(VU, &lregs);
#endif
vu0branch = lregs.pipe == VUPIPE_BRANCH;

View File

@ -235,7 +235,9 @@ void _vu1Exec(VURegs* VU) {
VU->code = ptr[1];
VU1regs_UPPER_OPCODE[VU->code & 0x3f](&uregs);
#ifndef INT_VUSTALLHACK
_vuTestUpperStalls(VU, &uregs);
#endif
/* check upper flags */
if (ptr[1] & 0x80000000) { /* I flag */
@ -245,7 +247,9 @@ void _vu1Exec(VURegs* VU) {
} else {
VU->code = ptr[0];
VU1regs_LOWER_OPCODE[VU->code >> 25](&lregs);
#ifndef INT_VUSTALLHACK
_vuTestLowerStalls(VU, &lregs);
#endif
vu1branch = lregs.pipe == VUPIPE_BRANCH;

View File

@ -330,8 +330,8 @@ void _vuAddLowerStalls(VURegs * VU, _VURegsNum *VUregsn) {
/******************************/
/* VU Upper instructions */
/******************************/
#ifndef INT_VUDOUBLEHACK
static u32 d;
float vuDouble(u32 f)
{
switch(f & 0x7f800000){
@ -348,6 +348,12 @@ float vuDouble(u32 f)
break;
}
}
#else
float vuDouble(u32 f)
{
return *(float*)&f;
}
#endif
void _vuABS(VURegs * VU) {
if (_Ft_ == 0) return;