Linux mouse support with / without lilypad? (for lightgun)
#11
I'd actually been getting the same issue this weekend, when I went to try the gsopen2 branch; I just got distracted, and didn't get back to it. As I recall, it seemed like the Bad Match error was the result of passing a NULL pointer for the window when creating an opengl context.

Commenting out #define USE_GSOPEN2 in GSWin.h both caused ZZOgl-pg to work properly, and defeated the point of the branch. (That was when compiling with cmake, btw. I was having trouble compiling pcsx2 on that branch in CodeBlocks for some reason.)

If I get a chance when I get home, I'll take a look at it again. I could probably cobble together some quick gui controls for the new options as well.
Reply

Sponsored links

#12
Ok thanks. I do not know why it work for me. The only difference is that I replaced CALLBACK by EXPORT_C_. Actually I got some strange issue when I forgot to change CALLBACK for GSOpen2, maybe a track. I attached a patch that do it for all except GSOpen2 which must be change.

Normally the glWindow must be set at the beginning in GLWindow::CreateWindow
And for information I changed the pDisplay inside pcsx2 (AppMain.cpp:890) to send an array of 2 elements:
0 -> the display (like trunk)
1 -> the gl window
Reply
#13
here's the backtrace...

Code:
(gdb) bt full
#0  0x00110425 in __kernel_vsyscall ()
No symbol table info available.
#1  0x4e9b62f1 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0x4e9b7d5e in abort () from /lib/libc.so.6
No symbol table info available.
#3  0x4ebc8487 in g_logv () from /lib/libglib-2.0.so.0
No symbol table info available.
#4  0x4ebc84c3 in g_log () from /lib/libglib-2.0.so.0
No symbol table info available.
#5  0x432f24b3 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#6  0x42989cdd in _XError () from /usr/lib/libX11.so.6
No symbol table info available.
#7  0x42990a02 in ?? () from /usr/lib/libX11.so.6
No symbol table info available.
#8  0x429915cc in _XReply () from /usr/lib/libX11.so.6
No symbol table info available.
#9  0x4317afa0 in ?? () from /usr/lib/nvidia/libGL.so.1
No symbol table info available.
#10 0x00000000 in ?? ()
No symbol table info available.

