From 50040eb4fbc42af72b9419e1859defe247aade0e Mon Sep 17 00:00:00 2001 From: arcum42 Date: Wed, 4 Feb 2009 12:41:20 +0000 Subject: [PATCH] Get the plugins to compile in Linux after the reorg, and bring the game fixes dialog up to date in Linux. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@692 a6443dda-0b58-4228-96e9-037be469359c --- build.sh | 4 +-- pcsx2/Linux/GtkGui.cpp | 4 +++ pcsx2/Linux/Linux.h | 2 ++ pcsx2/Linux/interface.c | 12 ++++++++ pcsx2/Linux/pcsx2.glade | 38 +++++++++++++++++++++++++ plugins/CDVDiso/src/Linux/Makefile | 2 +- plugins/CDVDiso/src/libiso.c | 4 +-- plugins/CDVDiso/src/mkiso/Makefile | 7 +++-- plugins/zerogs/opengl/Linux/Makefile.am | 2 +- plugins/zerogs/opengl/Makefile.am | 2 +- plugins/zerogs/opengl/memcpy_amd.cpp | 2 +- plugins/zeropad/Makefile.am | 2 +- plugins/zerospu2/Makefile.am | 8 +++--- plugins/zerospu2/configure.ac | 2 +- plugins/zerospu2/voices.cpp | 4 +-- plugins/zerospu2/zerodma.cpp | 4 +-- plugins/zerospu2/zerospu2.cpp | 4 +-- 17 files changed, 80 insertions(+), 23 deletions(-) diff --git a/build.sh b/build.sh index 2924b34cbe..b90c6a607f 100644 --- a/build.sh +++ b/build.sh @@ -6,14 +6,14 @@ # Uncomment if building by itself, rather then with all the plugins #Normal -#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`" +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`" +#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`" # Make sure we have plugins, and bring the normal plugins in. sh fetch.sh diff --git a/pcsx2/Linux/GtkGui.cpp b/pcsx2/Linux/GtkGui.cpp index 7291db1633..0e5bbb98ef 100644 --- a/pcsx2/Linux/GtkGui.cpp +++ b/pcsx2/Linux/GtkGui.cpp @@ -769,9 +769,11 @@ void on_Game_Fixes(GtkMenuItem *menuitem, gpointer user_data) { GameFixDlg = create_GameFixDlg(); + set_checked(GameFixDlg, "check_VU_Add_Sub", (Config.GameFixes & FLAG_VU_ADD_SUB)); set_checked(GameFixDlg, "check_VU_Clip", (Config.GameFixes & FLAG_VU_CLIP)); set_checked(GameFixDlg, "check_FPU_Clamp", (Config.GameFixes & FLAG_FPU_CLAMP)); set_checked(GameFixDlg, "check_VU_Branch", (Config.GameFixes & FLAG_VU_BRANCH)); + set_checked(GameFixDlg, "check_Avoid_Delay_Handling", (Config.GameFixes & FLAG_AVOID_DELAY_HANDLING)); gtk_widget_show_all(GameFixDlg); gtk_widget_set_sensitive(MainWindow, FALSE); @@ -782,9 +784,11 @@ void on_Game_Fix_OK(GtkButton *button, gpointer user_data) { Config.GameFixes = 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_VU_Add_Sub") ? FLAG_VU_ADD_SUB : 0; Config.GameFixes |= is_checked(GameFixDlg, "check_VU_Clip") ? FLAG_VU_CLIP : 0; Config.GameFixes |= is_checked(GameFixDlg, "check_FPU_Clamp") ? FLAG_FPU_CLAMP : 0; Config.GameFixes |= is_checked(GameFixDlg, "check_VU_Branch") ? FLAG_VU_BRANCH : 0; + Config.GameFixes |= is_checked(GameFixDlg, "check_Avoid_Delay_Handling") ? FLAG_AVOID_DELAY_HANDLING : 0; SaveConfig(); gtk_widget_destroy(GameFixDlg); diff --git a/pcsx2/Linux/Linux.h b/pcsx2/Linux/Linux.h index 09ad03c2ce..e26fbf120e 100644 --- a/pcsx2/Linux/Linux.h +++ b/pcsx2/Linux/Linux.h @@ -181,9 +181,11 @@ char iop_log_names[9][32] = { "Cdr Log", "GPU Log" }; +#define FLAG_VU_ADD_SUB 0x1 #define FLAG_VU_CLIP 0x2 #define FLAG_FPU_CLAMP 0x4 #define FLAG_VU_BRANCH 0x8 +#define FLAG_AVOID_DELAY_HANDLING 0x10 #define FLAG_VU_NO_OVERFLOW 0x2 #define FLAG_VU_EXTRA_OVERFLOW 0x40 diff --git a/pcsx2/Linux/interface.c b/pcsx2/Linux/interface.c index 09babe12eb..22eada6ad3 100644 --- a/pcsx2/Linux/interface.c +++ b/pcsx2/Linux/interface.c @@ -767,6 +767,8 @@ create_GameFixDlg (void) GtkWidget *check_VU_Clip; GtkWidget *check_FPU_Clamp; GtkWidget *check_VU_Branch; + GtkWidget *check_VU_Add_Sub; + GtkWidget *check_Avoid_Delay_Handling; GtkWidget *label42; GtkWidget *dialog_action_area1; GtkWidget *cancelbutton1; @@ -805,6 +807,14 @@ create_GameFixDlg (void) gtk_widget_show (check_VU_Branch); gtk_box_pack_start (GTK_BOX (vbox30), check_VU_Branch, FALSE, FALSE, 0); + check_VU_Add_Sub = gtk_check_button_new_with_mnemonic (_("VU Add / Sub Hack - Special fix for Tri-Ace games!")); + gtk_widget_show (check_VU_Add_Sub); + gtk_box_pack_start (GTK_BOX (vbox30), check_VU_Add_Sub, FALSE, FALSE, 0); + + check_Avoid_Delay_Handling = gtk_check_button_new_with_mnemonic (_("Avoid 2 cycle branch delay handling - Fixes KH2 and Tri-Ace games")); + gtk_widget_show (check_Avoid_Delay_Handling); + gtk_box_pack_start (GTK_BOX (vbox30), check_Avoid_Delay_Handling, FALSE, FALSE, 0); + label42 = gtk_label_new (_("Some games need special settings.\nConfigure them here.")); gtk_widget_show (label42); gtk_frame_set_label_widget (GTK_FRAME (GameSettings), label42); @@ -840,6 +850,8 @@ create_GameFixDlg (void) GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Clip, "check_VU_Clip"); GLADE_HOOKUP_OBJECT (GameFixDlg, check_FPU_Clamp, "check_FPU_Clamp"); GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Branch, "check_VU_Branch"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_VU_Add_Sub, "check_VU_Add_Sub"); + GLADE_HOOKUP_OBJECT (GameFixDlg, check_Avoid_Delay_Handling, "check_Avoid_Delay_Handling"); 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 e24aa7dfb3..10af25d9fd 100644 --- a/pcsx2/Linux/pcsx2.glade +++ b/pcsx2/Linux/pcsx2.glade @@ -1858,6 +1858,44 @@ If you have problems, Disable all of these and try again. False + + + + True + True + VU Add / Sub Hack - Special fix for Tri-Ace games! + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Avoid 2 cycle branch delay handling - Fixes KH2 and Tri-Ace games + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + diff --git a/plugins/CDVDiso/src/Linux/Makefile b/plugins/CDVDiso/src/Linux/Makefile index db2f89efcf..7893a6548d 100644 --- a/plugins/CDVDiso/src/Linux/Makefile +++ b/plugins/CDVDiso/src/Linux/Makefile @@ -9,7 +9,7 @@ OBJS = ../CDVDisop.o Config.o Linux.o ../libiso.o CFGOBJS = conf.o interface.o support.o ${OBJS} LIBS = -lz -lbz2 -lstdc++ CFGLIBS = $(shell pkg-config --libs gtk+-2.0) ${LIBS} -CFLAGS += $(shell pkg-config --cflags gtk+-2.0) -I../../../common +CFLAGS += $(shell pkg-config --cflags gtk+-2.0) -I../common DEPS:= $(OBJS:.o=.d) $(CFGOBJS:.o=.d) all: plugin cfg diff --git a/plugins/CDVDiso/src/libiso.c b/plugins/CDVDiso/src/libiso.c index 9f6a432e7d..3d6f217d93 100644 --- a/plugins/CDVDiso/src/libiso.c +++ b/plugins/CDVDiso/src/libiso.c @@ -12,8 +12,8 @@ #include #include #include -#include "zlib/zlib.h" -#include "bzip2/bzlib.h" +#include "3rdparty/zlib/zlib.h" +#include "3rdparty/bzip2/bzlib.h" #include "common/PS2Etypes.h" #include "CDVDiso.h" diff --git a/plugins/CDVDiso/src/mkiso/Makefile b/plugins/CDVDiso/src/mkiso/Makefile index d84a57681c..317097597a 100644 --- a/plugins/CDVDiso/src/mkiso/Makefile +++ b/plugins/CDVDiso/src/mkiso/Makefile @@ -2,11 +2,12 @@ CC = gcc MKISO = mkiso -CFLAGS = -fPIC -Wall -O2 -fomit-frame-pointer -I.. -I. -D__LINUX__ -I../zlib +CFLAGS = -fPIC -Wall -O2 -fomit-frame-pointer -I.. -I. -D__LINUX__ -I../3rdparty/zlib OBJS = mkiso.o ../libiso.o LIBS = -OBJS+= ../zlib/adler32.o ../zlib/compress.o ../zlib/crc32.o ../zlib/gzio.o ../zlib/uncompr.o ../zlib/deflate.o ../zlib/trees.o \ - ../zlib/zutil.o ../zlib/inflate.o ../zlib/infback.o ../zlib/inftrees.o ../zlib/inffast.o +OBJS+= ../3rdparty/zlib/adler32.o ../3rdparty/zlib/compress.o ../3rdparty/zlib/crc32.o ../3rdparty/zlib/gzio.o ../3rdparty/zlib/uncompr.o \ +../3rdparty/zlib/deflate.o ../3rdparty/zlib/trees.o ../3rdparty/zlib/zutil.o ../3rdparty/zlib/inflate.o ../3rdparty/zlib/infback.o ../3rdparty/zlib/inftrees.o \ +../3rdparty/zlib/inffast.o DEPS:= $(OBJS:.o=.d) diff --git a/plugins/zerogs/opengl/Linux/Makefile.am b/plugins/zerogs/opengl/Linux/Makefile.am index 6327ae18e4..b95d86a02a 100644 --- a/plugins/zerogs/opengl/Linux/Makefile.am +++ b/plugins/zerogs/opengl/Linux/Makefile.am @@ -2,5 +2,5 @@ noinst_LIBRARIES = libZeroGSLinux.a libZeroGSLinux_a_CPPFLAGS = -fPIC libZeroGSLinux_a_CXXFLAGS = -fPIC libZeroGSLinux_a_CFLAGS = -fPIC -INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I@srcdir@/../ -I@srcdir@/../../../common +INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I@srcdir@/../ -I@srcdir@/../common libZeroGSLinux_a_SOURCES = callbacks.c Conf.cpp interface.c Linux.cpp support.c diff --git a/plugins/zerogs/opengl/Makefile.am b/plugins/zerogs/opengl/Makefile.am index 06961cee29..6e78897ee9 100644 --- a/plugins/zerogs/opengl/Makefile.am +++ b/plugins/zerogs/opengl/Makefile.am @@ -1,7 +1,7 @@ # Create a shared library libZeroGSogl AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libZeroGSogl.a -INCLUDES = -I@srcdir@/../../common +INCLUDES = -I@srcdir@/common libZeroGSogl_a_CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0) libZeroGSogl_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0) diff --git a/plugins/zerogs/opengl/memcpy_amd.cpp b/plugins/zerogs/opengl/memcpy_amd.cpp index 5f9463f5f7..dfd1119330 100644 --- a/plugins/zerogs/opengl/memcpy_amd.cpp +++ b/plugins/zerogs/opengl/memcpy_amd.cpp @@ -76,7 +76,7 @@ MEMCPY_AMD.CPP #endif extern "C" { -#include "../../common/PS2Etypes.h" +#include "PS2Etypes.h" #if defined(_MSC_VER) && !defined(__x86_64__) diff --git a/plugins/zeropad/Makefile.am b/plugins/zeropad/Makefile.am index 3a6a95189f..bb6b8d1c1f 100644 --- a/plugins/zeropad/Makefile.am +++ b/plugins/zeropad/Makefile.am @@ -1,7 +1,7 @@ # Create a shared library libZeroPAD AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libZeroPAD.a -INCLUDES = -I@srcdir@/../common +INCLUDES = -I@srcdir@/common libZeroPAD_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0) libZeroPAD_a_CFLAGS = $(shell pkg-config --cflags gtk+-2.0) diff --git a/plugins/zerospu2/Makefile.am b/plugins/zerospu2/Makefile.am index 891935a4ae..c028d61e80 100644 --- a/plugins/zerospu2/Makefile.am +++ b/plugins/zerospu2/Makefile.am @@ -1,7 +1,7 @@ # Create a shared library libZeroSPU2 AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libZeroSPU2.a -INCLUDES = -I@srcdir@/../common +INCLUDES = -I@srcdir@/common -I@srcdir@/3rdparty/SoundTouch libZeroSPU2_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0) libZeroSPU2_a_CFLAGS = $(shell pkg-config --cflags gtk+-2.0) @@ -22,13 +22,13 @@ EXEEXT=$(preext)@so_ext@ traplib_PROGRAMS=libZeroSPU2 libZeroSPU2_SOURCES= -libZeroSPU2_DEPENDENCIES = libZeroSPU2.a SoundTouch/libSoundTouch.a +libZeroSPU2_DEPENDENCIES = libZeroSPU2.a 3rdparty/SoundTouch/libSoundTouch.a libZeroSPU2_LDFLAGS= @SHARED_LDFLAGS@ libZeroSPU2_LDFLAGS+=-Wl,-soname,@ZEROSPU2_SONAME@ -libZeroSPU2_LDADD=$(libZeroSPU2_a_OBJECTS) SoundTouch/libSoundTouch.a +libZeroSPU2_LDADD=$(libZeroSPU2_a_OBJECTS) 3rdparty/SoundTouch/libSoundTouch.a libZeroSPU2_a_SOURCES = zerospu2.cpp voices.cpp zerodma.cpp libZeroSPU2_a_SOURCES += zerospu2.h reg.h misc.h libZeroSPU2_a_SOURCES += Linux/interface.c Linux/Linux.cpp Linux/Alsa.cpp Linux/OSS.cpp Linux/support.c -SUBDIRS = SoundTouch +SUBDIRS = 3rdparty/SoundTouch diff --git a/plugins/zerospu2/configure.ac b/plugins/zerospu2/configure.ac index 235f23e5c7..057d76a261 100644 --- a/plugins/zerospu2/configure.ac +++ b/plugins/zerospu2/configure.ac @@ -94,7 +94,7 @@ AC_CHECK_LIB(dl,main,[LIBS="$LIBS -ldl"]) AC_CHECK_LIB(asound,main,[LIBS="$LIBS -lasound"]) AC_OUTPUT([ - SoundTouch/Makefile + 3rdparty/SoundTouch/Makefile Makefile ]) diff --git a/plugins/zerospu2/voices.cpp b/plugins/zerospu2/voices.cpp index 7d30fa4c8d..d4a99fc039 100644 --- a/plugins/zerospu2/voices.cpp +++ b/plugins/zerospu2/voices.cpp @@ -21,8 +21,8 @@ #include "zerospu2.h" -#include "SoundTouch/SoundTouch.h" -#include "SoundTouch/WavFile.h" +#include "SoundTouch.h" +#include "WavFile.h" // VOICE_PROCESSED definitions diff --git a/plugins/zerospu2/zerodma.cpp b/plugins/zerospu2/zerodma.cpp index d35451ade2..04c39a196e 100644 --- a/plugins/zerospu2/zerodma.cpp +++ b/plugins/zerospu2/zerodma.cpp @@ -21,8 +21,8 @@ #include #include -#include "SoundTouch/SoundTouch.h" -#include "SoundTouch/WavFile.h" +#include "SoundTouch.h" +#include "WavFile.h" void CALLBACK SPU2readDMAMem(u16 *pMem, int size, int core) { diff --git a/plugins/zerospu2/zerospu2.cpp b/plugins/zerospu2/zerospu2.cpp index df83fd1f63..d008284e53 100644 --- a/plugins/zerospu2/zerospu2.cpp +++ b/plugins/zerospu2/zerospu2.cpp @@ -25,8 +25,8 @@ #include "svnrev.h" #endif -#include "SoundTouch/SoundTouch.h" -#include "SoundTouch/WavFile.h" +#include "SoundTouch.h" +#include "WavFile.h" char libraryName[256];