diff --git a/common/include/Pcsx2Config.h b/common/include/Pcsx2Config.h index 05a693f28b..a539cea503 100644 --- a/common/include/Pcsx2Config.h +++ b/common/include/Pcsx2Config.h @@ -70,6 +70,7 @@ extern SessionOverrideFlags g_Session; #define CHECK_FPUCOMPAREHACK (Config.GameFixes & 0x4) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu. #define CHECK_VUCLIPFLAGHACK (Config.GameFixes & 0x2) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again). #define CHECK_FPUMULHACK (Config.GameFixes & 0x8) // Special Fix for Tales of Destiny hangs. +#define CHECK_DMAEXECHACK (Config.GameFixes & 0x10) // Special Fix for Fatal Frame; breaks Gust and Tri-Ace games. //------------ Advanced Options!!! --------------- #define CHECK_VU_OVERFLOW (Config.vuOptions & 0x1) diff --git a/pcsx2/HwWrite.cpp b/pcsx2/HwWrite.cpp index 85645df444..17924fdada 100644 --- a/pcsx2/HwWrite.cpp +++ b/pcsx2/HwWrite.cpp @@ -102,8 +102,8 @@ static void DmaExec( void (*func)(), u32 mem, u32 value ) DMA_LOG( "DMAExec32 Attempt to run DMA while one is already active mem = %x", mem ); // Returning here breaks every single Gust game written. :( - // Not returning here breaks a bunch of other games. I'll let someone else figure it out... - return; + // Not returning here breaks Fatal Frame. Gamefix time. + if (CHECK_DMAEXECHACK) return; } // Upper 16bits of QWC should not be written since QWC is 16bits in size. diff --git a/pcsx2/Linux/HacksDlg.cpp b/pcsx2/Linux/HacksDlg.cpp index e9ebc80936..e620ba0ccc 100644 --- a/pcsx2/Linux/HacksDlg.cpp +++ b/pcsx2/Linux/HacksDlg.cpp @@ -29,6 +29,7 @@ GtkWidget *GameFixDlg, *SpeedHacksDlg; set_checked(GameFixDlg, "check_FPU_Compare", (Config.GameFixes & FLAG_FPU_Compare)); set_checked(GameFixDlg, "check_FPU_Mul", (Config.GameFixes & FLAG_FPU_MUL)); + set_checked(GameFixDlg, "check_DMAExec", (Config.GameFixes & FLAG_DMAExec)); gtk_widget_show_all(GameFixDlg); gtk_widget_set_sensitive(MainWindow, FALSE); @@ -45,6 +46,7 @@ void on_Game_Fix_OK(GtkButton *button, gpointer user_data) Config.GameFixes |= is_checked(GameFixDlg, "check_FPU_Compare") ? FLAG_FPU_Compare : 0; Config.GameFixes |= is_checked(GameFixDlg, "check_FPU_Mul") ? FLAG_FPU_MUL : 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_DMAExec") ? FLAG_DMAExec : 0; SaveConfig(); diff --git a/pcsx2/Linux/Linux.h b/pcsx2/Linux/Linux.h index e1cf6b6272..15252e76c5 100644 --- a/pcsx2/Linux/Linux.h +++ b/pcsx2/Linux/Linux.h @@ -125,6 +125,8 @@ char ee_cycle_labels[3][256] = #define FLAG_FPU_Compare 0x4 //Tales of Destiny - IDC_GAMEFIX5 #define FLAG_FPU_MUL 0x8 +//Fatal Frame +#define FLAG_DMAExec 0x10 #define FLAG_VU_NO_OVERFLOW 0x2 #define FLAG_VU_EXTRA_OVERFLOW 0x40 diff --git a/pcsx2/Linux/callbacks.h b/pcsx2/Linux/callbacks.h index 5cc7803634..5b02c1aa37 100644 --- a/pcsx2/Linux/callbacks.h +++ b/pcsx2/Linux/callbacks.h @@ -1,6 +1,10 @@ #include +void +On_Dialog_Close (GtkDialog *dialog, + gpointer user_data); + void on_Advanced_Defaults (GtkButton *button, gpointer user_data); @@ -246,6 +250,10 @@ void OnHelp_About (GtkMenuItem *menuitem, gpointer user_data); +void +OnCpuCheckToggled (GtkToggleButton *togglebutton, + gpointer user_data); + void OnCpu_Ok (GtkButton *button, gpointer user_data); @@ -257,11 +265,3 @@ OnLogging_Ok (GtkButton *button, void OnMemcards_Ok (GtkButton *button, gpointer user_data); - -void -On_Dialog_Close (GtkDialog *dialog, - gpointer user_data); - -void -OnCpuCheckToggled (GtkToggleButton *togglebutton, - gpointer user_data); diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c index 75943ba474..a6d8daaf5f 100644 --- a/pcsx2/Linux/interface.c +++ b/pcsx2/Linux/interface.c @@ -939,6 +939,7 @@ create_GameFixDlg (void) GtkWidget *check_VU_Add_Sub; GtkWidget *check_FPU_Mul; GtkWidget *check_VU_Clip; + GtkWidget *check_DMAExec; GtkWidget *label42; GtkWidget *dialog_action_area1; GtkWidget *cancelbutton1; @@ -990,6 +991,11 @@ create_GameFixDlg (void) gtk_widget_show (check_VU_Clip); gtk_box_pack_start (GTK_BOX (vbox30), check_VU_Clip, FALSE, FALSE, 0); + check_DMAExec = gtk_check_button_new_with_mnemonic (_("DMAExec Hack - Fixes Fatal Frame, possibly others.\nCauses freezing in Gust games and crashing in some TriAce games")); + gtk_widget_set_name (check_DMAExec, "check_DMAExec"); + gtk_widget_show (check_DMAExec); + gtk_box_pack_start (GTK_BOX (vbox30), check_DMAExec, FALSE, FALSE, 0); + label42 = gtk_label_new (_("Some games need special settings.\nConfigure them here.")); gtk_widget_set_name (label42, "label42"); gtk_widget_show (label42); @@ -1033,6 +1039,7 @@ create_GameFixDlg (void) GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Add_Sub, "check_VU_Add_Sub"); GLADE_HOOKUP_OBJECT (GameFixDlg, check_FPU_Mul, "check_FPU_Mul"); GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Clip, "check_VU_Clip"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_DMAExec, "check_DMAExec"); GLADE_HOOKUP_OBJECT (GameFixDlg, label42, "label42"); GLADE_HOOKUP_OBJECT_NO_REF (GameFixDlg, dialog_action_area1, "dialog_action_area1"); GLADE_HOOKUP_OBJECT (GameFixDlg, cancelbutton1, "cancelbutton1"); diff --git a/pcsx2/Linux/pcsx2.glade b/pcsx2/Linux/pcsx2.glade index b71dc51c68..54f489309d 100644 --- a/pcsx2/Linux/pcsx2.glade +++ b/pcsx2/Linux/pcsx2.glade @@ -1964,6 +1964,26 @@ If you have problems, Disable all of these and try again. False + + + + True + True + DMAExec Hack - Fixes Fatal Frame, possibly others. +Causes freezing in Gust games and crashing in some TriAce games + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + diff --git a/pcsx2/windows/WinMain.cpp b/pcsx2/windows/WinMain.cpp index 31cbc0add0..c361fcfe37 100644 --- a/pcsx2/windows/WinMain.cpp +++ b/pcsx2/windows/WinMain.cpp @@ -525,6 +525,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if(Config.GameFixes & 0x4) CheckDlgButton(hDlg, IDC_GAMEFIX3, TRUE);//Digimon FPU compare fix if(Config.GameFixes & 0x2) CheckDlgButton(hDlg, IDC_GAMEFIX4, TRUE);//Persona3/4 fix if(Config.GameFixes & 0x8) CheckDlgButton(hDlg, IDC_GAMEFIX5, TRUE);//Tales of Destiny fix + //if(Config.GameFixes & 0x10) CheckDlgButton(hDlg, IDC_GAMEFIX?, TRUE);//Fatal Frame fix return TRUE; case WM_COMMAND: @@ -535,6 +536,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0; newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX4) ? 0x2 : 0; newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX5) ? 0x8 : 0; + //newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX?) ? 0x10 : 0; EndDialog(hDlg, TRUE); @@ -1056,7 +1058,7 @@ void CreateMainWindow() if(Config.PsxOut) CheckMenuItem(gApp.hMenu,ID_CONSOLE,MF_CHECKED); if(Config.Patch) CheckMenuItem(gApp.hMenu,ID_PATCHES,MF_CHECKED); if(Config.Profiler) CheckMenuItem(gApp.hMenu,ID_PROFILER,MF_CHECKED); - if(Config.cdvdPrint)CheckMenuItem(gApp.hMenu,ID_CDVDPRINT,MF_CHECKED); + if(Config.cdvdPrint) CheckMenuItem(gApp.hMenu,ID_CDVDPRINT,MF_CHECKED); if(Config.closeGSonEsc)CheckMenuItem(gApp.hMenu,ID_CLOSEGS,MF_CHECKED); hStatusWnd = CreateStatusWindow(WS_CHILD | WS_VISIBLE, "", hWnd, 100);