diff --git a/build.sh b/build.sh
index f46dad8a8e..52444a06b8 100644
--- a/build.sh
+++ b/build.sh
@@ -8,15 +8,17 @@
#Normal
export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`"
-
#Optimized, but a devbuild
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd`"
#Debug / Devbuild version
#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`"
-# Make sure we have plugins, and bring the normal plugins in.
-#sh fetch.sh
+#ZeroGS Normal mode
+export ZEROGSOPTIONS="--enable-sse2"
+
+#ZeroGS Debug mode
+#export ZEROGSOPTIONS="--enable-debug --enable-devbuild --enable-sse2"
option=$@
export PCSX2PLUGINS="`pwd`/bin/plugins"
diff --git a/pcsx2/Linux/CpuDlg.cpp b/pcsx2/Linux/CpuDlg.cpp
index 36f09d059d..0fd1e7b07b 100644
--- a/pcsx2/Linux/CpuDlg.cpp
+++ b/pcsx2/Linux/CpuDlg.cpp
@@ -59,7 +59,7 @@ void OnCpu_Ok(GtkButton *button, gpointer user_data)
if (CHECK_MULTIGS)
Console::Notice("MTGS mode disabled.\n\tEnjoy the fruits of single-threaded simpicity.");
else
- Console::Notice("MTGS mode enabled.\n\tWelcome to multi-threaded awesomeness. And random crashes.");
+ Console::Notice("MTGS mode enabled.\n\tWelcome to multi-threaded awesomeness.");
}
Config.Options = newopts;
diff --git a/pcsx2/Linux/LnxMain.cpp b/pcsx2/Linux/LnxMain.cpp
index 0179172c97..b308a57e28 100644
--- a/pcsx2/Linux/LnxMain.cpp
+++ b/pcsx2/Linux/LnxMain.cpp
@@ -64,11 +64,11 @@ int main(int argc, char *argv[])
#endif
// make gtk thread safe if using MTGS
- if (CHECK_MULTIGS)
- {
+ /*if (CHECK_MULTIGS)
+ {*/
g_thread_init(NULL);
gdk_threads_init();
- }
+ /*}*/
if (UseGui)
{
@@ -256,14 +256,16 @@ void StartGui()
// check the appropriate menu items
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_console1")), Config.PsxOut);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_patches1")), Config.Patch);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "print_cdvd_info1")), Config.cdvdPrint);
// disable anything not implemented or not working properly.
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_browser1")), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_finder2")), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_EnterDebugger")), FALSE);
- //gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Memcards")), FALSE);
#ifndef PCSX2_DEVBUILD
- gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Logging")), FALSE);
+ /*gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Logging")), FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Arguments")), FALSE);*/
+ gtk_widget_destroy(lookup_widget(MainWindow, "GtkMenuItem_Debug"));
#endif
CheckSlots();
@@ -542,3 +544,8 @@ void on_enable_patches1_activate(GtkMenuItem *menuitem, gpointer user_data)
SaveConfig();
}
+void OnPrintCdvdInfo(GtkMenuItem *menuitem, gpointer user_data)
+{
+ Config.cdvdPrint = (int)gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem);
+ SaveConfig();
+}
diff --git a/pcsx2/Linux/Pref.cpp b/pcsx2/Linux/Pref.cpp
index cbfd93a8f0..a29f083efe 100644
--- a/pcsx2/Linux/Pref.cpp
+++ b/pcsx2/Linux/Pref.cpp
@@ -72,6 +72,7 @@ int LoadConfig()
Config.Lang[0] = 0;
GetValue("Lang", Config.Lang);
GetValuel("Ps2Out", Config.PsxOut);
+ GetValuel("cdvdPrint", Config.cdvdPrint);
GetValuel("ThPriority", Config.ThPriority);
GetValue("PluginsDir", Config.PluginsDir);
GetValue("BiosDir", Config.BiosDir);
@@ -137,6 +138,7 @@ void SaveConfig()
SetValue("PluginsDir", Config.PluginsDir);
SetValue("BiosDir", Config.BiosDir);
SetValuel("Ps2Out", Config.PsxOut);
+ SetValuel("cdvdPrint", Config.cdvdPrint);
SetValuel("ThPriority", Config.ThPriority);
SetValue("Mcd1", Config.Mcd1);
SetValue("Mcd2", Config.Mcd2);
diff --git a/pcsx2/Linux/callbacks.h b/pcsx2/Linux/callbacks.h
index 3d35b16927..2c181cd40c 100644
--- a/pcsx2/Linux/callbacks.h
+++ b/pcsx2/Linux/callbacks.h
@@ -266,10 +266,6 @@ void
OnEmu_Reset (GtkMenuItem *menuitem,
gpointer user_data);
-void
-OnEmu_Arguments (GtkMenuItem *menuitem,
- gpointer user_data);
-
void
OnConf_Conf (GtkMenuItem *menuitem,
gpointer user_data);
@@ -338,6 +334,10 @@ void
on_enable_patches1_activate (GtkMenuItem *menuitem,
gpointer user_data);
+void
+OnPrintCdvdInfo (GtkMenuItem *menuitem,
+ gpointer user_data);
+
void
OnDebug_Debugger (GtkMenuItem *menuitem,
gpointer user_data);
@@ -346,6 +346,10 @@ void
OnDebug_Logging (GtkMenuItem *menuitem,
gpointer user_data);
+void
+OnEmu_Arguments (GtkMenuItem *menuitem,
+ gpointer user_data);
+
void
OnHelp_About (GtkMenuItem *menuitem,
gpointer user_data);
diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c
index 0e42ec7330..ce61886b74 100644
--- a/pcsx2/Linux/interface.c
+++ b/pcsx2/Linux/interface.c
@@ -2420,7 +2420,6 @@ create_MainWindow (void)
GtkWidget *GtkMenuItem_Emulator_menu;
GtkWidget *GtkMenuItem_Run;
GtkWidget *GtkMenuItem_Reset;
- GtkWidget *GtkMenuItem_Arguments;
GtkWidget *GtkMenuItem_Configuration;
GtkWidget *GtkMenuItem_Configuration_menu;
GtkWidget *GtkMenuItem_PluginsBios;
@@ -2446,10 +2445,13 @@ create_MainWindow (void)
GtkWidget *separator7;
GtkWidget *enable_console1;
GtkWidget *enable_patches1;
+ GtkWidget *print_cdvd_info1;
GtkWidget *GtkMenuItem_Debug;
GtkWidget *GtkMenuItem_Debug_menu;
GtkWidget *GtkMenuItem_EnterDebugger;
GtkWidget *GtkMenuItem_Logging;
+ GtkWidget *separator8;
+ GtkWidget *GtkMenuItem_Arguments;
GtkWidget *GtkMenuItem_Help;
GtkWidget *GtkMenuItem_Help_menu;
GtkWidget *GtkMenuItem_About;
@@ -2576,10 +2578,6 @@ create_MainWindow (void)
gtk_widget_show (GtkMenuItem_Reset);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Emulator_menu), GtkMenuItem_Reset);
- GtkMenuItem_Arguments = gtk_menu_item_new_with_mnemonic (_("_Arguments"));
- gtk_widget_show (GtkMenuItem_Arguments);
- gtk_container_add (GTK_CONTAINER (GtkMenuItem_Emulator_menu), GtkMenuItem_Arguments);
-
GtkMenuItem_Configuration = gtk_menu_item_new_with_mnemonic (_("_Config"));
gtk_widget_show (GtkMenuItem_Configuration);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Configuration);
@@ -2681,6 +2679,10 @@ create_MainWindow (void)
gtk_widget_show (enable_patches1);
gtk_container_add (GTK_CONTAINER (misc1_menu), enable_patches1);
+ print_cdvd_info1 = gtk_check_menu_item_new_with_mnemonic (_("Print CDVD Info"));
+ gtk_widget_show (print_cdvd_info1);
+ gtk_container_add (GTK_CONTAINER (misc1_menu), print_cdvd_info1);
+
GtkMenuItem_Debug = gtk_menu_item_new_with_mnemonic (_("_Debug"));
gtk_widget_show (GtkMenuItem_Debug);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Debug);
@@ -2696,6 +2698,15 @@ create_MainWindow (void)
gtk_widget_show (GtkMenuItem_Logging);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), GtkMenuItem_Logging);
+ separator8 = gtk_separator_menu_item_new ();
+ gtk_widget_show (separator8);
+ gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), separator8);
+ gtk_widget_set_sensitive (separator8, FALSE);
+
+ GtkMenuItem_Arguments = gtk_menu_item_new_with_mnemonic (_("_Arguments"));
+ gtk_widget_show (GtkMenuItem_Arguments);
+ gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), GtkMenuItem_Arguments);
+
GtkMenuItem_Help = gtk_menu_item_new_with_mnemonic (_("_Help"));
gtk_widget_show (GtkMenuItem_Help);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Help);
@@ -2772,9 +2783,6 @@ create_MainWindow (void)
g_signal_connect ((gpointer) GtkMenuItem_Reset, "activate",
G_CALLBACK (OnEmu_Reset),
NULL);
- g_signal_connect ((gpointer) GtkMenuItem_Arguments, "activate",
- G_CALLBACK (OnEmu_Arguments),
- NULL);
g_signal_connect ((gpointer) GtkMenuItem_PluginsBios, "activate",
G_CALLBACK (OnConf_Conf),
NULL);
@@ -2826,12 +2834,18 @@ create_MainWindow (void)
g_signal_connect ((gpointer) enable_patches1, "activate",
G_CALLBACK (on_enable_patches1_activate),
NULL);
+ g_signal_connect ((gpointer) print_cdvd_info1, "activate",
+ G_CALLBACK (OnPrintCdvdInfo),
+ NULL);
g_signal_connect ((gpointer) GtkMenuItem_EnterDebugger, "activate",
G_CALLBACK (OnDebug_Debugger),
NULL);
g_signal_connect ((gpointer) GtkMenuItem_Logging, "activate",
G_CALLBACK (OnDebug_Logging),
NULL);
+ g_signal_connect ((gpointer) GtkMenuItem_Arguments, "activate",
+ G_CALLBACK (OnEmu_Arguments),
+ NULL);
g_signal_connect ((gpointer) GtkMenuItem_About, "activate",
G_CALLBACK (OnHelp_About),
NULL);
@@ -2868,7 +2882,6 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Emulator_menu, "GtkMenuItem_Emulator_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Run, "GtkMenuItem_Run");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Reset, "GtkMenuItem_Reset");
- GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Arguments, "GtkMenuItem_Arguments");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration, "GtkMenuItem_Configuration");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration_menu, "GtkMenuItem_Configuration_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_PluginsBios, "GtkMenuItem_PluginsBios");
@@ -2894,10 +2907,13 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, separator7, "separator7");
GLADE_HOOKUP_OBJECT (MainWindow, enable_console1, "enable_console1");
GLADE_HOOKUP_OBJECT (MainWindow, enable_patches1, "enable_patches1");
+ GLADE_HOOKUP_OBJECT (MainWindow, print_cdvd_info1, "print_cdvd_info1");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug, "GtkMenuItem_Debug");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug_menu, "GtkMenuItem_Debug_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_EnterDebugger, "GtkMenuItem_EnterDebugger");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Logging, "GtkMenuItem_Logging");
+ GLADE_HOOKUP_OBJECT (MainWindow, separator8, "separator8");
+ GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Arguments, "GtkMenuItem_Arguments");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help, "GtkMenuItem_Help");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help_menu, "GtkMenuItem_Help_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_About, "GtkMenuItem_About");
diff --git a/pcsx2/Linux/pcsx2.glade b/pcsx2/Linux/pcsx2.glade
index 734394be9e..8aa53458e6 100644
--- a/pcsx2/Linux/pcsx2.glade
+++ b/pcsx2/Linux/pcsx2.glade
@@ -4964,15 +4964,6 @@ Version x.x
-
-
-
-
@@ -5180,6 +5171,16 @@ Version x.x
+
+
+
+
@@ -5211,6 +5212,21 @@ Version x.x
+
+
+
+
+
+
+
+
diff --git a/pcsx2/configure.ac b/pcsx2/configure.ac
index 3e75ef8045..b44cb94a83 100644
--- a/pcsx2/configure.ac
+++ b/pcsx2/configure.ac
@@ -36,8 +36,10 @@ DEBUG_FLAGS=" -O0 -g "
fi
WARNING_FLAGS="-Wall -Wno-format -Wno-unused-value"
-#Pcsx2 now crashes if --fomit-frame-pointer is enabled and MTGS is off
-NORMAL_FLAGS=" -pipe -O3 -fno-omit-frame-pointer -msse "
+NORMAL_FLAGS=" -pipe -msse -O3 "
+# These optimizations seem to cause issues with GCC 4.3.3, so we'll turn them off.
+NORMAL_FLAGS+=" -fno-guess-branch-probability -fno-dse -fno-tree-dse "
+
DEBUG_FLAGS+=" -g -msse ${WARNING_FLAGS} "
dnl Check for debug build
@@ -47,7 +49,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
if test "x$debug" == xyes
then
AC_DEFINE(_DEBUG,1,[_DEBUG])
- CFLAGS+=" ${DEBUG_FLAGS} -fpermissive -Xlinker -zmuldefs "
+ CFLAGS+=" ${DEBUG_FLAGS} -Xlinker -zmuldefs "
CXXFLAGS+=" ${DEBUG_FLAGS} -fpermissive -Xlinker -zmuldefs "
CCASFLAGS+=" -D_DEBUG ${DEBUG_FLAGS} "
MYOBJDIR="Debug"
diff --git a/plugins/zerogs/build.sh b/plugins/zerogs/build.sh
index 6f73b174d1..d377f37b55 100644
--- a/plugins/zerogs/build.sh
+++ b/plugins/zerogs/build.sh
@@ -6,6 +6,10 @@ echo ----------------------
echo Building ZeroGS OpenGL
echo ----------------------
+if test "${ZEROGSOPTIONS+set}" != set ; then
+export ZEROGSOPTIONS="--enable-sse2"
+fi
+
cd ${curdir}/opengl
if [ $# -gt 0 ] && [ $1 = "all" ]
@@ -15,7 +19,8 @@ aclocal
automake
autoconf
chmod +x configure
-./configure --enable-sse2 --prefix=${PCSX2PLUGINS}
+./configure ${ZEROGSOPTIONS} --prefix=${PCSX2PLUGINS}
+
make clean
make install
diff --git a/plugins/zerogs/opengl/zerogs.cpp b/plugins/zerogs/opengl/zerogs.cpp
index 971174b10a..48a2257545 100644
--- a/plugins/zerogs/opengl/zerogs.cpp
+++ b/plugins/zerogs/opengl/zerogs.cpp
@@ -5010,6 +5010,7 @@ void ZeroGS::SetAlphaVariables(const alphaInfo& a)
s_srcalpha = GL_ONE;
s_dstalpha = GL_ZERO;
s_alphaeq = GL_FUNC_ADD;
+ s_rgbeq = GL_FUNC_ADD;
s_alphaInfo = a;
diff --git a/plugins/zerogs/opengl/zerogs.h b/plugins/zerogs/opengl/zerogs.h
index 9228cdcf61..a37492cae8 100644
--- a/plugins/zerogs/opengl/zerogs.h
+++ b/plugins/zerogs/opengl/zerogs.h
@@ -81,10 +81,56 @@ using namespace std;
#define B_RETURNX(x, rtype) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); return (##rtype); } }
#define B_G(x, action) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); action; } }
-#define GL_REPORT_ERROR() { err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); ZeroGS::HandleGLError(); } }
-#ifdef _DEBUG
-#define GL_REPORT_ERRORD() { GLenum err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); ZeroGS::HandleGLError(); } }
+static __forceinline char *error_name(int err)
+{
+ switch (err)
+ {
+ case GL_NO_ERROR:
+ return "GL_NO_ERROR";
+ case GL_INVALID_ENUM:
+ return "GL_INVALID_ENUM";
+ case GL_INVALID_VALUE:
+ return "GL_INVALID_VALUE";
+ case GL_INVALID_OPERATION:
+ return "GL_INVALID_OPERATION";
+ case GL_STACK_OVERFLOW:
+ return "GL_STACK_OVERFLOW";
+ case GL_STACK_UNDERFLOW:
+ return "GL_STACK_UNDERFLOW";
+ case GL_OUT_OF_MEMORY:
+ return "GL_OUT_OF_MEMORY";
+ case GL_TABLE_TOO_LARGE:
+ return "GL_TABLE_TOO_LARGE";
+ default:
+ {
+ char *str;
+ sprintf(str, "Unknown error(0x%x)", err);
+ return str;
+ }
+ }
+}
+
+#define GL_REPORT_ERROR() \
+{ \
+ err = glGetError(); \
+ if( err != GL_NO_ERROR ) \
+ { \
+ ERROR_LOG("%s:%d: gl error %s\n", __FILE__, (int)__LINE__, error_name(err)); \
+ ZeroGS::HandleGLError(); \
+ } \
+}
+
+ #ifdef _DEBUG
+#define GL_REPORT_ERRORD() \
+{ \
+ GLenum err = glGetError(); \
+ if( err != GL_NO_ERROR ) \
+ { \
+ ERROR_LOG("%s:%d: gl error %s\n", __FILE__, (int)__LINE__, error_name(err)); \
+ ZeroGS::HandleGLError(); \
+ } \
+}
#else
#define GL_REPORT_ERRORD()
#endif