Nocturne, DDS1 and DDS2 CRC hacks to remove motion blur and smudge filter

Signed-off-by: i30817 <i30817@gmail.com>
This commit is contained in:
i30817 2015-06-02 00:27:48 +01:00 committed by Gregory Hainaut
parent 2503d9698c
commit 4e7e7f2dd5
2 changed files with 21 additions and 1 deletions

View File

@ -56,7 +56,7 @@ const char* dialog_message(int ID, bool* updateText) {
case IDC_AGGRESSIVECRC: case IDC_AGGRESSIVECRC:
return "Use more aggressive CRC hacks on some games\n\n" 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" "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."; "Works as a speedhack for: Steambot Chronicles.";
case IDC_ALPHASTENCIL: case IDC_ALPHASTENCIL:
return "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n" return "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n"

View File

@ -3427,6 +3427,23 @@ bool GSC_SacredBlaze(const GSFrameInfo& fi, int& skip)
return true; return true;
} }
template<uptr state_addr>
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) bool GSC_Spartan(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
@ -5514,6 +5531,9 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
map[CRC::UrbanReign] = GSC_UrbanReign; map[CRC::UrbanReign] = GSC_UrbanReign;
map[CRC::SteambotChronicles] = GSC_SteambotChronicles; map[CRC::SteambotChronicles] = GSC_SteambotChronicles;
map[CRC::SacredBlaze] = GSC_SacredBlaze; 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 // TODO: just set gsc in SetGameCRC once