..:: PCSX2 Forums ::..

Full Version: ZZogl -- Zero GS KOSMOS fork
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(08-29-2010, 01:12 PM)gregory Wrote: [ -> ]@somguy,

Have you check that you have all 32bits library dependancy install (nvidia-cg-toolkit !) ? You can check with "ldd libzzogl.so"
I have lib32-nvidia-cg-toolkit, and considering I can't actually compile libzzolg, I can't really check the dependencies of it.

(08-29-2010, 08:59 AM)Zeydlitz Wrote: [ -> ]Are you aware, that we don't support 64-bit systems? But if you compile my latest source, than open makefile.am and uncomment last string.
I followed the bash in the build script, uncommented the line that you mentioned, but when I do a make install I get the following
Code:
$ make install
Making install in Linux
make[1]: Entering directory `/home/tim/.pcsx2/zerogs/opengl/Linux'
gcc -DPACKAGE_NAME=\"ZZOgl\" -DPACKAGE_TARNAME=\"zzogl\" -DPACKAGE_VERSION=\"0.23.226\" -DPACKAGE_STRING=\"ZZOgl\ 0.23.226\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ZZOgl\" -DVERSION=\"0.23.226\" -DNDEBUG=1 -DRELEASE_TO_PUBLIC=1 -DZEROGS_SSE2=1 -DNVIDIA_CG_API=1 -D__x86_64__=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -DHAVE_GL_GLEXT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_CG_CG_H=1 -DHAVE_CG_CGGL_H=1 -DHAVE_JPEGLIB_H=1 -I. -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -I./../ -I./../../../../common/include -fPIC -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused -g -O2 -msse2  -fPIC -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused -g -O2 -msse2  -MT libZeroGSLinux_a-callbacks.o -MD -MP -MF .deps/libZeroGSLinux_a-callbacks.Tpo -c -o libZeroGSLinux_a-callbacks.o `test -f 'callbacks.c' || echo './'`callbacks.c
mv -f .deps/libZeroGSLinux_a-callbacks.Tpo .deps/libZeroGSLinux_a-callbacks.Po
gcc -DPACKAGE_NAME=\"ZZOgl\" -DPACKAGE_TARNAME=\"zzogl\" -DPACKAGE_VERSION=\"0.23.226\" -DPACKAGE_STRING=\"ZZOgl\ 0.23.226\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ZZOgl\" -DVERSION=\"0.23.226\" -DNDEBUG=1 -DRELEASE_TO_PUBLIC=1 -DZEROGS_SSE2=1 -DNVIDIA_CG_API=1 -D__x86_64__=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -DHAVE_GL_GLEXT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_CG_CG_H=1 -DHAVE_CG_CGGL_H=1 -DHAVE_JPEGLIB_H=1 -I. -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -I./../ -I./../../../../common/include -fPIC -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused -g -O2 -msse2  -fPIC -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused -g -O2 -msse2 -fno-regmove  -MT libZeroGSLinux_a-Conf.o -MD -MP -MF .deps/libZeroGSLinux_a-Conf.Tpo -c -o libZeroGSLinux_a-Conf.o `test -f 'Conf.cpp' || echo './'`Conf.cpp
In file included from Conf.cpp:25:0:
./../GS.h:53:22: fatal error: PS2Edefs.h: No such file or directory
compilation terminated.
make[1]: *** [libZeroGSLinux_a-Conf.o] Error 1
make[1]: Leaving directory `/home/tim/.pcsx2/zerogs/opengl/Linux'
make: *** [install-recursive] Error 1
What revision do you compile? Why do you miss -I@srcdir@/common in makefile.ac? Forth string should be:
INCLUDES = -I@srcdirINCLUDES = -I@srcdir@/../../../common/include -I@srcdir@/common

Quote:I have lib32-nvidia-cg-toolkit, and considering I can't actually compile libzzolg, I can't really check the dependencies of it.
You could still a pre-compiled version.

