GregMiscellaneous: Some cleanup. Convert boolean function to bool.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3670 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2010-08-20 10:01:38 +00:00
parent c84d820c35
commit c394c408d0
2 changed files with 89 additions and 282 deletions

View File

@ -25,413 +25,281 @@
#include "ZZoglFlushHack.h" #include "ZZoglFlushHack.h"
// GSC_... function has imported from GSdx // GSC_... function has been imported from GSdx
bool GSC_Null(const GSFrameInfo& fi, int& skip) void GSC_Okami(const GSFrameInfo& fi, int& skip)
{
//ZZLog::Error_Log("GSC_Null");
return true;
}
bool GSC_Okami(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32)
{
skip = 1000; skip = 1000;
}
} }
else else
{ {
if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMT4) if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMT4)
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip) void GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT24) if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT24)
{
skip = 1000; // 76, 79 skip = 1000; // 76, 79
}
else if(fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT32) else if(fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT32)
{
skip = 1000; // 69 skip = 1000; // 69
}
} }
else else
{ {
if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01000) && fi.FPSM == PSMCT32) if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01000) && fi.FPSM == PSMCT32)
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_DBZBT2(const GSFrameInfo& fi, int& skip) void GSC_DBZBT2(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && /*fi.FBP == 0x00000 && fi.FPSM == PSMCT16 &&*/ fi.TBP0 == 0x02000 && fi.TPSM == PSMT16Z) if(fi.TME && /*fi.FBP == 0x00000 && fi.FPSM == PSMCT16 &&*/ fi.TBP0 == 0x02000 && fi.TPSM == PSMT16Z)
{
skip = 27; skip = 27;
}
else if(!fi.TME && fi.FBP == 0x03000 && fi.FPSM == PSMCT16) else if(!fi.TME && fi.FBP == 0x03000 && fi.FPSM == PSMCT16)
{
skip = 10; skip = 10;
}
} }
return true;
} }
bool GSC_DBZBT3(const GSFrameInfo& fi, int& skip) void GSC_DBZBT3(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00) && fi.TPSM == PSMT8H) if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00) && fi.TPSM == PSMT8H)
{
skip = 24; // blur skip = 24; // blur
}
else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8H) else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8H)
{
skip = 28; // outline skip = 28; // outline
}
} }
return true;
} }
bool GSC_SFEX3(const GSFrameInfo& fi, int& skip) void GSC_SFEX3(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x00500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00f00 && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x00500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00f00 && fi.TPSM == PSMCT16)
{
skip = 2; // blur skip = 2; // blur
}
} }
return true;
} }
bool GSC_Bully(const GSFrameInfo& fi, int& skip) void GSC_Bully(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) // Test is useless !
{ // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM)
return false; // allowed // return; // allowed
}
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT16S && fi.TBP0 == 0x02300 && fi.TPSM == PSMT16SZ) if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT16S && fi.TBP0 == 0x02300 && fi.TPSM == PSMT16SZ)
{
skip = 6; skip = 6;
}
} }
else else
{ {
if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT32) if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT32)
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_BullyCC(const GSFrameInfo& fi, int& skip) void GSC_BullyCC(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) // Test is useless !
{ // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM)
return false; // allowed // return; // allowed
}
if(!fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24) if(!fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24)
{
skip = 9; skip = 9;
}
} }
return true;
} }
bool GSC_SoTC(const GSFrameInfo& fi, int& skip) void GSC_SoTC(const GSFrameInfo& fi, int& skip)
{ {
// Not needed anymore? What did it fix anyway? (rama) // Not needed anymore? What did it fix anyway? (rama)
/*if(skip == 0) /*if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02b80 && fi.FPSM == PSMCT24 && fi.TBP0 == 0x01e80 && fi.TPSM == PSMCT24) if(fi.TME && fi.FBP == 0x02b80 && fi.FPSM == PSMCT24 && fi.TBP0 == 0x01e80 && fi.TPSM == PSMCT24)
{
skip = 9; skip = 9;
}
else if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMCT32) else if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMCT32)
{
skip = 8; skip = 8;
}
else if(fi.TME && fi.FBP == 0x01e80 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03880 && fi.TPSM == PSMCT32) else if(fi.TME && fi.FBP == 0x01e80 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03880 && fi.TPSM == PSMCT32)
{
skip = 8; skip = 8;
}
}*/ }*/
return true;
} }
bool GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip) void GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16)
{
skip = 4; skip = 4;
}
} }
return true;
} }
bool GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip) void GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16)
{
skip = 4; skip = 4;
}
} }
return true;
} }
bool GSC_ICO(const GSFrameInfo& fi, int& skip) void GSC_ICO(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03d00 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03d00 && fi.TPSM == PSMCT32)
{
skip = 3; skip = 3;
}
else if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02800 && fi.TPSM == PSMT8H) else if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02800 && fi.TPSM == PSMT8H)
{
skip = 1; skip = 1;
}
} }
else else
{ {
if(fi.TME && fi.TBP0 == 0x00800 && fi.TPSM == PSMCT32) if(fi.TME && fi.TBP0 == 0x00800 && fi.TPSM == PSMCT32)
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_GT4(const GSFrameInfo& fi, int& skip) void GSC_GT4(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && (fi.FBP == 0x03440 || fi.FBP >= 0x03e00) && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01400) && fi.TPSM == PSMT8) if(fi.TME && (fi.FBP == 0x03440 || fi.FBP >= 0x03e00) && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01400) && fi.TPSM == PSMT8)
{
skip = 880; skip = 880;
}
else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01400) && fi.FPSM == PSMCT24 && fi.TBP0 >= 0x03420 && fi.TPSM == PSMT8) else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01400) && fi.FPSM == PSMCT24 && fi.TBP0 >= 0x03420 && fi.TPSM == PSMT8)
{ {
// TODO: removes gfx from where it is not supposed to (garage) // TODO: removes gfx from where it is not supposed to (garage)
// skip = 58; // skip = 58;
} }
} }
return true;
} }
bool GSC_WildArms4(const GSFrameInfo& fi, int& skip) void GSC_WildArms4(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z) if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z)
{
skip = 100; skip = 100;
}
} }
else else
{ {
if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32)
{
skip = 1; skip = 1;
}
} }
return true;
} }
bool GSC_WildArms5(const GSFrameInfo& fi, int& skip) void GSC_WildArms5(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z) if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z)
{
skip = 100; skip = 100;
}
} }
else else
{ {
if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32)
{
skip = 1; skip = 1;
}
} }
return true;
} }
bool GSC_Manhunt2(const GSFrameInfo& fi, int& skip) void GSC_Manhunt2(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x03c20 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01400 && fi.TPSM == PSMT8) if(fi.TME && fi.FBP == 0x03c20 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01400 && fi.TPSM == PSMT8)
{
skip = 640; skip = 640;
}
} }
return true;
} }
bool GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip) void GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00a00) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) // Test is useless !
{ // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00a00) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM)
return false; // allowed // return false; // allowed
}
if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01400 && fi.TPSM == PSMT24Z) if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01400 && fi.TPSM == PSMT24Z)
{
skip = 41; skip = 41;
}
} }
else else
{ {
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03c00 && fi.TPSM == PSMCT32) if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03c00 && fi.TPSM == PSMCT32)
{
skip = 0; skip = 0;
}
else if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00)) else if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00))
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip) void GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT24Z) if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT24Z)
{
skip = 176; skip = 176;
}
} }
return true;
} }
bool GSC_Spartan(const GSFrameInfo& fi, int& skip) void GSC_Spartan(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32)
{
skip = 107; skip = 107;
}
} }
return true;
} }
bool GSC_AceCombat4(const GSFrameInfo& fi, int& skip) void GSC_AceCombat4(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02a00 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01600 && fi.TPSM == PSMT24Z) if(fi.TME && fi.FBP == 0x02a00 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01600 && fi.TPSM == PSMT24Z)
{
skip = 71; // clouds (z, 16-bit) skip = 71; // clouds (z, 16-bit)
}
else if(fi.TME && fi.FBP == 0x02900 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT24) else if(fi.TME && fi.FBP == 0x02900 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT24)
{
skip = 28; // blur skip = 28; // blur
}
} }
return true;
} }
bool GSC_Drakengard2(const GSFrameInfo& fi, int& skip) void GSC_Drakengard2(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x026c0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00a00 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x026c0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00a00 && fi.TPSM == PSMCT32)
{
skip = 64; skip = 64;
}
} }
return true;
} }
bool GSC_Tekken5(const GSFrameInfo& fi, int& skip) void GSC_Tekken5(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02ea0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) if(fi.TME && fi.FBP == 0x02ea0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32)
{
skip = 95; skip = 95;
}
} }
return true;
} }
bool GSC_IkkiTousen(const GSFrameInfo& fi, int& skip) void GSC_IkkiTousen(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x00a80 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z) if(fi.TME && fi.FBP == 0x00a80 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z)
{
skip = 1000; // shadow (result is broken without depth copy, also includes 16 bit) skip = 1000; // shadow (result is broken without depth copy, also includes 16 bit)
}
else if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z) else if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z)
{
skip = 11; // blur skip = 11; // blur
}
} }
else if(skip > 7) else if(skip > 7)
{ {
if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00700 && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00700 && fi.TPSM == PSMCT16)
{
skip = 7; // the last steps of shadow drawing skip = 7; // the last steps of shadow drawing
}
} }
return true;
} }
bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip) void GSC_GodOfWar(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
@ -441,184 +309,124 @@ bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip)
skip = 23; // 23 or 4 need more testing skip = 23; // 23 or 4 need more testing
} }
else if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32 && fi.FBMSK == 0xff000000) else if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32 && fi.FBMSK == 0xff000000)
{
skip = 1; // blur skip = 1; // blur
} else if(fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8
else if(fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8 && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000))) && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000)))
{
skip = 1; // wall of fog skip = 1; // wall of fog
}
} }
return true;
} }
bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip) void GSC_GodOfWar2(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME) if(fi.TME)
{ {
if((fi.FBP == 0x00100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00100 && fi.TPSM == PSMCT16) // ntsc if((fi.FBP == 0x00100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00100 && fi.TPSM == PSMCT16) // ntsc
|| (fi.FBP == 0x02100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02100 && fi.TPSM == PSMCT16)) // pal || (fi.FBP == 0x02100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02100 && fi.TPSM == PSMCT16)) // pal
{ skip = 29; // shadows
skip = 29; // shadows if(fi.FBP == 0x00100 && fi.FPSM == PSMCT32 && (fi.TBP0 & 0x03000) == 0x03000
} && (fi.TPSM == PSMT8 || fi.TPSM == PSMT4)
if(fi.FBP == 0x00100 && fi.FPSM == PSMCT32 && (fi.TBP0 & 0x03000) == 0x03000 && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000)))
&& (fi.TPSM == PSMT8 || fi.TPSM == PSMT4) skip = 1; // wall of fog
&& ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000))){ }
skip = 1; // wall of fog
}
}
} }
return true;
} }
bool GSC_GiTS(const GSFrameInfo& fi, int& skip) void GSC_GiTS(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x01400 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02e40 && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x01400 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02e40 && fi.TPSM == PSMCT16)
{
skip = 1315; skip = 1315;
}
} }
else
{
}
return true;
} }
bool GSC_Onimusha3(const GSFrameInfo& fi, int& skip) void GSC_Onimusha3(const GSFrameInfo& fi, int& skip)
{ {
if(fi.TME /*&& (fi.FBP == 0x00000 || fi.FBP == 0x00700)*/ && (fi.TBP0 == 0x01180 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x01000 || fi.TBP0 == 0x01200) && (fi.TPSM == PSMCT32 || fi.TPSM == PSMCT24)) if(fi.TME /*&& (fi.FBP == 0x00000 || fi.FBP == 0x00700)*/ && (fi.TBP0 == 0x01180 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x01000 || fi.TBP0 == 0x01200) && (fi.TPSM == PSMCT32 || fi.TPSM == PSMCT24))
{
skip = 1; skip = 1;
}
return true;
} }
bool GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip) void GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT8) // copies the z buffer to the alpha channel of the fb if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT8) // copies the z buffer to the alpha channel of the fb
{
skip = 1000; skip = 1000;
}
else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && (fi.TBP0 == 0x03560 || fi.TBP0 == 0x038e0) && fi.TPSM == PSMCT32) else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && (fi.TBP0 == 0x03560 || fi.TBP0 == 0x038e0) && fi.TPSM == PSMCT32)
{
skip = 1; skip = 1;
}
} }
else else
{ {
if(fi.TME && fi.TPSM != PSMT8) if(fi.TME && fi.TPSM != PSMT8)
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip) void GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMCT16S && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT16) if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMCT16S && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT16)
{
skip = 1000; // shadow skip = 1000; // shadow
}
} }
else else
{ {
if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02200 && fi.TPSM == PSMCT16S) if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02200 && fi.TPSM == PSMCT16S)
{
skip = 2; skip = 2;
}
} }
return true;
} }
bool GSC_Genji(const GSFrameInfo& fi, int& skip) void GSC_Genji(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == 0x01500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00e00 && fi.TPSM == PSMT16Z) if(fi.TME && fi.FBP == 0x01500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00e00 && fi.TPSM == PSMT16Z)
{
skip = 6; // skip = 6; //
}
} }
else
{
}
return true;
} }
bool GSC_StarOcean3(const GSFrameInfo& fi, int& skip) void GSC_StarOcean3(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)
{
skip = 1000; // skip = 1000; //
}
} }
else else
{ {
if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH))
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip) void GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)
{
skip = 1000; // skip = 1000; //
}
} }
else else
{ {
if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH))
{
skip = 0; skip = 0;
}
} }
return true;
} }
bool GSC_RadiataStories(const GSFrameInfo& fi, int& skip) void GSC_RadiataStories(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
{ {
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)
{
skip = 1000; // skip = 1000; //
}
} }
else else
{ {
if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH))
{
skip = 0; skip = 0;
}
} }
return true;
} }
inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm) inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm)
@ -629,7 +437,7 @@ inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm)
return false; return false;
} }
bool IsBadFrame(ZeroGS::VB& curvb) __forceinline bool IsBadFrame(ZeroGS::VB& curvb)
{ {
GSFrameInfo fi; GSFrameInfo fi;
@ -642,8 +450,8 @@ bool IsBadFrame(ZeroGS::VB& curvb)
fi.TPSM = curvb.tex0.psm; fi.TPSM = curvb.tex0.psm;
fi.TZTST = curvb.test.ztst; fi.TZTST = curvb.test.ztst;
if (GetSkipCount_Handler && !GetSkipCount_Handler(fi, g_SkipFlushFrame)) if (GetSkipCount_Handler)
return false; GetSkipCount_Handler(fi, g_SkipFlushFrame);
if(g_SkipFlushFrame == 0 && (conf.SkipDraw > 0)) if(g_SkipFlushFrame == 0 && (conf.SkipDraw > 0))
{ {

View File

@ -42,43 +42,42 @@ struct GSFrameInfo
bool TME; bool TME;
}; };
typedef bool (*GetSkipCount)(const GSFrameInfo& fi, int& skip); typedef void (*GetSkipCount)(const GSFrameInfo& fi, int& skip);
extern GetSkipCount GetSkipCount_Handler; extern GetSkipCount GetSkipCount_Handler;
bool GSC_Null(const GSFrameInfo& fi, int& skip); void GSC_Okami(const GSFrameInfo& fi, int& skip);
bool GSC_Okami(const GSFrameInfo& fi, int& skip); void GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip);
bool GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip); void GSC_DBZBT2(const GSFrameInfo& fi, int& skip);
bool GSC_DBZBT2(const GSFrameInfo& fi, int& skip); void GSC_DBZBT3(const GSFrameInfo& fi, int& skip);
bool GSC_DBZBT3(const GSFrameInfo& fi, int& skip); void GSC_SFEX3(const GSFrameInfo& fi, int& skip);
bool GSC_SFEX3(const GSFrameInfo& fi, int& skip); void GSC_Bully(const GSFrameInfo& fi, int& skip);
bool GSC_Bully(const GSFrameInfo& fi, int& skip); void GSC_BullyCC(const GSFrameInfo& fi, int& skip);
bool GSC_BullyCC(const GSFrameInfo& fi, int& skip); void GSC_SoTC(const GSFrameInfo& fi, int& skip);
bool GSC_SoTC(const GSFrameInfo& fi, int& skip); void GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip);
bool GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip); void GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip);
bool GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip); void GSC_ICO(const GSFrameInfo& fi, int& skip);
bool GSC_ICO(const GSFrameInfo& fi, int& skip); void GSC_GT4(const GSFrameInfo& fi, int& skip);
bool GSC_GT4(const GSFrameInfo& fi, int& skip); void GSC_WildArms4(const GSFrameInfo& fi, int& skip);
bool GSC_WildArms4(const GSFrameInfo& fi, int& skip); void GSC_WildArms5(const GSFrameInfo& fi, int& skip);
bool GSC_WildArms5(const GSFrameInfo& fi, int& skip); void GSC_Manhunt2(const GSFrameInfo& fi, int& skip);
bool GSC_Manhunt2(const GSFrameInfo& fi, int& skip); void GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip);
bool GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip); void GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip);
bool GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip); void GSC_Spartan(const GSFrameInfo& fi, int& skip);
bool GSC_Spartan(const GSFrameInfo& fi, int& skip); void GSC_AceCombat4(const GSFrameInfo& fi, int& skip);
bool GSC_AceCombat4(const GSFrameInfo& fi, int& skip); void GSC_Drakengard2(const GSFrameInfo& fi, int& skip);
bool GSC_Drakengard2(const GSFrameInfo& fi, int& skip); void GSC_Tekken5(const GSFrameInfo& fi, int& skip);
bool GSC_Tekken5(const GSFrameInfo& fi, int& skip); void GSC_IkkiTousen(const GSFrameInfo& fi, int& skip);
bool GSC_IkkiTousen(const GSFrameInfo& fi, int& skip); void GSC_GodOfWar(const GSFrameInfo& fi, int& skip);
bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip); void GSC_GodOfWar2(const GSFrameInfo& fi, int& skip);
bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip); void GSC_GiTS(const GSFrameInfo& fi, int& skip);
bool GSC_GiTS(const GSFrameInfo& fi, int& skip); void GSC_Onimusha3(const GSFrameInfo& fi, int& skip);
bool GSC_Onimusha3(const GSFrameInfo& fi, int& skip); void GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip);
bool GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip); void GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip);
bool GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip); void GSC_Genji(const GSFrameInfo& fi, int& skip);
bool GSC_Genji(const GSFrameInfo& fi, int& skip); void GSC_StarOcean3(const GSFrameInfo& fi, int& skip);
bool GSC_StarOcean3(const GSFrameInfo& fi, int& skip); void GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip);
bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip); void GSC_RadiataStories(const GSFrameInfo& fi, int& skip);
bool GSC_RadiataStories(const GSFrameInfo& fi, int& skip);
bool IsBadFrame(ZeroGS::VB& curvb); extern bool IsBadFrame(ZeroGS::VB& curvb);
#endif #endif