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
This commit is contained in:
arcum42 2008-12-01 21:47:22 +00:00 committed by Gregory Hainaut
parent 464e95742e
commit 3c91c750e7
7 changed files with 67 additions and 36 deletions

View File

@ -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];

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -625,6 +625,20 @@
<child>
<widget class="GtkButton" id="button75">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Normal</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_Speed_Hack_Normal" last_modification_time="Mon, 01 Dec 2008 21:19:02 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button99">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@ -638,7 +652,7 @@
</child>
<child>
<widget class="GtkButton" id="button76">
<widget class="GtkButton" id="button98">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@ -1041,7 +1055,7 @@ Enabled (Helps SPS, Slow)</property>
<widget class="GtkCheckButton" id="check_Triple_Sync">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. ( Sometimes speeds games a bit more, but can break games. )</property>
<property name="label" translatable="yes">EE/IOP Sync Hack (x3) - Makes EE and IOP hacks triple the cycle rate. (Even faster, but very unstable. Use at your own risk!)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@ -1119,7 +1133,7 @@ Enabled (Helps SPS, Slow)</property>
<widget class="GtkCheckButton" id="check_Tight_SPU_Sync">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Tighter SPU2 Sync ( FFXII vids) - Slower, not very useful anymore.</property>
<property name="label" translatable="yes">Tighter SPU2 Sync (Try this if you have stuttering audio) - a bit slower.</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@ -1152,10 +1166,6 @@ Enabled (Helps SPS, Slow)</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
@ -7029,7 +7039,10 @@ Version x.x</property>
<widget class="GtkCheckButton" id="GtkCheckButton_CpuDC">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Dual Core Mode (DC) - Much faster, but only valid with MTGS</property>
<property name="label" translatable="yes">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.</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>

View File

@ -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__ */

View File

@ -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