(I don't think it's relevant, but the first time I ran pcsx2 it seemed to unload the plugins when I clicked OK after setting them up. I thought I reloaded them before booting the iso - and backtrace was the same second time around when this didn't happen.)
Reply
#14
All right, the issue is basically that ZZOgl-pg isn't exporting the symbol GSOpen2 properly (I'm not sure if it's doing C++ name mangling, or just not exporting it). If you use EXPORT_C_, it throws in some visibility attribute changes that are enough to make it export. (The definition of EXPORT_C_ and CALLBACK is different.)

In fact, even without EXPORT_C_, if you throw the following line somewhere in the headers, it'll work properly:
extern "C" s32 CALLBACK GSopen2( void* pDsp, u32 flags );

EDIT: Provided, of course, that you changed 'int flags' to 'u32 flags' like I did. Don't think it made a difference, but I noticed it was unsigned in pcsx2, so changed it for consistency.
Reply
#15
Ok thanks very much. I commit the change with EXPORT_C_. The dvlp branches contains already all EXPORT_C_ so it will be easier to merge everythings together.
Reply
#16
Using the linux-gsopen2 branch is now giving me an error during the make process (using cmake ../CMakeLists.txt -DCMAKE_BUILD_TYPE=Release)

Code:
[ 87%] Building CXX object plugins/zzogl-pg/opengl/CMakeFiles/zzogl.dir/GLWinX11.cpp.o    
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GLWinX11.cpp: In member function ‘void GLWindow::ResizeCheck()’:
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GLWinX11.cpp:432:34: warning: comparison between signed and unsigned integer expressions
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GLWinX11.cpp:432:72: warning: comparison between signed and unsigned integer expressions
[ 88%] Building CXX object plugins/zzogl-pg/opengl/CMakeFiles/zzogl.dir/GSmain.cpp.o
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp:70:22: warning: deprecated conversion from string constant to ‘char*’
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp: In function ‘void GSsetGameCRC(int, int)’:
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp:186:23: warning: comparison between signed and unsigned integer expressions
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp:188:32: warning: comparison between signed and unsigned integer expressions
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp: At global scope:
/home/mythtv/pcsx2-lightgun/plugins/zzogl-pg/opengl/GSmain.cpp:311:16: error: expected constructor, destructor, or type conversion before ‘GSopen2’
make[2]: *** [plugins/zzogl-pg/opengl/CMakeFiles/zzogl.dir/GSmain.cpp.o] Error 1
make[1]: *** [plugins/zzogl-pg/opengl/CMakeFiles/zzogl.dir/all] Error 2
make: *** [all] Error 2

or should I be building from trunk now?
Reply
#17
Sorry, I was too much in hurry and forgot one file. Now it must be fine
Reply
#18
Okay I've tried a build of linux-gsopen2 using the options:

Code:
cmake ../CMakeLists.txt -DFORCE_INTERNAL_SDL=TRUE -DCMAKE_BUILD_TYPE=Release

build goes okay, but pcsx2 crashes when the iso is loaded:
from the pcsx2 log screen -
Code:
/home/mythtv/pcsx2-lightgun/common/src/Utilities/Linux/LnxHostSys.cpp(57) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    EE Core
    Condition: false
    Message:   Unhandled page fault @ 0x00000000

Stacktrace:

...and the terminal-

Code:
$ /usr/games/pcsx2/launch_pcsx2_linux.sh
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
Command line parsing...
Command line parsed!

(pcsx2:15860): Gtk-WARNING **: Unable to locate theme engine in module_path: "qtcurve",

(pcsx2:15860): Gtk-WARNING **: Unable to locate theme engine in module_path: "qtcurve",

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:15860): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:15860): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
ZZogl-PG: Calling GSinit.
ZZogl-PG: GSinit finished.
ZZogl-PG: Calling GSopen2.
ZZogl-PG: Capturing ZZOgl window.
ZZogl-PG:  Got Doublebuffered Visual!
ZZogl-PG:  Create a 3.0 opengl context
ZZogl-PG:  glX-Version 1.4 with Direct Rendering
ZZogl-PG:  Using multitexturing.
ZZogl-PG:  Maximum texture size is 16384 for Tex_2d and 16384 for Tex_NV.
ZZogl-PG: Disabling MRT depth writing.
ZZogl-PG:  Use GL_RGBA32F for blockdata.
ZZogl-PG:  Fill bilinear blocks OK.!
ZZogl-PG: Initialization successful.
ZZogl-PG: Disabling MRT depth writing.
/usr/games/pcsx2/launch_pcsx2_linux.sh: line 27: 15860 Killed                  ./pcsx2
Reply
#19
For the moment use only Debug (not release).
1/ If you enable internal SDL, please use gsdx graphic plugin.
2/ If you use zzogl, avoid to use internal SDL, it is not stable.

However that stange, the graphics plugins seems to well initialized. So I think the segmentation fault appears on the pad plugins ! I can do a quick test with a Debug build. It would normally print the stacktrace of the crash. I was expected that it will work better.
Reply
#20
I've rebuilt using debug and avoiding the internal sdl.

It crashes in the same place; The backtrace is as follows:
Code:
(gdb) bt full
#0  0x083d05a6 in ?? ()
No symbol table info available.
#1  0x083ce4f9 in ?? ()
No symbol table info available.
#2  0x083cb3c8 in ?? ()
No symbol table info available.
#3  0x083cd997 in ?? ()
No symbol table info available.
#4  0x083cd038 in ?? ()
No symbol table info available.
#5  0x0830c87b in ?? ()
No symbol table info available.
#6  0x0830d302 in ?? ()
No symbol table info available.
#7  0x0830d733 in ?? ()
No symbol table info available.
#8  0x0830d8be in ?? ()
No symbol table info available.
#9  0x0807eca4 in ?? ()
No symbol table info available.
#10 0x0807ed0b in ?? ()
No symbol table info available.
#11 0x080c660b in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#12 0x082aeb08 in ?? ()
No symbol table info available.
#13 0x081f6e6d in ?? ()
No symbol table info available.
#14 0x082aea7d in ?? ()
No symbol table info available.
#15 0x082aebf1 in ?? ()
No symbol table info available.
#16 0x081f6fc1 in ?? ()
No symbol table info available.
#17 0x082aec6d in ?? ()
No symbol table info available.
#18 0x081f7067 in ?? ()
No symbol table info available.
#19 0x0839bb2b in ?? ()
No symbol table info available.
#20 0x0839c00d in ?? ()
No symbol table info available.
#21 0x0839c137 in ?? ()
No symbol table info available.
#22 0x4eb1ce99 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#23 0x4ea62d2e in clone () from /lib/libc.so.6
No symbol table info available.
(gdb)

the console output is;
Code:
(gdb) run
Starting program: /usr/games/pcsx2/pcsx2
[Thread debugging using libthread_db enabled]
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
Detaching after fork from child process 8185.
Detaching after fork from child process 8186.
Detaching after fork from child process 8187.
Command line parsing...
Command line parsed!
[New Thread 0xf7d1bb70 (LWP 8188)]

