diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 8e17d05cb4..016e478193 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -335,7 +335,7 @@ CRC::Game CRC::m_games[] = {0xE0347841, XE3, JP, 0}, //異域傳說3 {0xA4E88698, XE3, CH, 0}, {0x2088950A, XE3, US, 0}, - {0x79B8A95F, DevilMayCry3, US, 0}, + // DMC(1)? {0x79B8A95F, DevilMayCry3, US, 0}, {0x7F3D692D, DevilMayCry3, CH, 0}, {0x1A85E924, DevilMayCry3, CH, 0}, //惡魔獵人3三合一中文特別版 {0x0a8ef911, ArctheLad, US, 0}, //亞克傳承-精靈之黃昏 @@ -350,6 +350,7 @@ CRC::Game CRC::m_games[] = {0xB05805B6, TombRaiderAnniversary, JP, 0}, //十週年紀念版 重返禁地 {0xBC8B3F50, TombRaiderLegend, US, 0}, //7代傳奇 {0x08FFF00D, SSX3, JP, 0}, //極限滑雪3 + {0xCE942B2A, SSX3, EU, 0}, {0x5C891FF1, Black, US, 0}, {0xCAA04879, Black, EU, 0}, {0xADDFF505, Black, EU, 0}, //? @@ -465,7 +466,9 @@ CRC::Game CRC::m_games[] = {0xCDEE4B19, RogueGalaxy, JP, 0}, {0xF7F181C3, DeathByDegreesTekkenNinaWilliams, CH, 0}, //鐵拳妮娜 {0xF088FA5B, DeathByDegreesTekkenNinaWilliams, KO, 0}, + {0x59683BB0, DeathByDegreesTekkenNinaWilliams, EU, 0}, {0x771C3B47, AlpineRacer3, JP, 0}, //阿爾卑斯山滑雪大賽3 + {0x7367D841, AlpineRacer3, EU, 0}, {0x449E1F6B, HummerBadlands, US, 0}, {0xAEA1B3AD, SengokuBasara, JP, 0}, {0x5B659BED, Grandia3, JP, 0}, @@ -482,6 +485,7 @@ CRC::Game CRC::m_games[] = {0x027C604C, SoulCalibur3, US, 0}, {0x24090A12, SoulCalibur3, EU, 0}, {0x37B99B14, SoulCalibur3, KO, 0}, + {0xBC5480A3, SoulCalibur3, EU, 0}, {0xFC0F8A5B, Simple2000Vol114, JP, 0}, {0x0098F740, SeintoSeiya, NoRegion, 0}, //聖鬥士星矢-黃道十二宮 {0xBDD9BAAD, UrbanReign, US, 0}, //街頭爭霸 diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index deaad50046..b36857369c 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -422,6 +422,7 @@ void GSHacksDlg::OnInit() CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfig("UserHacks_HalfPixelOffset", 0)); CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0)); CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0)); + CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0)); @@ -483,6 +484,11 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) helpstr = "Multisample Anti-Aliasing\n\nEnables hardware Anti-Aliasing. Needs lots of memory." " The Z-24 modes might need to have LogarithmicZ to compensate for the bits lost (only in DX9 mode)."; break; + case IDC_AGGRESSIVECRC: + helpstr = "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, GOW2, SoTC, SSX3."; + break; default: helpstr = "Hover over an item to get a description."; break; @@ -506,6 +512,7 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) theApp.SetConfig("UserHacks_SpriteHack", (int)IsDlgButtonChecked(m_hWnd, IDC_SPRITEHACK)); theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0)); theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK)); + theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC)); EndDialog(m_hWnd, id); } break; } diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index f3f3504563..c7a44ee95a 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -111,6 +111,8 @@ GSState::GSState() s_save = !!theApp.GetConfig("save", 0); s_savez = !!theApp.GetConfig("savez", 0); s_saven = theApp.GetConfig("saven", 0); + + userHacks_AggressiveCRC = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AggressiveCRC", 0) : 0; } GSState::~GSState() @@ -2871,6 +2873,7 @@ struct GSFrameInfo typedef bool (*GetSkipCount)(const GSFrameInfo& fi, int& skip); CRC::Region g_crc_region = CRC::NoRegion; +int g_aggressive = 0; bool GSC_Okami(const GSFrameInfo& fi, int& skip) { @@ -3044,7 +3047,7 @@ bool GSC_SoTC(const GSFrameInfo& fi, int& skip) // Not needed anymore? What did it fix anyway? (rama) if(skip == 0) { - if(fi.TME /*&& fi.FBP == 0x03d80*/ && fi.FPSM == 0 && fi.TBP0 == 0x03fc0 && fi.TPSM == 1) + if(g_aggressive && fi.TME /*&& fi.FBP == 0x03d80*/ && fi.FPSM == 0 && fi.TBP0 == 0x03fc0 && fi.TPSM == 1) { skip = 48; //removes sky bloom } @@ -3429,13 +3432,13 @@ bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip) { skip = 1; // wall of fog } - else if(fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100 //消水下黑線跟光源 + else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100 //消水下黑線跟光源 { - skip = 1; // 重影 + skip = 1; // global haze/halo } - else if(fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P下2e80 + else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P下2e80 { - skip = 1; // 水下黑線 + skip = 1; // water effect and water vertical lines } } } @@ -3594,11 +3597,11 @@ bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip) /*if(fi.TME && (fi.FBP == 0x018c0 || fi.FBP == 0x02180) && fi.FPSM == fi.TPSM && fi.TBP0 >= 0x03200 && fi.TPSM == PSM_PSMCT32) //NTSC only, !(fi.TBP0 == 0x03580 || fi.TBP0 == 0x03960) { skip = 1; //red garbage in lost forest, removes other effects... - }*/ + } if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF) { - skip = 1; // CMV的豎紋 - } + skip = 1; // //garbage in cutscenes, doesn't remove completely, better use "Alpha Hack" + }*/ if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH) { skip = 1000; // @@ -3912,7 +3915,7 @@ bool GSC_ShadowofRome(const GSFrameInfo& fi, int& skip) bool GSC_FFXII(const GSFrameInfo& fi, int& skip) { - if(skip == 0) + if(g_aggressive && skip == 0) { if(fi.TME) { @@ -3930,7 +3933,7 @@ bool GSC_FFXII(const GSFrameInfo& fi, int& skip) bool GSC_FFX2(const GSFrameInfo& fi, int& skip) { - if(skip == 0) + if(g_aggressive && skip == 0) { if(fi.TME) { @@ -3948,7 +3951,7 @@ bool GSC_FFX2(const GSFrameInfo& fi, int& skip) bool GSC_FFX(const GSFrameInfo& fi, int& skip) { - if(skip == 0) + if(g_aggressive && skip == 0) { if(fi.TME) { @@ -4251,7 +4254,7 @@ bool GSC_TombRaiderUnderWorld(const GSFrameInfo& fi, int& skip) bool GSC_SSX3(const GSFrameInfo& fi, int& skip) { - if(skip == 0) + if(g_aggressive && skip == 0) { if(fi.TME) { @@ -5313,6 +5316,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) GetSkipCount gsc = map[m_game.title]; g_crc_region = m_game.region; + g_aggressive = userHacks_AggressiveCRC; #ifdef ENABLE_DYNAMIC_CRC_HACK bool res=false; if(IsInvokedDynamicCrcHack(fi, skip, g_crc_region, res, m_crc)){ if( !res ) return false; } else diff --git a/plugins/GSdx/GSState.h b/plugins/GSdx/GSState.h index 6a16caba81..b453bb67c4 100644 --- a/plugins/GSdx/GSState.h +++ b/plugins/GSdx/GSState.h @@ -138,6 +138,7 @@ class GSState : public GSAlignedClass<32> protected: bool IsBadFrame(int& skip, int UserHacks_SkipDraw); + int userHacks_AggressiveCRC; GSVertex m_v; float m_q; diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index d3a216214e..efc09a3514 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -93,6 +93,7 @@ BEGIN COMBOBOX IDC_MSAACB,35,18,44,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10 LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145 + CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10 END IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129 diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index 3cf1d4c3ef..28d6f78f4c 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -92,6 +92,8 @@ #define IDC_HACK_DESCRIPTION 2073 #define IDC_STATIC_MSAA 2074 #define IDC_STATIC_SKIPDRAW 2075 +#define IDC_CHECK_AGGRESSIVECRC 2076 +#define IDC_AGGRESSIVECRC 2076 #define IDC_COLORSPACE 3000 #define IDR_CONVERT_FX 10000 #define IDR_TFX_FX 10001 @@ -110,7 +112,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 10012 #define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 2076 +#define _APS_NEXT_CONTROL_VALUE 2077 #define _APS_NEXT_SYMED_VALUE 5000 #endif #endif diff --git a/tools/dynacrchack/DynaCrcHack.c b/tools/dynacrchack/DynaCrcHack.c index f636b88add..fd6a2fb32d 100644 --- a/tools/dynacrchack/DynaCrcHack.c +++ b/tools/dynacrchack/DynaCrcHack.c @@ -126,6 +126,9 @@ if( IsCRC(0x086273D2, 0x26A6E286, 0x9F185CE1) ){ // 3 first MGS3 CRCs from GSCrc return true; } + + +return true; } /*********** Dynamic CRC hack code ends here *****************/ @@ -216,7 +219,7 @@ typedef struct _stats { uint32 overall, changed, skipped, nextPrint;} Stats; #define CRC_HACK DynamicCrcHack2 #define CRC_HACK_OLD DynamicCrcHack #if INITIAL_MODE == 0 - #define CRC_HACK Voldemort + #define CRC_HACK Voldemort2 #define CRC_HACK_OLD Voldemort #endif DLL_EXPORT bool CRC_HACK (uint32 FBP, uint32 FPSM, uint32 FBMSK, uint32 TBP0, uint32 TPSM, uint32 TZTST,