mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Adjust Yakuza games crc hacks and do some reformatting.
Add a missing crc id for the US version,
, move the crc to DX level - effect is emulated correctly on OpenGL with
depth,
merge the two Yakuza hacks together and reformat it making it easier to
be read.
Skip 3 also seems to work on Yakuza 2.
Related commit:
7f0f19ee02
Reformat the code a bit, ocd satisfaction.
This commit is contained in:
parent
93d5b52df3
commit
38366c084e
|
@ -443,6 +443,7 @@ CRC::Game CRC::m_games[] =
|
||||||
{0xA60C2E65, Yakuza2, EU, 0},
|
{0xA60C2E65, Yakuza2, EU, 0},
|
||||||
{0x800E3E5A, Yakuza2, EU, 0},
|
{0x800E3E5A, Yakuza2, EU, 0},
|
||||||
{0x97E9C87E, Yakuza2, US, 0},
|
{0x97E9C87E, Yakuza2, US, 0},
|
||||||
|
{0xB1EBD841, Yakuza2, US, 0},
|
||||||
{0xC6B95C48, Yakuza2, JP, 0},
|
{0xC6B95C48, Yakuza2, JP, 0},
|
||||||
{0x9000252A, SkyGunner, JP, 0},
|
{0x9000252A, SkyGunner, JP, 0},
|
||||||
{0x93092623, SkyGunner, JP, 0},
|
{0x93092623, SkyGunner, JP, 0},
|
||||||
|
|
|
@ -110,7 +110,7 @@ bool GSC_DBZBT3(const GSFrameInfo& fi, int& skip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSC_DemonStone(const GSFrameInfo& fi, int& skip)
|
bool GSC_DemonStone(const GSFrameInfo& fi, int& skip)
|
||||||
|
@ -239,6 +239,7 @@ bool GSC_SacredBlaze(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,6 +565,7 @@ bool GSC_TombRaider(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -775,100 +777,52 @@ bool GSC_Kunoichi(const GSFrameInfo& fi, int& skip)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSC_Yakuza(const GSFrameInfo& fi, int& skip)
|
|
||||||
{
|
|
||||||
if(1
|
|
||||||
&& !skip
|
|
||||||
&& !fi.TME
|
|
||||||
&& (0
|
|
||||||
|| fi.FBP == 0x1c20 && fi.TBP0 == 0xe00 //ntsc (EU and US DVDs)
|
|
||||||
|| fi.FBP == 0x1e20 && fi.TBP0 == 0x1000 //pal1
|
|
||||||
|| fi.FBP == 0x1620 && fi.TBP0 == 0x800 //pal2
|
|
||||||
)
|
|
||||||
&& fi.TPSM == PSM_PSMZ24
|
|
||||||
&& fi.FPSM == PSM_PSMCT32
|
|
||||||
/*
|
|
||||||
&& fi.FBMSK ==0xffffff
|
|
||||||
&& fi.TZTST
|
|
||||||
&& !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)
|
|
||||||
*/
|
|
||||||
)
|
|
||||||
{
|
|
||||||
skip=3;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GSC_Yakuza2(const GSFrameInfo& fi, int& skip)
|
|
||||||
{
|
|
||||||
if(1
|
|
||||||
&& !skip
|
|
||||||
&& !fi.TME
|
|
||||||
&& (0
|
|
||||||
|| fi.FBP == 0x1c20 && fi.TBP0 == 0xe00 //ntsc (EU DVD)
|
|
||||||
|| fi.FBP == 0x1e20 && fi.TBP0 == 0x1000 //pal1
|
|
||||||
|| fi.FBP == 0x1620 && fi.TBP0 == 0x800 //pal2
|
|
||||||
)
|
|
||||||
&& fi.TPSM == PSM_PSMZ24
|
|
||||||
&& fi.FPSM == PSM_PSMCT32
|
|
||||||
/*
|
|
||||||
&& fi.FBMSK ==0xffffff
|
|
||||||
&& fi.TZTST
|
|
||||||
&& !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)
|
|
||||||
*/
|
|
||||||
)
|
|
||||||
{
|
|
||||||
skip=17;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip)
|
bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip)
|
||||||
{
|
{
|
||||||
if(skip == 0)
|
if(skip == 0)
|
||||||
{
|
{
|
||||||
if(fi.TME && fi.TPSM == PSM_PSMCT16S && (fi.FBMSK >= 0x6FFFFFFF || fi.FBMSK ==0) )
|
if(fi.TME && fi.TPSM == PSM_PSMCT16S && (fi.FBMSK >= 0x6FFFFFFF || fi.FBMSK ==0) )
|
||||||
{
|
{
|
||||||
skip = 1000;
|
skip = 1000;
|
||||||
}
|
}
|
||||||
else if(fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0xFF000000)
|
else if(fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0xFF000000)
|
||||||
{
|
{
|
||||||
skip = 2;
|
skip = 2;
|
||||||
}
|
}
|
||||||
else if((fi.FBP | fi.TBP0)&& fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x3FFF)
|
else if((fi.FBP | fi.TBP0)&& fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x3FFF)
|
||||||
{
|
{
|
||||||
// Note start of the effect (texture shuffle) is fixed in openGL but maybe not the extra draw
|
// Note start of the effect (texture shuffle) is fixed in openGL but maybe not the extra draw
|
||||||
// call....
|
// call....
|
||||||
skip = 1000;
|
skip = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBP==0x1180 && fi.TBP0==0x1180 && (fi.FBMSK ==0))
|
if(!fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBP==0x1180 && fi.TBP0==0x1180 && (fi.FBMSK ==0))
|
||||||
{
|
{
|
||||||
skip = 0; //
|
skip = 0; //
|
||||||
}
|
}
|
||||||
if(fi.TME && fi.TPSM == PSM_PSMT4 && fi.FBP && (fi.TBP0!=0x3753))
|
if(fi.TME && fi.TPSM == PSM_PSMT4 && fi.FBP && (fi.TBP0!=0x3753))
|
||||||
{
|
{
|
||||||
skip = 0; //
|
skip = 0; //
|
||||||
}
|
}
|
||||||
if(fi.TME && fi.TPSM == PSM_PSMT8H && fi.FBP ==0x22e0 && fi.TBP0 ==0x36e0 )
|
if(fi.TME && fi.TPSM == PSM_PSMT8H && fi.FBP ==0x22e0 && fi.TBP0 ==0x36e0 )
|
||||||
{
|
{
|
||||||
skip = 0; //
|
skip = 0; //
|
||||||
}
|
}
|
||||||
if(!fi.TME && fi.TPSM == PSM_PSMT8H && fi.FBP ==0x22e0 )
|
if(!fi.TME && fi.TPSM == PSM_PSMT8H && fi.FBP ==0x22e0 )
|
||||||
{
|
{
|
||||||
skip = 0; //
|
skip = 0; //
|
||||||
}
|
}
|
||||||
if(fi.TME && fi.TPSM == PSM_PSMT8 && (fi.FBP==0x1180 || fi.FBP==0) && (fi.TBP0 !=0x3764 && fi.TBP0!=0x370f))
|
if(fi.TME && fi.TPSM == PSM_PSMT8 && (fi.FBP==0x1180 || fi.FBP==0) && (fi.TBP0 !=0x3764 && fi.TBP0!=0x370f))
|
||||||
{
|
{
|
||||||
skip = 0; //
|
skip = 0; //
|
||||||
}
|
}
|
||||||
if(fi.TME && fi.TPSM == PSM_PSMCT16S && (fi.FBP==0x1180 ))
|
if(fi.TME && fi.TPSM == PSM_PSMCT16S && (fi.FBP==0x1180 ))
|
||||||
{
|
{
|
||||||
skip = 2; //
|
skip = 2; //
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1007,6 +961,7 @@ bool GSC_Simple2000Vol114(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,6 +974,7 @@ bool GSC_UrbanReign(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,6 +1012,7 @@ bool GSC_SteambotChronicles(const GSFrameInfo& fi, int& skip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1243,6 +1200,7 @@ bool GSC_DeathByDegreesTekkenNinaWilliams(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1544,7 +1502,7 @@ bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip)
|
||||||
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
|
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
|
||||||
{
|
{
|
||||||
skip = 1; // //garbage in cutscenes, doesn't remove completely, better use "Alpha Hack"
|
skip = 1; // //garbage in cutscenes, doesn't remove completely, better use "Alpha Hack"
|
||||||
}*/
|
}*/
|
||||||
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
|
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
|
||||||
{
|
{
|
||||||
// GH: Hack is quite similar to GSC_StarOcean3. It is potentially the same issue.
|
// GH: Hack is quite similar to GSC_StarOcean3. It is potentially the same issue.
|
||||||
|
@ -1567,9 +1525,9 @@ bool GSC_RadiataStories(const GSFrameInfo& fi, int& skip)
|
||||||
if(skip == 0)
|
if(skip == 0)
|
||||||
{
|
{
|
||||||
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
|
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
|
||||||
{
|
{
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
else if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
|
else if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
|
||||||
{
|
{
|
||||||
// GH: Hack is quite similar to GSC_StarOcean3. It is potentially the same issue.
|
// GH: Hack is quite similar to GSC_StarOcean3. It is potentially the same issue.
|
||||||
|
@ -1816,18 +1774,19 @@ bool GSC_XE3(const GSFrameInfo& fi, int& skip)
|
||||||
}*/
|
}*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(fi.TME)
|
if(fi.TME)
|
||||||
|
{
|
||||||
|
// depth textures (bully, mgs3s1 intro, Front Mission 5)
|
||||||
|
if( (fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S) ||
|
||||||
|
// General, often problematic post processing
|
||||||
|
(GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)) )
|
||||||
{
|
{
|
||||||
// depth textures (bully, mgs3s1 intro, Front Mission 5)
|
skip = 1;
|
||||||
if( (fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S) ||
|
|
||||||
// General, often problematic post processing
|
|
||||||
(GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)) )
|
|
||||||
{
|
|
||||||
skip = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1841,7 +1800,6 @@ bool GSC_Grandia3(const GSFrameInfo& fi, int& skip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1858,6 +1816,21 @@ bool GSC_GTASanAndreas(const GSFrameInfo& fi, int& skip)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GSC_YakuzaGames(const GSFrameInfo& fi, int& skip)
|
||||||
|
{
|
||||||
|
if(skip == 0)
|
||||||
|
{
|
||||||
|
if(!fi.TME && (fi.FBP == 0x1c20 || fi.FBP == 0x1e20 || fi.FBP == 0x1620) && (fi.TBP0 == 0xe00 || fi.TBP0 == 0x1000 || fi.TBP0 == 0x800) && fi.TPSM == PSM_PSMZ24 && fi.FPSM == PSM_PSMCT32
|
||||||
|
/*&& fi.FBMSK == 0xffffff && fi.TZTST && !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)*/)
|
||||||
|
{
|
||||||
|
// Removes depth effect not rendered properly on D3D.
|
||||||
|
skip = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Aggressive only hack
|
// Aggressive only hack
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1916,6 +1889,7 @@ bool GSC_SMTNocturneDDS(const GSFrameInfo& fi, int& skip)
|
||||||
if (state == 23 || state == 24 || state == 25)
|
if (state == 23 || state == 24 || state == 25)
|
||||||
skip = 1;
|
skip = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1928,32 +1902,33 @@ bool GSC_LegoBatman(const GSFrameInfo& fi, int& skip)
|
||||||
skip = 3;
|
skip = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSC_SoTC(const GSFrameInfo& fi, int& skip)
|
bool 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(Aggressive && fi.TME /*&& fi.FBP == 0x03d80*/ && fi.FPSM == 0 && fi.TBP0 == 0x03fc0 && fi.TPSM == 1)
|
if(Aggressive && fi.TME /*&& fi.FBP == 0x03d80*/ && fi.FPSM == 0 && fi.TBP0 == 0x03fc0 && fi.TPSM == 1)
|
||||||
{
|
{
|
||||||
skip = 48; //removes sky bloom
|
skip = 48; //removes sky bloom
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if(fi.TME && fi.FBP == 0x02b80 && fi.FPSM == PSM_PSMCT24 && fi.TBP0 == 0x01e80 && fi.TPSM == PSM_PSMCT24)
|
if(fi.TME && fi.FBP == 0x02b80 && fi.FPSM == PSM_PSMCT24 && fi.TBP0 == 0x01e80 && fi.TPSM == PSM_PSMCT24)
|
||||||
{
|
{
|
||||||
skip = 9;
|
skip = 9;
|
||||||
}
|
}
|
||||||
else if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSM_PSMCT32)
|
else if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSM_PSMCT32)
|
||||||
{
|
{
|
||||||
skip = 8;
|
skip = 8;
|
||||||
}
|
}
|
||||||
else if(fi.TME && fi.FBP == 0x01e80 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03880 && fi.TPSM == PSM_PSMCT32)
|
else if(fi.TME && fi.FBP == 0x01e80 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03880 && fi.TPSM == PSM_PSMCT32)
|
||||||
{
|
{
|
||||||
skip = 8;
|
skip = 8;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2227,8 +2202,6 @@ void GSState::SetupCrcHack()
|
||||||
lut[CRC::UrbanReign] = GSC_UrbanReign;
|
lut[CRC::UrbanReign] = GSC_UrbanReign;
|
||||||
lut[CRC::WildArms4] = GSC_WildArmsGames;
|
lut[CRC::WildArms4] = GSC_WildArmsGames;
|
||||||
lut[CRC::WildArms5] = GSC_WildArmsGames;
|
lut[CRC::WildArms5] = GSC_WildArmsGames;
|
||||||
lut[CRC::Yakuza2] = GSC_Yakuza2;
|
|
||||||
lut[CRC::Yakuza] = GSC_Yakuza;
|
|
||||||
lut[CRC::ZettaiZetsumeiToshi2] = GSC_ZettaiZetsumeiToshi2;
|
lut[CRC::ZettaiZetsumeiToshi2] = GSC_ZettaiZetsumeiToshi2;
|
||||||
|
|
||||||
// Channel Effect
|
// Channel Effect
|
||||||
|
@ -2283,6 +2256,8 @@ void GSState::SetupCrcHack()
|
||||||
lut[CRC::TenchuFS] = GSC_Tenchu;
|
lut[CRC::TenchuFS] = GSC_Tenchu;
|
||||||
lut[CRC::TenchuWoH] = GSC_Tenchu;
|
lut[CRC::TenchuWoH] = GSC_Tenchu;
|
||||||
lut[CRC::XE3] = GSC_XE3;
|
lut[CRC::XE3] = GSC_XE3;
|
||||||
|
lut[CRC::Yakuza] = GSC_YakuzaGames;
|
||||||
|
lut[CRC::Yakuza2] = GSC_YakuzaGames;
|
||||||
|
|
||||||
// Depth + Texture cache issue + Date (AKA a real mess)
|
// Depth + Texture cache issue + Date (AKA a real mess)
|
||||||
lut[CRC::HauntingGround] = GSC_HauntingGround;
|
lut[CRC::HauntingGround] = GSC_HauntingGround;
|
||||||
|
|
Loading…
Reference in New Issue