(pcsx2:8182): Gtk-WARNING **: Unable to locate theme engine in module_path: "qtcurve",

(pcsx2:8182): Gtk-WARNING **: Unable to locate theme engine in module_path: "qtcurve",

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(pcsx2:8182): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkRadioMenuItem'

(pcsx2:8182): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
Detaching after fork from child process 8189.
[New Thread 0xf32a8b70 (LWP 8190)]
[Thread 0xf32a8b70 (LWP 8190) exited]
[New Thread 0xf32a8b70 (LWP 8191)]
[New Thread 0xed1e1b70 (LWP 8192)]
[New Thread 0xec7ffb70 (LWP 8193)]
[Thread 0xec7ffb70 (LWP 8193) exited]
[Thread 0xf32a8b70 (LWP 8191) exited]
ZZogl-PG: Disabling MRT depth writing.
[Thread 0xed1e1b70 (LWP 8192) exited]
[New Thread 0xed1e1b70 (LWP 8198)]
[New Thread 0xf32a8b70 (LWP 8199)]
[Thread 0xf32a8b70 (LWP 8199) exited]
ZZogl-PG: Calling GSinit.
ZZogl-PG: GSinit finished.
[New Thread 0xf32a8b70 (LWP 8200)]
[New Thread 0xec7ffb70 (LWP 8201)]
ZZogl-PG: Calling GSopen.
ZZogl-PG: Creating ZZOgl window.
ZZogl-PG:  Got Doublebuffered Visual!
ZZogl-PG:  glX-Version 1.4
ZZogl-PG:  You have Direct Rendering!
ZZogl-PG:  Using multitexturing.
ZZogl-PG:  Maximum texture size is 16384 for Tex_2d and 16384 for Tex_NV.
ZZogl-PG: Disabling MRT depth writing.
ZZogl-PG:  Use GL_RGBA32F for blockdata.
ZZogl-PG:  Fill bilinear blocks OK.!
ZZogl-PG: Initialization successful.
ZZogl-PG: Disabling MRT depth writing.
[New Thread 0xe669fb70 (LWP 8202)]
[Thread 0xe669fb70 (LWP 8202) exited]
[New Thread 0xe669fb70 (LWP 8203)]
[Thread 0xe669fb70 (LWP 8203) exited]
[New Thread 0xe669fb70 (LWP 8204)]
[Thread 0xe669fb70 (LWP 8204) exited]
[New Thread 0xe669fb70 (LWP 8205)]
[Thread 0xe669fb70 (LWP 8205) exited]
[New Thread 0xeb0f3b70 (LWP 8206)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
* SPU2-X: Enumerating PortAudio devices: *** Device 0: '/dev/dsp' (OSS)
*** Device 1: 'HDA NVidia: ALC1200 Analog (hw:0,0)' (ALSA)
*** Device 2: 'HDA NVidia: ALC1200 Digital (hw:0,1)' (ALSA)
*** Device 3: 'HDA NVidia: ALC1200 Analog (hw:0,2)' (ALSA)
*** Device 4: 'HDA NVidia: NVIDIA HDMI (hw:0,3)' (ALSA)
*** Device 5: 'HDA NVidia: NVIDIA HDMI (hw:1,3)' (ALSA)
*** Device 6: 'HDA NVidia: NVIDIA HDMI (hw:1,7)' (ALSA)
*** Device 7: 'HDA NVidia: NVIDIA HDMI (hw:1,8)' (ALSA)
*** Device 8: 'HDA NVidia: NVIDIA HDMI (hw:1,9)' (ALSA)
*** Device 9: 'front' (ALSA)
*** Device 10: 'surround40' (ALSA)
*** Device 11: 'surround41' (ALSA)
*** Device 12: 'surround50' (ALSA)
*** Device 13: 'surround51' (ALSA)
*** Device 14: 'surround71' (ALSA)
*** Device 15: 'iec958' (ALSA)
*** Device 16: 'spdif' (ALSA)
*** Device 17: 'hdmi' (ALSA)
*** Device 18: 'pulse' (ALSA)
*** Device 19: 'dmix' (ALSA)
*** Device 20: 'default' (ALSA) (selected)
[Thread 0xeb0f3b70 (LWP 8206) exited]
[New Thread 0xe669fb70 (LWP 8207)]
[New Thread 0xe5e9eb70 (LWP 8208)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf32a8b70 (LWP 8200)]
0x083d05a6 in ?? ()
Reply




Users browsing this thread: 1 Guest(s)