Anyway, just for information you need to compile a 32bits versions of the plugins.
1/ So you must add -m32 to cflags and ldflags, or will end up with a 64bits binary.
2/ And tell the autotool to use 32bits parameter. For example the following define is surely wrong -D__x86_64__=1
Hey my friend is having trouble with ZZogl.It seems Sonic Unleashed wont boot with zzogl,but it will with GSDX.
We tried ZZOGL PG and ZZogl r210 but stll no boot...
Hes running on PCSX2 r3674.
It showes the fixes and when the SEGA Database has to load the game it stops...
Whats up with that?
(08-30-2010, 09:18 AM)gregory Wrote: [ -> ]
Quote:I have lib32-nvidia-cg-toolkit, and considering I can't actually compile libzzolg, I can't really check the dependencies of it.
You could still a pre-compiled version.

Code:
$ ldd libzzoglpgr.so.0.1.0
    not a dynamic executable

(08-30-2010, 09:18 AM)gregory Wrote: [ -> ]Anyway, just for information you need to compile a 32bits versions of the plugins.
1/ So you must add -m32 to cflags and ldflags, or will end up with a 64bits binary.
2/ And tell the autotool to use 32bits parameter. For example the following define is surely wrong -D__x86_64__=1
I think it's becoming blatantly obvious I don't have enough experience compiling code, much less explicitly making 32-bit binaries on a 64-bit system. Any chance someone can post a recent compile of their own for Linux? Preferably someone on a rolling release system.

Thank both of you for your help so far.
Please, post makefile.am and configure.ac files. They both short.
1/ PCSX2 probably print some error messages when missing some symbols. Maybe a good place to check to understand what it is wrong with the pre-compiled version.

2/ libzzoglpgr.so.0.1.0 not a dynamic executable ??? Where did you get it ? With the version on code.google I get the following.
>> file libzzoglpgr.so.0.1.0
libzzoglpgr.so.0.1.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
>> ldd libzzoglpgr.so.0.1.0
linux-gate.so.1 => (0xb7ee6000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7a63000)
...

Ps: Find someone with the same version of wxwidget will save you a lots of trouble.
(08-30-2010, 03:00 PM)Zeydlitz Wrote: [ -> ]Please, post makefile.am and configure.ac files. They both short.
makefile.am
Code:
# Create a shared library libZeroGSogl
AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libZeroGSogl.a
INCLUDES = -I@srcdir@/../../../common/include -I@srcdir@/common

libZeroGSogl_a_CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0)
libZeroGSogl_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0)

if X86_64
libZeroGSogl_a_CPPFLAGS += -fPIC
libZeroGSogl_a_CXXFLAGS += -fPIC
CCASFLAGS += -fPIC
endif

# Create a shared object by faking an exe (thanks to ODE makefiles)
traplibdir=$(prefix)


if RELEASE_TO_PUBLIC
preext=r
endif

EXEEXT=$(preext)@so_ext@

traplib_PROGRAMS=libZeroGSogl
libZeroGSogl_SOURCES=
libZeroGSogl_DEPENDENCIES = libZeroGSogl.a
libZeroGSogl_LDFLAGS= @SHARED_LDFLAGS@
libZeroGSogl_LDFLAGS+=-Wl,-soname,@ZEROGS_SONAME@
libZeroGSogl_LDADD=$(libZeroGSogl_a_OBJECTS)

libZeroGSogl_a_SOURCES = \
GSmain.cpp          memcpy_amd.cpp      Regs.cpp         x86.cpp         zpipe.cpp         Mem.cpp         \
rasterfont.cpp      targets.cpp          zerogs.cpp      ZZoglVB.cpp      ZZoglShoots.cpp        ZZoglCreate.cpp    \
ZZoglShaders.cpp    ZZoglShadersGLSL.cpp    ZZoglCRTC.cpp    ZZoglSave.cpp    ZZoglFlushHack.cpp     ZZoglFlush.cpp

if X86_64
libZeroGSogl_a_SOURCES += x86-64.S
else
libZeroGSogl_a_SOURCES += x86-32.S
endif

if SSE2
CCASFLAGS+= -DZEROGS_SSE2
endif

libZeroGSogl_a_DEPENDENCIES = Linux/libZeroGSLinux.a
libZeroGSogl_LDADD += Linux/libZeroGSLinux.a

SUBDIRS = Linux ZeroGSShaders .
configure.ac
Code:
AC_INIT(ZZOgl,0.23.226,[email protected])

