From 9d8b93a2690710ae360e6670710910e906d53d14 Mon Sep 17 00:00:00 2001 From: JordanTheToaster Date: Thu, 25 Aug 2022 09:56:46 +0100 Subject: [PATCH] Revert "GS-hw: Purge MidnightClub3 crc hacks." This reverts commit f53fbd62826098a11887b943b267e7e31642def8. --- pcsx2/GS/GSCrc.cpp | 3 +++ pcsx2/GS/GSCrc.h | 1 + pcsx2/GS/Renderers/HW/GSHwHack.cpp | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/pcsx2/GS/GSCrc.cpp b/pcsx2/GS/GSCrc.cpp index 0704d0c6fe..bfb8b93a48 100644 --- a/pcsx2/GS/GSCrc.cpp +++ b/pcsx2/GS/GSCrc.cpp @@ -225,6 +225,9 @@ const CRC::Game CRC::m_games[] = {0xDDF76A98, BurnoutGames, JP, 0}, // BurnoutDominator {0x8C9576B4, BurnoutGames, EU, 0}, // BurnoutDominator {0x8C9C76B4, BurnoutGames, EU, 0}, // BurnoutDominator + {0x4A0E5B3A, MidnightClub3, US, 0}, // dub + {0xEBE1972D, MidnightClub3, EU, 0}, // dub + {0x60A42FF5, MidnightClub3, US, 0}, // remix {0x43AB7214, TalesOfLegendia, US, 0}, {0x1F8640E0, TalesOfLegendia, JP, 0}, {0xE4F5DA2B, TalesOfLegendia, KO, 0}, diff --git a/pcsx2/GS/GSCrc.h b/pcsx2/GS/GSCrc.h index f63b4abc90..42211ac1fa 100644 --- a/pcsx2/GS/GSCrc.h +++ b/pcsx2/GS/GSCrc.h @@ -50,6 +50,7 @@ public: Lamune, Manhunt2, MetalSlug6, + MidnightClub3, Okami, Oneechanbara2Special, PolyphonyDigitalGames, diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index bd8e7ca547..d8d4a8f1c1 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -390,6 +390,22 @@ bool GSC_BurnoutGames(const GSFrameInfo& fi, int& skip) return true; } +bool GSC_MidnightClub3(const GSFrameInfo& fi, int& skip) +{ + if (skip == 0) + { + if (fi.TME && (fi.FBP > 0x01d00 && fi.FBP <= 0x02a00) && fi.FPSM == PSM_PSMCT32 && (fi.FBP >= 0x01600 && fi.FBP < 0x03260) && fi.TPSM == PSM_PSMT8H) + { + // Vram usage. + // Tested: tokyo default cruise. + // Move around a bit, stop car, wait as vram goes down, start moving again, vram spike. + skip = 1; + } + } + + return true; +} + bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip) { if (skip == 0) @@ -831,6 +847,7 @@ void GSState::SetupCrcHack() lut[CRC::KnightsOfTheTemple2] = GSC_KnightsOfTheTemple2; lut[CRC::Kunoichi] = GSC_Kunoichi; lut[CRC::Manhunt2] = GSC_Manhunt2; + lut[CRC::MidnightClub3] = GSC_MidnightClub3; lut[CRC::SacredBlaze] = GSC_SacredBlaze; lut[CRC::SakuraTaisen] = GSC_SakuraTaisen; lut[CRC::SakuraWarsSoLongMyLove] = GSC_SakuraWarsSoLongMyLove;