From 312db7755b276bfe8fb3b80ca3e4e4e86fa2ab24 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Sun, 25 Mar 2018 16:50:20 +0200 Subject: [PATCH] GSdx: Adjust CRC hacks. Move CRC hack that removed shadows to Aggressive, shadows are misaligned when upscaling - can be fixed with HPO. We can use the hack as a speedhack for Aggressive state. Add correct FBP code for Sly 2 E3 Demo. CRC hack should work properly now. Purge God of War 1/2 CRC hacks that fixed/removed the vertical red lines. No longer needed since the issue is fixed accross all renders. Also useless to be kept for speedhacks. --- plugins/GSdx/GSHwHack.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/plugins/GSdx/GSHwHack.cpp b/plugins/GSdx/GSHwHack.cpp index f728e62a17..06bc28e0fa 100644 --- a/plugins/GSdx/GSHwHack.cpp +++ b/plugins/GSdx/GSHwHack.cpp @@ -1253,12 +1253,15 @@ bool GSC_ICO(const GSFrameInfo& fi, int& skip) { if(skip == 0) { - if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03d00 && fi.TPSM == PSM_PSMCT32) + if(Aggressive && fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03d00 && fi.TPSM == PSM_PSMCT32) { + // Removes shadows, shadows can be a little misaligned when upscaled. HPO fixes the issue. + // Can be used as a speed hack. skip = 3; } else if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x02800 && fi.TPSM == PSM_PSMT8H) { + // Depth effects. skip = 1; } else if(Aggressive && fi.TME && fi.FBP == 0x0800 && (fi.TBP0 == 0x2800 || fi.TBP0 ==0x2c00) && fi.TPSM ==0 && fi.FBMSK == 0) @@ -1452,6 +1455,8 @@ bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip) { if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSM_PSMCT16 && fi.TBP0 == 0x00000 && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF) { + // Texture shuffle. Not supported on D3D9. + // Can be used as a speed hack. skip = 1000; } else if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0xff000000) @@ -1462,12 +1467,6 @@ bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip) { skip = 1; // wall of fog } - else if (fi.TME && (fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S)) - { - // Equivalent to the UserHacks_AutoSkipDrawDepth hack but enabled by default - // http://forums.pcsx2.net/Thread-God-of-War-Red-line-rendering-explained - skip = 1; - } } else { @@ -1505,12 +1504,6 @@ bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip) { skip = 1; // water effect and water vertical lines } - else if (fi.TME && (fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S)) - { - // Equivalent to the UserHacks_AutoSkipDrawDepth hack but enabled by default - // http://forums.pcsx2.net/Thread-God-of-War-Red-line-rendering-explained - skip = 1; - } } } else @@ -1702,7 +1695,7 @@ bool GSC_Sly2(const GSFrameInfo& fi, int& skip) { if(skip == 0) { - if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00700 || fi.FBP == 0x00800) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF) + if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00700 || fi.FBP == 0x00800 || fi.FBP == 0x008c0) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF) { skip = 1000; }