AM_INIT_AUTOMAKE(ZZOgl,0.23.226)

AC_PROG_CC([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CXX([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CPP([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AM_PROG_CC_C_O

AC_PROG_INSTALL
AC_PROG_RANLIB

dnl necessary for compiling assembly
AM_PROG_AS

ZEROGS_CURRENT=0
ZEROGS_REVISION=23
ZEROGS_AGE=226
ZEROGS_SONAME=libZeroGSogl.so.[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE]
ZEROGS_RELEASE=[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE]

AC_SUBST(ZEROGS_CURRENT)
AC_SUBST(ZEROGS_REVISION)
AC_SUBST(ZEROGS_AGE)
AC_SUBST(ZEROGS_RELEASE)
AC_SUBST(ZEROGS_SONAME)

CFLAGS=" -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused "
CPPFLAGS=" -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused "
CXXFLAGS=" -I/opt/cg/include -L/opt/cg/lib -Wall -Wno-format -Wno-unused "

dnl Check for debug build
AC_MSG_CHECKING(debug build)
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
debug=$enableval,debug=no)
if test "x$debug" == xyes
then
AC_DEFINE(_DEBUG,1,[_DEBUG])
CFLAGS+="-g "
CPPFLAGS+="-g "
CXXFLAGS+="-g -fpermissive "
else
AC_DEFINE(NDEBUG,1,[NDEBUG])
CFLAGS+="-g -O2 -msse2 "
CPPFLAGS+="-g -O2 -msse2 "
CXXFLAGS+="-g -O2 -msse2 -fno-regmove "
fi
AC_MSG_RESULT($debug)

AC_CHECK_FUNCS([ _aligned_malloc _aligned_free ], AC_DEFINE(HAVE_ALIGNED_MALLOC))

dnl Check for dev build
AC_MSG_CHECKING(for development build...)
AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]),
devbuild=$enableval,devbuild=no)
if test "x$devbuild" == xno
then
AC_DEFINE(RELEASE_TO_PUBLIC,1,[RELEASE_TO_PUBLIC])
fi
AC_MSG_RESULT($devbuild)
AM_CONDITIONAL(RELEASE_TO_PUBLIC, test x$devbuild = xno)

dnl Check for recompilation
AC_MSG_CHECKING(check for sse2...)
AC_ARG_ENABLE(sse2, AC_HELP_STRING([--enable-sse2], [Enable sse2 instructions]),
sse2=$enableval,sse2=no)
if test "x$sse2" == xyes
then
AC_DEFINE(ZEROGS_SSE2,1,[ZEROGS_SSE2])
fi
AC_MSG_RESULT($sse2)
AM_CONDITIONAL(SSE2, test x$sse2 = xyes)

dnl Check for Nvidia CG-toolkit or GLSL
AC_MSG_CHECKING(check for shader toolkit...)
AC_ARG_ENABLE(glsl, AC_HELP_STRING([--enable-glsl], [Enable GLSL shader language]),
glsl=$enableval,glsl=no)
if test "x$glsl" == xyes
then
AC_DEFINE(GLSL_API,1,[GLSL_API])
else
AC_DEFINE(NVIDIA_CG_API,1,[NVIDIA_CG_API])
fi
AC_MSG_RESULT($glsl)
AM_CONDITIONAL(GLSL_API, test x$glsl = xyes)
AM_CONDITIONAL(NVIDIA_CG_API, test x$glsl = xno)

dnl Check for 64bit CPU
AC_MSG_CHECKING(for a x86-64 CPU)
dnl if test "$build_os" == "target_os"
dnl then
AC_TRY_RUN([
int main()
{
int a = 0;
int*pa = &a;
asm(".intel_syntax\n"
    "mov %%rax, %0\n"
    "mov %%eax, [%%rax]\n"
    ".att_syntax\n"
    : : "r"(pa) : "%rax");
return 0;
}
],cpu64=yes,cpu64=no,)
dnl else
dnl cpu64=no
dnl fi
if test "x$cpu64" == xyes
then
AC_DEFINE(__x86_64__,1,[__x86_64__])
fi
AC_MSG_RESULT($cpu64)
AM_CONDITIONAL(X86_64, test x$cpu64 = xyes)

dnl gtk
AC_MSG_CHECKING(gtk2+)
AC_CHECK_PROG(GTK_CONFIG, pkg-config, pkg-config)
LIBS+=$(pkg-config --libs gtk+-2.0)

dnl bindir = pcsx2exe

dnl assuming linux environment
so_ext=".so.$ZEROGS_RELEASE"
SHARED_LDFLAGS="-shared"
AC_SUBST(so_ext)
AC_SUBST(SHARED_LDFLAGS)

AC_MSG_CHECKING(OpenGL)
AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glext.h],,,
      [[#if HAVE_GL_GL_H
         #include <GL/gl.h>
         #endif
         #if HAVE_GL_GLU_H
         #include <GL/glu.h>
         #endif
       ]])
