From f80af64a2b24454ba2d3951f3bd6c8803efcf4d3 Mon Sep 17 00:00:00 2001 From: ivan89el <35658450+ivan89el@users.noreply.github.com> Date: Wed, 1 Aug 2018 14:25:24 +0500 Subject: [PATCH] GSdx: Adjust ShinOnimusha crc hack. (#2521) The hacks remove smoke/fog effects. They are rendered correctly so let's move the hacks to Aggressive crc state. They can be used as speedhacks. --- plugins/GSdx/GSHwHack.cpp | 62 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/plugins/GSdx/GSHwHack.cpp b/plugins/GSdx/GSHwHack.cpp index 06c9fac94f..c6deecc77f 100644 --- a/plugins/GSdx/GSHwHack.cpp +++ b/plugins/GSdx/GSHwHack.cpp @@ -875,37 +875,6 @@ bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip) return true; } -bool GSC_ShinOnimusha(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - - if(fi.TME && fi.FBP == 0x001000 && (fi.TBP0 ==0 || fi.TBP0 == 0x0800) && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0x00FFFFFF) - { - skip = 0; - } - else if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01000) // || fi.FBP == 0x00000 - { - skip = 28; //28 30 56 64 - } - else if(fi.FBP && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFFFFFF) - { - skip = 0; //24 33 40 9 - } - else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFF000000) - { - skip = 1; - } - else if(fi.TME && (fi.TBP0 ==0x1400 || fi.TBP0 ==0x1000 ||fi.TBP0 == 0x1200) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24)) - { - skip = 1; - } - - } - - return true; -} - bool GSC_SakuraWarsSoLongMyLove(const GSFrameInfo& fi, int& skip) { if(skip == 0) @@ -2024,6 +1993,35 @@ bool GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_ShinOnimusha(const GSFrameInfo& fi, int& skip) +{ + if(Aggressive && skip == 0) + { + if(fi.TME && fi.FBP == 0x001000 && (fi.TBP0 ==0 || fi.TBP0 == 0x0800) && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0x00FFFFFF) + { + skip = 0; + } + else if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01000) // || fi.FBP == 0x00000 + { + skip = 28; //28 30 56 64 + } + else if(fi.FBP && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFFFFFF) + { + skip = 0; //24 33 40 9 + } + else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFF000000) + { + skip = 1; + } + else if(fi.TME && (fi.TBP0 ==0x1400 || fi.TBP0 ==0x1000 ||fi.TBP0 == 0x1200) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24)) + { + skip = 1; + } + } + + return true; +} + bool GSC_SimpsonsGame(const GSFrameInfo& fi, int& skip) { if(Aggressive && skip == 0) @@ -2215,7 +2213,6 @@ void GSState::SetupCrcHack() lut[CRC::SakuraTaisen] = GSC_SakuraTaisen; lut[CRC::SakuraWarsSoLongMyLove] = GSC_SakuraWarsSoLongMyLove; lut[CRC::ShadowofRome] = GSC_ShadowofRome; - lut[CRC::ShinOnimusha] = GSC_ShinOnimusha; lut[CRC::Simple2000Vol114] = GSC_Simple2000Vol114; lut[CRC::Spartan] = GSC_Spartan; lut[CRC::StarWarsForceUnleashed] = GSC_StarWarsForceUnleashed; @@ -2260,6 +2257,7 @@ void GSState::SetupCrcHack() lut[CRC::FFX] = GSC_FFXGames; lut[CRC::FFXII] = GSC_FFXGames; lut[CRC::ResidentEvil4] = GSC_ResidentEvil4; + lut[CRC::ShinOnimusha] = GSC_ShinOnimusha; lut[CRC::SimpsonsGame] = GSC_SimpsonsGame; lut[CRC::SMTDDS1] = GSC_SMTNocturneDDS<0x203BA820>; lut[CRC::SMTDDS2] = GSC_SMTNocturneDDS<0x20435BF0>;