From 4e7e7f2dd5e549183e1a233db3f7a2950ec58326 Mon Sep 17 00:00:00 2001 From: i30817 Date: Tue, 2 Jun 2015 00:27:48 +0100 Subject: [PATCH] Nocturne, DDS1 and DDS2 CRC hacks to remove motion blur and smudge filter Signed-off-by: i30817 --- plugins/GSdx/GSSetting.cpp | 2 +- plugins/GSdx/GSState.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index f37e8136f0..615470239e 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -56,7 +56,7 @@ const char* dialog_message(int ID, bool* updateText) { case IDC_AGGRESSIVECRC: return "Use more aggressive CRC hacks on some games\n\n" "Only affects few games, removing some effects which might make the image sharper/clearer.\n" - "Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3.\n" + "Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3, SMT3, SMTDDS1, SMTDDS2.\n" "Works as a speedhack for: Steambot Chronicles."; case IDC_ALPHASTENCIL: return "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n" diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 779ae11ebf..e34be1ff08 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -3427,6 +3427,23 @@ bool GSC_SacredBlaze(const GSFrameInfo& fi, int& skip) return true; } +template +bool GSC_SMTNocturneDDS(const GSFrameInfo& fi, int& skip) +{ + // stop the motion blur on the main character and + // smudge filter from being drawn on USA versions of + // Nocturne, Digital Devil Saga 1 and Digital Devil Saga 2 + // Nocturne: + // -0x5900($gp), ref at 0x100740 + const int state = *(int*)(state_addr); + + if(g_aggressive && g_crc_region == CRC::US && skip == 0 && fi.TBP0 == 0xE00 && fi.TME && (state == 23 || state == 24 || state == 25)) + { + skip = 1; + } + return true; +} + bool GSC_Spartan(const GSFrameInfo& fi, int& skip) { if(skip == 0) @@ -5514,6 +5531,9 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) map[CRC::UrbanReign] = GSC_UrbanReign; map[CRC::SteambotChronicles] = GSC_SteambotChronicles; map[CRC::SacredBlaze] = GSC_SacredBlaze; + map[CRC::SMTNocturne] = GSC_SMTNocturneDDS<0x2054E870>; + map[CRC::SMTDDS1] = GSC_SMTNocturneDDS<0x203BA820>; + map[CRC::SMTDDS2] = GSC_SMTNocturneDDS<0x20435BF0>; } // TODO: just set gsc in SetGameCRC once