From ae4bad07993e6e1b1ab29431812fa52a49a5b5aa Mon Sep 17 00:00:00 2001 From: shadowladyngemu Date: Thu, 11 Aug 2011 12:54:57 +0000 Subject: [PATCH] GSdx: CRC hackfixes for NanoBreaker and Kunoichi/Nightshade, removing the shadows that are not properly emulated and just cause 3D to look darker (NanoBreaker in D3D9 just showed a black screen with smoke effects ingame :p). Minimal changes to the GameDB. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4863 96395faa-99c1-11dd-bbfe-3dabce05a288 --- bin/GameIndex.dbf | 35 +++++++++++++++++++++++------------ plugins/GSdx/GSCrc.cpp | 7 ++++++- plugins/GSdx/GSCrc.h | 2 ++ plugins/GSdx/GSRendererHW.h | 8 +++----- plugins/GSdx/GSState.cpp | 34 +++++++++++++++++++++++++++++++++- 5 files changed, 67 insertions(+), 19 deletions(-) diff --git a/bin/GameIndex.dbf b/bin/GameIndex.dbf index ba8403888d..aa1b12dc51 100644 --- a/bin/GameIndex.dbf +++ b/bin/GameIndex.dbf @@ -3424,7 +3424,7 @@ Region = NTSC-U Compat = 5 --------------------------------------------- Serial = SLUS-20413 -Name = Shadow Man - Second Coming +Name = Shadow Man - 2econd Coming Region = NTSC-U Compat = 4 --------------------------------------------- @@ -5846,7 +5846,7 @@ Region = NTSC-U Compat = 5 --------------------------------------------- Serial = SLUS-20958 -Name = Tom Clancy's Splinter Cell 2 - Pandora Tomorrow +Name = Tom Clancy's Splinter Cell - Pandora Tomorrow Region = NTSC-U Compat = 5 --------------------------------------------- @@ -6109,7 +6109,7 @@ Region = NTSC-U Compat = 5 --------------------------------------------- Serial = SLUS-21010 -Name = Nano Breaker +Name = NanoBreaker Region = NTSC-U Compat = 2 --------------------------------------------- @@ -6690,7 +6690,7 @@ Region = NTSC-U Compat = 5 --------------------------------------------- Serial = SLUS-21137 -Name = Tom Clancy's Splinter Cell 3 - Chaos Theory +Name = Tom Clancy's Splinter Cell - Chaos Theory Region = NTSC-U Compat = 4 --------------------------------------------- @@ -6740,7 +6740,7 @@ Region = NTSC-U Compat = 5 --------------------------------------------- Serial = SLUS-21148 -Name = TimeSplitters 3 - Future Perfect +Name = TimeSplitters - Future Perfect Region = NTSC-U Compat = 5 --------------------------------------------- @@ -7075,6 +7075,7 @@ Serial = SLUS-21219 Name = Pac-Man World 3 Region = NTSC-U Compat = 4 +EETimingHack = 1 --------------------------------------------- Serial = SLUS-21220 Name = World Soccer - Winning Eleven 9 International @@ -9394,7 +9395,8 @@ Compat = 3 Serial = SLUS-21746 Name = Call Of Duty - World At War - Final Fronts Region = NTSC-U -Compat = 2 +Compat = 5 +EETimingHack = 1 --------------------------------------------- Serial = SLUS-21748 Name = MLB Power Pros 2008 @@ -9621,6 +9623,7 @@ Serial = SLUS-21801 Name = Need For Speed - Undercover Region = NTSC-U Compat = 5 +EETimingHack = 1 --------------------------------------------- Serial = SLUS-21802 Name = Naked Brothers Band - The Video Game @@ -13682,7 +13685,7 @@ Name = Tsukiyo ni Saraba Region = NTSC-K --------------------------------------------- Serial = SLKA-25263 -Name = Nano Breaker +Name = NanoBreaker Region = NTSC-J Compat = 5 --------------------------------------------- @@ -13918,6 +13921,7 @@ Region = NTSC-J Serial = SLPM-55127 Name = Need for Speed - Undercover Region = NTSC-J +EETimingHack = 1 --------------------------------------------- Serial = SLPM-55131 Name = World Soccer Winning Eleven 2009 @@ -13943,6 +13947,7 @@ Region = NTSC-J Serial = SLPM-55244 Name = Need for Speed - Undercover [EA:SY! 1980] Region = NTSC-J +EETimingHack = 1 --------------------------------------------- Serial = SLPM-55251 Name = WWE SmackDown vs. Raw 2009 @@ -19220,7 +19225,7 @@ Name = Derby Tsuku 4 - Derby Uma o Tsukurou! Region = NTSC-J --------------------------------------------- Serial = SLPM-65809 -Name = Nanobreaker +Name = NanoBreaker Region = NTSC-J --------------------------------------------- Serial = SLPM-65810 @@ -30048,7 +30053,7 @@ Compat = 5 Serial = SCES-53950 Name = F1 '06 Region = PAL-Unk -Compat = 2 +Compat = 5 --------------------------------------------- Serial = SCES-53960 Name = B-Boy @@ -31508,7 +31513,7 @@ Region = PAL-Unk Compat = 5 --------------------------------------------- Serial = SLES-50446 -Name = Shadow Man 2 - The Second Coming +Name = Shadow Man - 2econd Coming Region = PAL-Unk Compat = 4 --------------------------------------------- @@ -31813,7 +31818,7 @@ Name = State of Emergency Region = PAL-M4 --------------------------------------------- Serial = SLES-50608 -Name = Shadow Man 2 - The Second Coming +Name = Shadow Man - 2econd Coming Region = PAL-Unk --------------------------------------------- Serial = SLES-50613 @@ -36719,7 +36724,7 @@ Name = Cold Winter Region = PAL-Unk --------------------------------------------- Serial = SLES-52964 -Name = Nanobreaker +Name = NanoBreaker Region = PAL-M5 Compat = 5 --------------------------------------------- @@ -38779,6 +38784,7 @@ Compat = 5 Serial = SLES-53959 Name = Pac-Man World 3 Region = PAL-Unk +EETimingHack = 1 --------------------------------------------- Serial = SLES-53963 Name = Downhill Slalom @@ -40891,15 +40897,18 @@ Compat = 5 Serial = SLES-55349 Name = Need For Speed - Undercover Region = PAL-Unk +EETimingHack = 1 --------------------------------------------- Serial = SLES-55350 Name = Need for Speed - Undercover Region = PAL-F-G +EETimingHack = 1 --------------------------------------------- Serial = SLES-55352 Name = Need For Speed - Undercover Region = PAL-Unk Compat = 5 +EETimingHack = 1 --------------------------------------------- Serial = SLES-55354 Name = Persona 3 FES @@ -40917,10 +40926,12 @@ Region = PAL-M7 Serial = SLES-55367 Name = Call of Duty - World at War - Final Fronts Region = PAL-M4 +EETimingHack = 1 --------------------------------------------- Serial = SLES-55369 Name = Call of Duty - World at War - Final Fronts Region = PAL-G +EETimingHack = 1 --------------------------------------------- Serial = SLES-55371 Name = Barbie Horse Adventures - Riding Camp diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 9cdbb945fd..a0caa631e5 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -278,12 +278,13 @@ CRC::Game CRC::m_games[] = {0x785E22BB, DigimonRumbleArena2, EU, 0}, {0x4C5CE4C3, DigimonRumbleArena2, EU, 0}, {0x879CDA5E, StarWarsForceUnleashed, US, 0}, + {0x137C792E, StarWarsForceUnleashed, US, 0}, {0x503BF9E1, StarWarsBattlefront, NoRegion, 0}, //EU and US versions have same CRC {0x02F4B541, StarWarsBattlefront2, NoRegion, 0}, //EU and US versions have same CRC {0xA8DB29DF, BlackHawkDown, EU, 0}, {0x25FC361B, DevilMayCry3, US, 0}, //SE - {0x18C9343F, DevilMayCry3, EU, 0}, //SE {0x2F7D8AD5, DevilMayCry3, US, 0}, + {0x18C9343F, DevilMayCry3, EU, 0}, //SE {0x7ADCB24A, DevilMayCry3, EU, 0}, {0x79C952B0, DevilMayCry3, JP, 0}, //SE {0x7F3DDEAB, DevilMayCry3, JP, 0}, @@ -305,6 +306,10 @@ CRC::Game CRC::m_games[] = {0x8AE9536D, SpyroEternalNight, EU, 0}, {0x43AB7214, TalesOfLegendia, US, 0}, {0x1F8640E0, TalesOfLegendia, JP, 0}, + {0x98C7B76D, NanoBreaker, US, 0}, + {0x7098BE76, NanoBreaker, KO, 0}, + {0x519E816B, Kunoichi, US, 0}, //Nightshade + {0x3FB419FD, Kunoichi, JP, 0}, }; hash_map CRC::m_map; diff --git a/plugins/GSdx/GSCrc.h b/plugins/GSdx/GSCrc.h index 93d9d846e7..72f50152b0 100644 --- a/plugins/GSdx/GSCrc.h +++ b/plugins/GSdx/GSCrc.h @@ -121,6 +121,8 @@ public: SpyroNewBeginning, SpyroEternalNight, TalesOfLegendia, + NanoBreaker, + Kunoichi, TitleCount, }; diff --git a/plugins/GSdx/GSRendererHW.h b/plugins/GSdx/GSRendererHW.h index dc9bc5956e..d6ef16cb18 100644 --- a/plugins/GSdx/GSRendererHW.h +++ b/plugins/GSdx/GSRendererHW.h @@ -368,7 +368,6 @@ class GSRendererHW : public GSRendererT { uint32 FBP = m_context->FRAME.Block(); uint32 FPSM = m_context->FRAME.PSM; - uint32 ZTE = m_context->TEST.ZTE; if(!PRIM->TME) { @@ -382,7 +381,7 @@ class GSRendererHW : public GSRendererT } else if(PRIM->TME) { - if(ZTE && (FBP == 0x0 || FBP == 0x01180) && FPSM == PSM_PSMCT32 && (m_vt.m_max.p.z == m_vt.m_min.p.z && m_vt.m_min.p.z == 0x0)) + if((FBP == 0x0 || FBP == 0x01180) && FPSM == PSM_PSMCT32 && (m_vt.m_max.p.z == m_vt.m_min.p.z && m_vt.m_min.p.z == 0x0)) { m_dev->ClearDepth(ds, 0); } @@ -395,7 +394,6 @@ class GSRendererHW : public GSRendererT { uint32 FBP = m_context->FRAME.Block(); uint32 FPSM = m_context->FRAME.PSM; - uint32 ZTE = m_context->TEST.ZTE; if(!PRIM->TME) { @@ -409,7 +407,7 @@ class GSRendererHW : public GSRendererT } else if(PRIM->TME) { - if(ZTE && (FBP == 0x0 || FBP == 0x01180) && FPSM == PSM_PSMCT32 && (m_vt.m_max.p.z == m_vt.m_min.p.z && m_vt.m_min.p.z == 0x0)) + if((FBP == 0x0 || FBP == 0x01180) && FPSM == PSM_PSMCT32 && (m_vt.m_max.p.z == m_vt.m_min.p.z && m_vt.m_min.p.z == 0x0)) { m_dev->ClearDepth(ds, 0); } @@ -432,7 +430,7 @@ class GSRendererHW : public GSRendererT return true; } - + bool OI_PointListPalette(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) { if(m_vt.m_primclass == GS_POINT_CLASS && !PRIM->TME) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 0d163776bf..e75a8432b6 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -1954,7 +1954,7 @@ bool GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip) { skip = 0; } - else if(!fi.TME && fi.FBP == fi.TBP0 && fi.FBP == 0x2000 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMCT24) + else if(!fi.TME && fi.FBP == fi.TBP0 && fi.TBP0 == 0x2000 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMCT24) { if(g_crc_region == CRC::US || g_crc_region == CRC::JP || g_crc_region == CRC::KO) { @@ -2919,6 +2919,10 @@ bool GSC_FFVIIDoC(const GSFrameInfo& fi, int& skip) { skip = 1; } + if(!fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x01c00 && fi.TPSM == PSM_PSMCT24) + { + //skip = 1; + } } return true; @@ -3098,6 +3102,32 @@ bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_NanoBreaker(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(fi.TME && fi.FBP == 0x0 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x03900 && fi.TPSM == PSM_PSMCT16S) + { + skip = 2; + } + } + + return true; +} + +bool GSC_Kunoichi(const GSFrameInfo& fi, int& skip) +{ + if(skip == 0) + { + if(!fi.TME && (fi.FBP == 0x0 || fi.FBP == 0x00700) && fi.FPSM == PSM_PSMCT32 && (fi.TPSM == PSM_PSMT8 || fi.TPSM == PSM_PSMT4) && fi.FBMSK == 0x00FFFFFF) + { + skip = 3; + } + } + + return true; +} + bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) { @@ -3186,6 +3216,8 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) map[CRC::SpyroNewBeginning] = GSC_SpyroNewBeginning; map[CRC::SpyroEternalNight] = GSC_SpyroEternalNight; map[CRC::TalesOfLegendia] = GSC_TalesOfLegendia; + map[CRC::NanoBreaker] = GSC_NanoBreaker; + map[CRC::Kunoichi] = GSC_Kunoichi; } // TODO: just set gsc in SetGameCRC once