diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 5130c166f0..5109e03e1c 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -317,6 +317,12 @@ CRC::Game CRC::m_games[] = {0x519E816B, Kunoichi, US, 0}, //Nightshade {0x3FB419FD, Kunoichi, JP, 0}, {0x3B470BBD, Kunoichi, EU, 0}, + {0XD3F182A3, Yakuza, EU, 0}, + {0x6F9F99F8, Yakuza, EU, 0}, + {0x388F687B, Yakuza, US, 0}, + {0xA60C2E65, Yakuza2, EU, 0}, + {0x800E3E5A, Yakuza2, EU, 0}, + {0x97E9C87E, Yakuza2, US, 0}, }; hash_map CRC::m_map; @@ -348,7 +354,7 @@ CRC::Game CRC::Lookup(uint32 crc) for(int i = 0; i < countof(m_games); i++) { if( !IsCrcExcluded( exclusions, m_games[i].crc ) ) - m_map[m_games[i].crc] = &m_games[i]; + m_map[m_games[i].crc] = &m_games[i]; //else // printf( "GSdx: excluding CRC hack for 0x%08x\n", m_games[i].crc ); } diff --git a/plugins/GSdx/GSCrc.h b/plugins/GSdx/GSCrc.h index 72f50152b0..9a4a9cd10c 100644 --- a/plugins/GSdx/GSCrc.h +++ b/plugins/GSdx/GSCrc.h @@ -123,6 +123,9 @@ public: TalesOfLegendia, NanoBreaker, Kunoichi, + Yakuza, + Yakuza2, + TitleCount, }; diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 2f5f90528e..85606d9f98 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -3133,6 +3133,54 @@ bool GSC_Kunoichi(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_Yakuza(const GSFrameInfo& fi, int& skip) +{ + if(1 + && !skip + && !fi.TME + && (0 + || fi.FBP == 0x1c20 && fi.TBP0 == 0xe00 //ntsc (EU and US DVDs) + || fi.FBP == 0x1e20 && fi.TBP0 == 0x1000 //pal1 + || fi.FBP == 0x1620 && fi.TBP0 == 0x800 //pal2 + ) + && fi.TPSM == PSM_PSMZ24 + && fi.FPSM == PSM_PSMCT32 + /* + && fi.FBMSK ==0xffffff + && fi.TZTST + && !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM) + */ + ) + { + skip=17; + } + return true; +} + +bool GSC_Yakuza2(const GSFrameInfo& fi, int& skip) +{ + if(1 + && !skip + && !fi.TME + && (0 + || fi.FBP == 0x1c20 && fi.TBP0 == 0xe00 //ntsc (EU DVD) + || fi.FBP == 0x1e20 && fi.TBP0 == 0x1000 //pal1 + || fi.FBP == 0x1620 && fi.TBP0 == 0x800 //pal2 + ) + && fi.TPSM == PSM_PSMZ24 + && fi.FPSM == PSM_PSMCT32 + /* + && fi.FBMSK ==0xffffff + && fi.TZTST + && !GSUtil::HasSharedBits(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM) + */ + ) + { + skip=17; + } + return true; +} + bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) { @@ -3223,6 +3271,8 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) map[CRC::TalesOfLegendia] = GSC_TalesOfLegendia; map[CRC::NanoBreaker] = GSC_NanoBreaker; map[CRC::Kunoichi] = GSC_Kunoichi; + map[CRC::Yakuza] = GSC_Yakuza; + map[CRC::Yakuza2] = GSC_Yakuza2; } // TODO: just set gsc in SetGameCRC once