From f69e165b5193245c74fde8c033ff8f44d2334cb6 Mon Sep 17 00:00:00 2001 From: shadowladyngemu Date: Thu, 14 Apr 2011 15:12:06 +0000 Subject: [PATCH] GSdx: CRC hackfix for Gran Turismo 3 and Gran Turismo Concept. Some of the race tracks had garbage all over the screen. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4573 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSCrc.cpp | 5 +++++ plugins/GSdx/GSCrc.h | 2 ++ plugins/GSdx/GSState.cpp | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 07991a4b63..0ff6564da8 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -105,6 +105,10 @@ CRC::Game CRC::m_games[] = {0x44A61C8F, GT4, NoRegion, 0}, {0x0086E35B, GT4, NoRegion, 0}, {0x77E61C8A, GT4, NoRegion, 0}, + {0x85AE91B3, GT3, US, 0}, + {0xC220951A, GT3, NoRegion, 0}, + {0x60013EBD, GTConcept, EU, 0}, + {0xB590CE04, GTConcept, NoRegion, 0}, {0xC164550A, WildArms5, JPUNDUB, 0}, {0xC1640D2C, WildArms5, US, 0}, {0x0FCF8FE4, WildArms5, EU, 0}, @@ -127,6 +131,7 @@ CRC::Game CRC::m_games[] = {0xEC432B24, Drakengard2, NoRegion, 0}, {0xFC46EA61, Tekken5, JP, 0}, {0x1F88EE37, Tekken5, EU, 0}, + {0x1F88BECD, Tekken5, EU, 0}, //language selector... {0x652050D2, Tekken5, US, 0}, {0x9E98B8AE, IkkiTousen, JP, 0}, {0xD6385328, GodOfWar, US, 0}, diff --git a/plugins/GSdx/GSCrc.h b/plugins/GSdx/GSCrc.h index e4b6913fdf..1cbe413d4a 100644 --- a/plugins/GSdx/GSCrc.h +++ b/plugins/GSdx/GSCrc.h @@ -52,6 +52,8 @@ public: OnePieceGrandBattle, ICO, GT4, + GT3, + GTConcept, WildArms5, WildArms4, Manhunt2, diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index ccfddf40e9..52d3db038b 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -2096,6 +2096,32 @@ bool GSC_GT4(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_GT3(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(fi.TME && fi.FBP >= 0x02de0 && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.TPSM == PSM_PSMT8) + { + skip = 770; + } + } + + return true; +} + +bool GSC_GTConcept(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(fi.TME && fi.FBP >= 0x03420 && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01400) && fi.TPSM == PSM_PSMT8) + { + skip = 880; + } + } + + return true; +} + bool GSC_WildArms4(const GSFrameInfo& fi, int& skip) { if(skip == 0) @@ -2428,6 +2454,14 @@ bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip) { if(skip == 0) { + /*if(fi.TME && (fi.FBP == 0x018c0 || fi.FBP == 0x02180) && fi.FPSM == fi.TPSM && fi.TBP0 >= 0x03200 && fi.TPSM == PSM_PSMCT32) //NTSC only, !(fi.TBP0 == 0x03580 || fi.TBP0 == 0x03960) + { + skip = 1; //red garbage in lost forest, removes other effects... + } + 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" + }*/ if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH) { skip = 1000; // @@ -2644,6 +2678,8 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) map[CRC::OnePieceGrandBattle] = GSC_OnePieceGrandBattle; map[CRC::ICO] = GSC_ICO; map[CRC::GT4] = GSC_GT4; + map[CRC::GT3] = GSC_GT3; + map[CRC::GTConcept] = GSC_GTConcept; map[CRC::WildArms4] = GSC_WildArms4; map[CRC::WildArms5] = GSC_WildArms5; map[CRC::Manhunt2] = GSC_Manhunt2;