AC_CHECK_LIB(GL,main,[LIBS="$LIBS -lGL"])
AC_CHECK_LIB(GLU,main,[LIBS="$LIBS -lGLU"])
AC_CHECK_LIB(GLEW,main,[LIBS="$LIBS -lGLEW"])
AC_MSG_CHECKING(Cg)
AC_CHECK_HEADERS([Cg/cg.h Cg/cgGL.h])
AC_CHECK_LIB(jpeg,main,[LIBS="$LIBS -ljpeg"])
AC_CHECK_HEADERS([jpeglib.h],,[AC_MSG_ERROR(Install libjpeg-dev)])
AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"])
AC_CHECK_LIB(stdc++,main,[LIBS="$LIBS -lstdc++"])
AC_CHECK_LIB(z,main,[LIBS="$LIBS -lz"])
AC_CHECK_LIB(dl,main,[LIBS="$LIBS -ldl"])
AC_CHECK_LIB(Xxf86vm,main,[LIBS="$LIBS -lXxf86vm"],[echo "Error! You need to have libXxf86vm-dev." ; exit -1])

dnl AC_CHECK_LIB(Cg,cgCreateContext,[LIBS="$LIBS -lCg"])
dnl AC_CHECK_LIB(CgGL,cgGLEnableProfile,[LIBS="$LIBS -lCgGL"])
LIBS+=" -lCg -lCgGL"

AC_OUTPUT([
Makefile
Linux/Makefile
ZeroGSShaders/Makefile
])

echo "Configuration:"
echo "  Target system type:    $target"
echo "  x86-64 build?           $cpu64"
echo "  Debug build?           $debug"
echo "  Dev build?               $devbuild"
echo "  SSE2 enabled?           $sse2"

(08-30-2010, 04:16 PM)gregory Wrote: [ -> ]1/ PCSX2 probably print some error messages when missing some symbols. Maybe a good place to check to understand what it is wrong with the pre-compiled version.
PCSX2 seems to be fine with the null plugin, and any other plugins (graphical or otherwise) aren't selectable. Editting the config files to point to zzogl cause PCSX2 to complain that the plug-in isn't valid.

(08-30-2010, 04:16 PM)gregory Wrote: [ -> ]2/ libzzoglpgr.so.0.1.0 not a dynamic executable ??? Where did you get it ? With the version on code.google I get the following.
>> file libzzoglpgr.so.0.1.0
libzzoglpgr.so.0.1.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
>> ldd libzzoglpgr.so.0.1.0
linux-gate.so.1 => (0xb7ee6000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7a63000)
Are you running 64-bit or 32-bit Debian? Since I'm on a rolling release distro, I'm not sure my experience and yours would be as relatable (unless you're running 64-bit sid)
Yeap, SID 64bits. Did you see why PCSX2 complains is not a valid files. Honestly did you try to re-download it and check the check sum. The not executable part is really a bad things

Anyway, I have attach a version compiled on my system. No guarantee, neither support but give it a try.

I didn't have PCSX2 installed (I installed multiple version in an attempt to get it working), so I have it installed now, noticed that PCSX2 complained about glew for zzogl, so I installed both glew and lib32-glew, and now zzogl is selectable, but PCSX2 still refuses to work. It now complains about libjpeg (which I have installed in both versions) libportaudio (which I have the lib32 version installed) and libbz2 (which I have no clue about). But that's outside of the scope of this thread. Thanks for the help!