From 9449b3db5bd8eb98ab6238f9629e4be77a9ade04 Mon Sep 17 00:00:00 2001 From: shadowladyngemu Date: Fri, 15 Apr 2011 15:42:28 +0000 Subject: [PATCH] GSdx: Timesplitters 2 fix works with the NTSC version now too, shows the minimap. CRC Hackfixes for Rez and Lord of the Rings - Two Towers. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4575 96395faa-99c1-11dd-bbfe-3dabce05a288 --- bin/GameIndex.dbf | 6 ++--- plugins/GSdx/GSCrc.cpp | 7 ++++++ plugins/GSdx/GSCrc.h | 2 ++ plugins/GSdx/GSState.cpp | 41 ++++++++++++++++++++++++++++++++- plugins/GSdx/GSTextureCache.cpp | 12 +++++----- 5 files changed, 58 insertions(+), 10 deletions(-) diff --git a/bin/GameIndex.dbf b/bin/GameIndex.dbf index f4abfd337d..82e5e4d629 100644 --- a/bin/GameIndex.dbf +++ b/bin/GameIndex.dbf @@ -4552,7 +4552,7 @@ Compat = 4 Serial = SLUS-20674 Name = Virtual On Marz Region = NTSC-U -Compat = 5 +Compat = 4 --------------------------------------------- Serial = SLUS-20675 Name = Baldur's Gate - Dark Alliance 2 @@ -7858,7 +7858,7 @@ Compat = 5 Serial = SLUS-21390 Name = Urban Chaos - Riot Response Region = NTSC-U -Compat = 4 +Compat = 5 --------------------------------------------- Serial = SLUS-21391 Name = SpongeBob SquarePants - Creature from the Krusty Krab @@ -28646,7 +28646,7 @@ Region = PAL-Unk Serial = SCES-50294 Name = Gran Turismo 3 A-Spec Region = PAL-M5 -Compat = 4 +Compat = 5 --------------------------------------------- Serial = SCES-50295 Name = Dark Cloud diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 0ff6564da8..ce66b729a6 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -202,6 +202,13 @@ CRC::Game CRC::m_games[] = {0x506644B3, BigMuthaTruckers, EU, 0}, {0x90F0D852, BigMuthaTruckers, US, 0}, {0x5CC9BF81, TimeSplitters2, EU, 0}, + {0x12532F1C, TimeSplitters2, US, 0}, + {0xA33748AA, ReZ, US, 0}, + {0xAE1152EB, ReZ, EU, 0}, + {0xD2EA890A, ReZ, JP, 0}, + {0xC818BEC2, LordOfTheRingsTwoTowers, US, 0}, + {0x9ABF90FB, LordOfTheRingsTwoTowers, ES, 0}, + {0xC0E909E9, LordOfTheRingsTwoTowers, JP, 0}, }; hash_map CRC::m_map; diff --git a/plugins/GSdx/GSCrc.h b/plugins/GSdx/GSCrc.h index 1cbe413d4a..255e2f1d87 100644 --- a/plugins/GSdx/GSCrc.h +++ b/plugins/GSdx/GSCrc.h @@ -91,6 +91,8 @@ public: DemonStone, BigMuthaTruckers, TimeSplitters2, + ReZ, + LordOfTheRingsTwoTowers, TitleCount, }; diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 52d3db038b..10574ee91a 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -2636,7 +2636,7 @@ bool GSC_TimeSplitters2(const GSFrameInfo& fi, int& skip) { if(skip == 0) { - if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01000) && fi.FPSM == fi.TPSM && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0x0FF000000) + if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00 || fi.FBP == 0x01000) && fi.FPSM == fi.TPSM && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x01000) && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0x0FF000000) { skip = 1; } @@ -2645,6 +2645,43 @@ bool GSC_TimeSplitters2(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_ReZ(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x008c0 || fi.FBP == 0x00a00) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32) + { + skip = 1; + } + } + + return true; +} + +bool GSC_LordOfTheRingsTwoTowers(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(fi.TME && (fi.FBP == 0x01180 || fi.FBP == 0x01400) && fi.FPSM == fi.TPSM && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSM_PSMCT16) + { + skip = 1000;//shadows + } + else if(fi.TME && fi.TPSM == PSM_PSMZ16 && fi.TBP0 == 0x01400 && fi.FPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF) + { + skip = 3; //wall of fog + } + } + else + { + if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01000) && (fi.TBP0 == 0x01180 || fi.TBP0 == 0x01400) && fi.FPSM == PSM_PSMCT32) + { + skip = 2; + } + } + + return true; +} + bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) { GSFrameInfo fi; @@ -2709,6 +2746,8 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) map[CRC::DemonStone] = GSC_DemonStone; map[CRC::BigMuthaTruckers] = GSC_BigMuthaTruckers; map[CRC::TimeSplitters2] = GSC_TimeSplitters2; + map[CRC::ReZ] = GSC_ReZ; + map[CRC::LordOfTheRingsTwoTowers] = GSC_LordOfTheRingsTwoTowers; } // TODO: just set gsc in SetGameCRC once diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 209de07871..594c66dde6 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -637,12 +637,12 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con else if(tw < 1024) { // FIXME: timesplitters blurs the render target by blending itself over a couple of times - hack = true; - if(tw == 256 && th == 128 && (TEX0.TBP0 == 0 || TEX0.TBP0 == 0x00e00)) - { - delete src; - return NULL; - } + //hack = true; + //if(tw == 256 && th == 128 && (TEX0.TBP0 == 0 || TEX0.TBP0 == 0x00e00)) + //{ + // delete src; + // return NULL; + //} } // width/height conversion