Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux mouse support with / without lilypad? (for lightgun)
Hi everyone,

I've just sorted out some wiimotes and configured them to emulate a mouse and was looking forward to having a lightgun-tastic experience with virtua cop elite edition
however, it seems I can't use the mouse to control the action in pcsx2 under linux Sad

Out of sheer desperation I'm posting here to see if there's a solution to this problem? Is there no way of using a mouse under zeropad or any of the linux compatible plugins? Does anyone know if lilypad is build-able from the svn under linux?? (I realise that's plugin related...)

Any help would be really appreciated...

I'm running the svn under Fedora 14 x86_64 with no other problems.

Thanks for any help Smile

Sponsored links

I personally can't help you. If I could, I really would.

I'm just posting so you don't feel ignored. Wink
For the sake of experimentation, someone posted that PCSX2 runs quite well with recent Wine (I guess software renderer, but not sure). Maybe you can try Lilypad with pcsx2 for win32 over Wine?
[i7-3630qm/gt650m-2G/Win-7] [i7-4500u/R.HD8850m/Win-8.1] [2010-MBA/OSX-10.9.x]. Scroll smoothly with SmoothWheel for Firefox.
As Avih said, the only solution for the moment is Wine with (SDL?) software renderer.

The good news for you, I'm in Pad activities for the moment. Well it was forcefeedback but my pad is not supported on linux.... Anyway tell me exactly which behavior do you want with the mouse ? No promise, but maybe I can do somethings.

-> mouse movement -> hat ? joystick left ? joystick right ? configurable ?
-> mouse button -> could be useful Wink
-> mouse wheel -> maybe later
First off - thank you all very much for pitching in and trying to help Smile

The suggestion of running under wine is a good one and I'll try it out soon and post back the results.

As far as pad development goes, it occurs to me I may be asking for something that isn't possible with the ps2. I'm assuming you've played Virtua Cop or other 'lightgun' type games: Essentially the crosshair is controlled by the player to shoot the baddies; Ideally, this crosshair is controlled by a lightgun that goes where-ever the player points it. In the ps2 version of Virtua Cop this system is simplified so the movement of the left hand analog stick moves the crosshair left, right, up and down around the screen. What I was really wanting to do was for the crosshair to behave instead like a mouse cursor and move to the position I pointed to with my mouse. Mapping the mouse to an analog stick wouldn't achieve this I think, as the crosshair would move left or right, up or down but not to the absolute co-ordinates that the mouse was pointing to. But I may be wrong...?

I'm worried I've made the explanation too complicated: what I wanted was for the crosshair to be controlled with a mouse, like a mouse cursor. The mouse buttons need to be mapped to keys on the ps2 controller (only 2 keys in virtua cop - fire and reload)

Btw I've not used lilypad so I'm not sure if it's "use mouse" option works like this. I guess I should get wine out asap and post back if it's lilypad-type functionality I want or not Wink
Ok thank for your explanation.

For the moment I implement a draft of pad emulation from the mouse but it is different of what you want. Actually you want a real mouse however you will be dissapointed games will become too easy in the hardest mode Tongue2. Anyway I will finish it. Maybe the sensation will not be that bad.

Hum, technically it is possible. The ps2 allow usb mouse and the game need to be compatible (do not know for your game). But I think it would need a proper emulation of the usb part of the console.

Edit: in all case I'm interest of lillypad behavior
(05-22-2011, 04:44 PM)gregory Wrote: Actually you want a real mouse however you will be dissapointed games will become too easy in the hardest mode Tongue2. Anyway I will finish it. Maybe the sensation will not be that bad.

Actually it's to use a wiimote as a lightgun that I need the mouse emulation - I agree, just using the mouse isn't a good sensation, but with the wiimote - easily configured to behave like a mouse - I have great expectations!

I'll report back on lilypad under wine as soon as I have time to test it. Thanks for your help.
For your information, I commit my work on the "linux-gsopen2" branch.

For the option there is no gui option, you must manually edit pcsx2/inis/OnePAD.ini
-> emulate left pad => options=32
-> emulate right pad instead of the left => options=96
-> you can also change the sensibility with mouse_sensibility

It is a bit basic but it work. When you hit the border, the scrolling will be continuous.

The build crashes when i open the iso:

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

(pcsx2:15102): 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 GSopen.
ZZogl-PG: Creating ZZOgl window.
ZZogl-PG:  Got Doublebuffered Visual!
ZZogl-PG:  Create a 3.0 opengl context

Gdk-ERROR **: The program 'pcsx2' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 31 error_code 8 request_code 136 minor_code 5)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Aborted (core dumped)

I tried the --sync option as suggested but no change.

just using the new onepad plugin with my previous (trunk) svn build didn't detect the mouse movements on the left pad (i didn't try the right as not used in virtua cop)

I also tried running pcsx2 0.98 under wine, but had difficulty getting it working as it didn't detect the directx 9c library d3dx9_43.dll. I'll continue to persevere. Whatever the outcome, from what i can see of lilypad in the config section, it converts mouse actions into pad movements, rather as you first suggested, but not quite what i was after...
EDIT: setting gsdx to sdl 1.3 (software) and putting a copy of d3dx9_43.dll in the .wine\drive_c\windows\system32 folder appears to get everything working under wine.
EDIT2: setting the mouse as an input in lilypad seems to crash the program on loading an iso, so a non-starter there
Well it is a little experimental Tongue2 Could you also try the gsdx plugins on linux.(you will need this cmake parameter -DFORCE_INTERNAL_SDL=TRUE ).

Your log file is very strange!!! You've got the good branch (because you have this line "Create a 3.0 opengl context"). However this part is very bad, you still use old version of gsopen.
Quote:ZZogl-PG: Calling GSopen.
ZZogl-PG: Creating ZZOgl window.

Mine is
Quote:ZZogl-PG: Calling GSopen2.
ZZogl-PG: Capturing ZZOgl window.

I need to check if I did not forget anything

Edit: for your information, you need to have everythings from the branch (pcsx2 and plugins) because I change the current pcsx2 interface to allow new feature in plugins.
Edit2: if you can generate a backtrace it will be very welcome Smile I think you got some issue with compilation option use -DCMAKE_BUILD_TYPE=Debug for the moment.
# lauch gdb
gdb pcsx2
# setup gdb
handle SIGSEGV nostop
# answer yes if needed
break gdk_x_error
# boot pcsx2
# when it stop due to your previous error, post me the output of the following command.
bt full

Users browsing this thread: 1 Guest(s)