From 3c91c750e73c5d5bfa8905bafa842225ea8e5d52 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Mon, 1 Dec 2008 21:47:22 +0000 Subject: [PATCH] Apply some of the changes from r367 to Linux and 64 bit versions. Also add a 'Normal' button to the (Linux) speedhack dialog. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@370 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/GS.cpp | 4 ++-- pcsx2/Linux/GtkGui.cpp | 20 ++++++++++++++++---- pcsx2/Linux/callbacks.h | 4 ++++ pcsx2/Linux/interface.c | 34 ++++++++++++++++++++++------------ pcsx2/Linux/pcsx2.glade | 29 +++++++++++++++++++++-------- pcsx2/PsxCounters.h | 4 ++-- pcsx2/x86/ix86-64/iR5900-64.c | 8 -------- 7 files changed, 67 insertions(+), 36 deletions(-) diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index 3af8b84037..14f7776cd1 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -815,8 +815,8 @@ static __forceinline void TagPathTransfer( GIFTAG* ptag, GIFTAG *path ) // simulates a GIF tag u32 GSgifTransferDummy(int path, u32 *pMem, u32 size) { - int nreg, i, nloop; - u32 curreg; + int nreg = 0, i, nloop; + u32 curreg = 0; u32 tempreg; GIFTAG* ptag = &g_path[path]; diff --git a/pcsx2/Linux/GtkGui.cpp b/pcsx2/Linux/GtkGui.cpp index 87d4640c83..f81f277e50 100644 --- a/pcsx2/Linux/GtkGui.cpp +++ b/pcsx2/Linux/GtkGui.cpp @@ -710,10 +710,24 @@ void on_Speed_Hack_Compatability(GtkButton *button, gpointer user_data) set_checked(SpeedHacksDlg, "check_Disable_Underflow", TRUE); set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", FALSE); set_checked(SpeedHacksDlg, "check_Triple_Sync", FALSE); - //set_checked(SpeedHacksDlg, "check_EE_Fast_Branches", FALSE); set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", TRUE); set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", TRUE); +} +void on_Speed_Hack_Normal(GtkButton *button, gpointer user_data) +{ + set_checked(SpeedHacksDlg, "check_EE_Double_Sync", FALSE); + + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboVUOverflow")), 1); + gtk_combo_box_set_active(GTK_COMBO_BOX(lookup_widget(SpeedHacksDlg, "ComboFPUOverflow")), 1); + + set_checked(SpeedHacksDlg, "check_Tight_SPU_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_Underflow", FALSE); + set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_Triple_Sync", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", FALSE); + set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", FALSE); + } void on_Speed_Hack_Speed(GtkButton *button, gpointer user_data) { @@ -725,8 +739,7 @@ void on_Speed_Hack_Speed(GtkButton *button, gpointer user_data) set_checked(SpeedHacksDlg, "check_Tight_SPU_Sync", FALSE); set_checked(SpeedHacksDlg, "check_Disable_Underflow", TRUE); set_checked(SpeedHacksDlg, "check_IOP_Double_Sync", TRUE); - set_checked(SpeedHacksDlg, "check_Triple_Sync", TRUE); - //set_checked(SpeedHacksDlg, "check_EE_Fast_Branches", FALSE); + set_checked(SpeedHacksDlg, "check_Triple_Sync", FALSE); set_checked(SpeedHacksDlg, "check_Disable_VU_Flags", TRUE); set_checked(SpeedHacksDlg, "check_Disable_FPU_Flags", TRUE); @@ -754,7 +767,6 @@ void on_Speed_Hack_OK(GtkButton *button, gpointer user_data) Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_Underflow") ? FLAG_NO_UNDERFLOW : 0; Config.Hacks |= is_checked(SpeedHacksDlg, "check_IOP_Double_Sync") ? FLAG_IOP_2_SYNC : 0; Config.Hacks |= is_checked(SpeedHacksDlg, "check_Triple_Sync") ? FLAG_TRIPLE_SYNC : 0; - //Config.Hacks |= is_checked(SpeedHacksDlg, "check_EE_Fast_Branches") ? FLAG_FAST_BRANCHES : 0; Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_VU_Flags") ? FLAG_NO_VU_FLAGS : 0; Config.Hacks |= is_checked(SpeedHacksDlg, "check_Disable_FPU_Flags")? FLAG_NO_FPU_FLAGS : 0; Config.Hacks |= is_checked(SpeedHacksDlg, "check_ESC_Hack") ? FLAG_ESC : 0; diff --git a/pcsx2/Linux/callbacks.h b/pcsx2/Linux/callbacks.h index b4ca629c18..a86e22d00b 100644 --- a/pcsx2/Linux/callbacks.h +++ b/pcsx2/Linux/callbacks.h @@ -21,6 +21,10 @@ void on_Speed_Hack_Speed (GtkButton *button, gpointer user_data); +void +on_Speed_Hack_Normal (GtkButton *button, + gpointer user_data); + void on_Speed_Hack_OK (GtkButton *button, gpointer user_data); diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c index 63b35bb7cb..84557ff328 100644 --- a/pcsx2/Linux/interface.c +++ b/pcsx2/Linux/interface.c @@ -328,7 +328,8 @@ create_SpeedHacksDlg (void) GtkWidget *button73; GtkWidget *button74; GtkWidget *button75; - GtkWidget *button76; + GtkWidget *button99; + GtkWidget *button98; SpeedHacksDlg = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (SpeedHacksDlg), _("PCSX2 Speed Hacks")); @@ -448,7 +449,7 @@ create_SpeedHacksDlg (void) gtk_widget_show (check_IOP_Double_Sync); gtk_box_pack_start (GTK_BOX (vbox34), check_IOP_Double_Sync, FALSE, FALSE, 0); - check_Triple_Sync = gtk_check_button_new_with_mnemonic (_("EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. ( Sometimes speeds games a bit more, but can break games. )")); + check_Triple_Sync = gtk_check_button_new_with_mnemonic (_("EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. (Even faster, but very unstable. Use at your own risk!)")); gtk_widget_show (check_Triple_Sync); gtk_box_pack_start (GTK_BOX (vbox34), check_Triple_Sync, FALSE, FALSE, 0); @@ -471,7 +472,7 @@ create_SpeedHacksDlg (void) gtk_widget_show (vbox33); gtk_container_add (GTK_CONTAINER (alignment9), vbox33); - check_Tight_SPU_Sync = gtk_check_button_new_with_mnemonic (_("Tighter SPU2 Sync ( FFXII vids) - Slower, not very useful anymore.")); + check_Tight_SPU_Sync = gtk_check_button_new_with_mnemonic (_("Tighter SPU2 Sync (Try this if you have stuttering audio) - a bit slower.")); gtk_widget_show (check_Tight_SPU_Sync); gtk_box_pack_start (GTK_BOX (vbox33), check_Tight_SPU_Sync, FALSE, FALSE, 0); @@ -498,15 +499,20 @@ create_SpeedHacksDlg (void) gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button74, 0); GTK_WIDGET_SET_FLAGS (button74, GTK_CAN_DEFAULT); - button75 = gtk_button_new_from_stock ("gtk-ok"); + button75 = gtk_button_new_with_mnemonic (_("Normal")); gtk_widget_show (button75); - gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button75, GTK_RESPONSE_OK); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button75, 0); GTK_WIDGET_SET_FLAGS (button75, GTK_CAN_DEFAULT); - button76 = gtk_button_new_from_stock ("gtk-cancel"); - gtk_widget_show (button76); - gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button76, GTK_RESPONSE_CANCEL); - GTK_WIDGET_SET_FLAGS (button76, GTK_CAN_DEFAULT); + button99 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (button99); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button99, GTK_RESPONSE_OK); + GTK_WIDGET_SET_FLAGS (button99, GTK_CAN_DEFAULT); + + button98 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_show (button98); + gtk_dialog_add_action_widget (GTK_DIALOG (SpeedHacksDlg), button98, GTK_RESPONSE_CANCEL); + GTK_WIDGET_SET_FLAGS (button98, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) button73, "clicked", G_CALLBACK (on_Speed_Hack_Compatability), @@ -515,9 +521,12 @@ create_SpeedHacksDlg (void) G_CALLBACK (on_Speed_Hack_Speed), NULL); g_signal_connect ((gpointer) button75, "clicked", + G_CALLBACK (on_Speed_Hack_Normal), + NULL); + g_signal_connect ((gpointer) button99, "clicked", G_CALLBACK (on_Speed_Hack_OK), NULL); - g_signal_connect ((gpointer) button76, "clicked", + g_signal_connect ((gpointer) button98, "clicked", G_CALLBACK (On_Dialog_Cancelled), NULL); @@ -560,7 +569,8 @@ create_SpeedHacksDlg (void) GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button73, "button73"); GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button74, "button74"); GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button75, "button75"); - GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button76, "button76"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button99, "button99"); + GLADE_HOOKUP_OBJECT (SpeedHacksDlg, button98, "button98"); return SpeedHacksDlg; } @@ -3645,7 +3655,7 @@ create_CpuDlg (void) gtk_widget_show (GtkCheckButton_MTGS); gtk_box_pack_start (GTK_BOX (vbox47), GtkCheckButton_MTGS, FALSE, FALSE, 0); - GtkCheckButton_CpuDC = gtk_check_button_new_with_mnemonic (_("Dual Core Mode (DC) - Much faster, but only valid with MTGS")); + GtkCheckButton_CpuDC = gtk_check_button_new_with_mnemonic (_("Dual Core Mode (DC) - Only valid with MTGS. \nKeeps one core busy, sometimes improving FPS. \nNote that this increases the heat your CPU produces, \nso leave it off on Notebooks.")); gtk_widget_show (GtkCheckButton_CpuDC); gtk_box_pack_start (GTK_BOX (vbox47), GtkCheckButton_CpuDC, FALSE, FALSE, 0); diff --git a/pcsx2/Linux/pcsx2.glade b/pcsx2/Linux/pcsx2.glade index f22690872b..558d53f48b 100644 --- a/pcsx2/Linux/pcsx2.glade +++ b/pcsx2/Linux/pcsx2.glade @@ -625,6 +625,20 @@ + True + True + True + Normal + True + GTK_RELIEF_NORMAL + True + 0 + + + + + + True True True @@ -638,7 +652,7 @@ - + True True True @@ -1041,7 +1055,7 @@ Enabled (Helps SPS, Slow) True True - EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. ( Sometimes speeds games a bit more, but can break games. ) + EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. (Even faster, but very unstable. Use at your own risk!) True GTK_RELIEF_NORMAL True @@ -1119,7 +1133,7 @@ Enabled (Helps SPS, Slow) True True - Tighter SPU2 Sync ( FFXII vids) - Slower, not very useful anymore. + Tighter SPU2 Sync (Try this if you have stuttering audio) - a bit slower. True GTK_RELIEF_NORMAL True @@ -1152,10 +1166,6 @@ Enabled (Helps SPS, Slow) False - - - - @@ -7029,7 +7039,10 @@ Version x.x True True - Dual Core Mode (DC) - Much faster, but only valid with MTGS + Dual Core Mode (DC) - Only valid with MTGS. +Keeps one core busy, sometimes improving FPS. +Note that this increases the heat your CPU produces, +so leave it off on Notebooks. True GTK_RELIEF_NORMAL True diff --git a/pcsx2/PsxCounters.h b/pcsx2/PsxCounters.h index f7198421a7..857bfa38bc 100644 --- a/pcsx2/PsxCounters.h +++ b/pcsx2/PsxCounters.h @@ -57,7 +57,7 @@ void psxVBlankStart(); void psxVBlankEnd(); void psxCheckStartGate16(int i); void psxCheckEndGate16(int i); -static void psxCheckStartGate32(int i); -static void psxCheckEndGate32(int i); +//static void psxCheckStartGate32(int i); +//static void psxCheckEndGate32(int i); #endif /* __PSXCOUNTERS_H__ */ diff --git a/pcsx2/x86/ix86-64/iR5900-64.c b/pcsx2/x86/ix86-64/iR5900-64.c index e57e4ad280..c517f13b88 100644 --- a/pcsx2/x86/ix86-64/iR5900-64.c +++ b/pcsx2/x86/ix86-64/iR5900-64.c @@ -1731,8 +1731,6 @@ void StopPerfCounter() #endif } -#define USE_FAST_BRANCHES CHECK_FASTBRANCHES - //void testfpu() //{ // int i; @@ -1776,12 +1774,6 @@ static void iBranchTest(u32 newpc, u32 cpuBranch) //CALLFunc((uptr)testfpu); #endif - if( USE_FAST_BRANCHES && (cpuBranch==0) ) - { - ADD32ItoM((uptr)&cpuRegs.cycle, s_nBlockCycles*9/8); - return; - } - MOV32MtoR(ECX, (uptr)&cpuRegs.cycle); ADD32ItoR(ECX, s_nBlockCycles * EECYCLE_MULT); MOV32RtoM((uptr)&cpuRegs.cycle, ECX); // update cycles