..:: PCSX2 Forums ::..

Full Version: Linux - Compile Guide and Support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Quote:Okay, i will download 1.2.13 source rpm, and recompile it.
With SDL 1.2.13, Can you using Left Analog Axis with the Game in PCSX2 ?
So in not my gamepad, i almost try to Buy XBOX360 Gamepad to change My PLaystation 2 Dual Shock (Conected via pararel port).

What I have is the plain SDL 1.2.13 rpm from Mandy's repos, not from source.
But yes, try first to apply those patches with 1.2.14 source.

SDL 1.2.13 is working OK (on PCSX2 yes) with every axis (both left & right) while 1.2.14 fails to do the same.
I suppose some distros patched their SDL 1.2.14 to fix the issue, on Ubuntu at least 1.2.14 is working OK with all the axes.

Playstation gamepad connected through parallel port...with that 9 volts battery to give you force-feedback? Smile
I still have one of those, unable now to use it because my new motherboard doesn't have any parallel port Sad
Anyway, I don't think you'll like the Xbox controller, especially if you're accustomed with the Playstation gamepad....it feels kinda awkward (I bought one recently).
I strongly suggest the Logitech Rumblepad 2 if you plan to spend some money.
(04-05-2011, 05:25 PM)dubigrasu Wrote: [ -> ]What I have is the plain SDL 1.2.13 rpm from Mandy's repos, not from source.
But yes, try first to apply those patches with 1.2.14 source.

SDL 1.2.13 is working OK (on PCSX2 yes) with every axis (both left & right) while 1.2.14 fails to do the same.
I suppose some distros patched their SDL 1.2.14 to fix the issue, on Ubuntu at least 1.2.14 is working OK with all the axes.

What Gamepad do you use?


(04-05-2011, 05:25 PM)dubigrasu Wrote: [ -> ]Playstation gamepad connected through parallel port...with that 9 volts battery to give you force-feedback? Smile
I still have one of those, unable now to use it because my new motherboard doesn't have any parallel port Sad
Anyway, I don't think you'll like the Xbox controller, especially if you're accustomed with the Playstation gamepad....it feels kinda awkward (I bought one recently).
I strongly suggest the Logitech Rumblepad 2 if you plan to spend some money.

Yes those one, i modified my self.
i read how to do it, in linux kernel source code in gamecon.
but gamecon driver does not have force feedback support, so i does not need 9volt battery.

My Motherboard Biostar GF8100 M2+ TE does not have it too, to have Pararel Port, i have to Buy Pararel Connector to connect it to my motherboard. (like this picture)
[Image: idc26-db25-motherboard-parallel-port.jpg]

thanks for the advice, i want to buy x360 gamepad (not the original) because it's cheaper than Logitech.
but if this gamepad issue is gone, i will stick with my Playstation2 gamepad.
Most of the time I'm using the Logitech Rumblepad 2 http://mobile.dailysteals.com/images/pro.../391_2.jpg
I said most of the time because I have some others, a Logitech wireless one, a Thrust master.........crap, I have around 8 in total including those from the PS2 Console.
All that because of my desperate early attempts to get Forcefeedback working in Linux.(Problem solved now)
I haven't used for a long time the Playstation/parallel gamepad (although I think is still the best) but maybe I can revive it thanks to your cable suggestion.

OK, I'm afraid I went a bit off topic here, sorry.
One thing you can do to clarify things is to install some game that is using SDL for handling the gamepads and start it from console. A good candidate is Trigger-Rally.

Quoting myself from the Mandriva thread:
Quote:With libSDL 1.2.14 installed when I start a game (Trigger Rally) I get this in console:

Initialising SDL
Create window and set video mode
Found 1 joystick
Joystick 1: Logitech Logitech Cordless RumblePad 2 USB, 1 axis, 12 button, 0 hat


SDL is detecting only one axis and no hat (the cross). The game starts but I can only use the 12 buttons, the moment I touch the directional buttons the game crashes.

After downgrading to libSDL 1.2.13 I get the correct configuration:

Initialising SDL
Create window and set video mode
Found 1 joystick
Joystick 1: Logitech Logitech Cordless RumblePad 2 USB, 4 axis, 12 button, 1 hat


This time the gamepad behaves correctly.

Once that you've established that SDL is in order you can continue with PCSX2.
(04-05-2011, 06:54 PM)dubigrasu Wrote: [ -> ]One thing you can do to clarify things is to install some game that is using SDL for handling the gamepads and start it from console. A good candidate is Trigger-Rally.

Quoting myself from the Mandriva thread:

Once that you've established that SDL is in order you can continue with PCSX2.
thanks for the info and advice.

FYI, another reason why i want to buy xbox360 is Forcefeedback supportBlush
but when i think again, i'am not a gamer, just playing few hour, i will get bored, then i will watch anime or just reading manga or trying new program.


my Playstation 2 have 6 Axis, it detected by jstest and KDE Control Panel.

and in Pcsx2, my Playstation2 gamepad already detected with 4 Axis, but when i use Left Anolaog stick, is just the same when i pushed D Pad.
With the trick from gregory, i can get 6 Axis and i can configure it.
but i can not using Left Analog Stick with the Game.
Hum that an interesting issue ! You have an issue because _this is null. In this case the code before the crash (SDL_VideoInit) is executed to properly setup _this. The code seems fine, it is strange. Anyway.

Here a scenarii for gdb
1/ run
# Do not boot yet pcsx2
2/ ctrl-c
# gdb will stop.
3/ break SDL_VideoInit
4/ continue
# gdb will stop at the call of SDL_CreateWindow
5/ ctrl-x A <- toggle code source with command.
# Now the difficult part
6/ use next command several times. Each times will execute 1 line of codes.
Normally, in the middle of the function you will execute this line "_this = video;"
7/ At line 463 ("_this = video;") do: print *video
Go back to next command until you reach a return instruction.
8/ At line 520 ("return 0;") do: print _this
Just some small things:
Quote:my Playstation 2 have 6 Axis, it detected by jstest and KDE Control Panel.
Unfortunately it doesn't matter what KDE and jstest are detecting, SDL does its own detection and it can still screw it up and badly detect the axis.

Quote:FYI, another reason why i want to buy xbox360 is Forcefeedback support
Gregory can confirm or not this, but I think for force-feed back in PCSX2 you'll need SDL 1.3.0.
Xbox360 and Logitech Rumblepad are both working with force feedback in Linux and both can provide through the kernel driver three effects: Sine, Square and Triangle.
However, Xbox360 using an userspace driver (xboxdrv) can provide a greater number of effects:
Code:
[dubigrasu@test SDL]# ./testhaptic
1 Haptic devices detected.
Device: Xbox Gamepad (userspace driver) - 1
Supported effects [16 effects, 16 playing]:
constant
sine
square
triangle
sawtoothup
sawtoothdown
ramp
custom
Supported capabilities:
gain

(testhaptic is a small test among others included in the SDL 1.3.0. source)

Sorry for the interruption.





Quote:Gregory can confirm or not this, but I think for force-feed back in PCSX2 you'll need SDL 1.3.0.
I do not know. However you can easily use SDL 1.3 in pcsx2 => -DFORCE_INTERNAL_SDL=TRUE
(04-05-2011, 07:18 PM)gregory Wrote: [ -> ]Hum that an interesting issue ! You have an issue because _this is null. In this case the code before the crash (SDL_VideoInit) is executed to properly setup _this. The code seems fine, it is strange. Anyway.

Here a scenarii for gdb
1/ run
# Do not boot yet pcsx2
2/ ctrl-c
# gdb will stop.
3/ break SDL_VideoInit
4/ continue
# gdb will stop at the call of SDL_CreateWindow
5/ ctrl-x A <- toggle code source with command.
# Now the difficult part
6/ use next command several times. Each times will execute 1 line of codes.
Normally, in the middle of the function you will execute this line "_this = video;"
7/ At line 463 ("_this = video;") do: print *video
Go back to next command until you reach a return instruction.
8/ At line 520 ("return 0;") do: print _this

thanks for the reply.

Okay i did this,
1. run
# i'am not booting pcsx2

2. Ctrl-c
# Now gdb stoping

3.typing command "break SDL_VideoInit"
# and i got Breakpoint 1 at 0xb473380a: file /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c, line 419.

4.typing command "continue"
# Boot up pcsx2 with "Boot CDVD (full)"
# Then I got this info in (gdb) :
Code:
[New Thread 0xb5624b70 (LWP 19655)]
[New Thread 0xaa10bb70 (LWP 19656)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xaa10bb70 (LWP 19656)]
0xb4734e98 in SDL_CreateWindow (title=0xa4fb18c "PCSX2", x=100, y=100, w=640, h=480, flags=38)
    at /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c:1124
1124            if (!_this->GL_CreateContext) {
Missing debug package(s), you should install: dbus-debug-1.2.24-1mdv2010.1.i586 expat-debug-2.0.1-12mdv2010.1.i586 gvfs-debug-1.6.1-2mdv2010.1.i586 udev-debug-153-5mnb2.i586

5.Press Ctrl-x A
# I got source /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c
# and it's pointing to line 1124 if (!_this->GL_CreateContext) {

6.typing command "next"
# I got source /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp
# and it's pointing to line 32 {

7.typing command "next"
# I got info :
Code:
SysPageFaultSignalFilter (signal=11, siginfo=0xaa10ab7c) at /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp:32
# An I got source /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp
# and it's pointing to line 49 Source_PageFault->Dispatch( PageFaultInfo( (uptr)siginfo->si_addr & ~m_pagemask ) );

8.typing command "next"
# I got info
Code:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0831dd35 in PageFaultInfo::PageFaultInfo (this=0xaa10ab40, address=0) at /home/ai/Game/pcsx2-svn/common/include/Utilities/PageFaultSource.h:33
# I got source /home/ai/Game/pcsx2-svn/common/include/Utilities/PageFaultSource.h
# and it's pointing to line 33 PageFaultInfo( uptr address )

9.typing command "next"
# I got source /home/ai/Game/pcsx2-svn/common/include/Utilities/PageFaultSource.h
# and it's pointing to line 35 addr = address;

it's continue until i got info in (gdb)
Code:
Cannot find bounds of current function
than after i get that, i type command quit an choose y to quit the gdb.

In Step 5, i do Ctrl-x A i get Error Window Popup , this is the right thing to do, or i must type command "continue" to get Error Window Popup ?

And, i don't see line 463 or line 520 like you told me.

i attach the file with the info what i'am doing until i quit the gdb.
(04-06-2011, 05:15 AM)dubigrasu Wrote: [ -> ]Just some small things:
Unfortunately it doesn't matter what KDE and jstest are detecting, SDL does its own detection and it can still screw it up and badly detect the axis.

Yes your right.
btw, can you test xbox360 with Zeropad plugin, in there have Forcefeedback option.

After i do some test with source rpm 1.2.13 from mandriva 2010.0, and compile it with rpm-build -bb SDL12-1.2.13.spec, then i test it with pcsx2-beta r3881
and pcsx2-svn r4517 (re-compiled again from source)
- without export SDL_JOYSTICK_DEVICE=/dev/input/js0 , i can'not using Left Analog Stick, because it's only detect Left Analog stick UP and Left direction.
- with export SDL_JOYSTICK_DEVICE=/dev/input/js0 i can set it in Onepad, but in the game, i cannot use DPAd.



then using SDL 1.2.14 source rpm, check it, the patch :
Code:
::::::::::::::
222_joystick_crash.diff
::::::::::::::
Description: Fix crash with joystick detection.
Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c
===================================================================
--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:37:36.000000000 -0500
+++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:38:27.000000000 -0500
@@ -700,7 +700,7 @@
                continue;
            }
            if ( test_bit(i, absbit) ) {
-                int values[5];
+                int values[6];

                if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
                    continue;
is not aplied and no patch like that in Mandriva Source RPM SDL 1.2.14
So I patch it.

But this patch:
Code:
218_joystick_memmove.diff
::::::::::::::
---
src/joystick/SDL_joystick.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -373,7 +373,7 @@
    /* Remove joystick from list */
    for ( i=0; SDL_joysticks[i]; ++i ) {
        if ( joystick == SDL_joysticks[i] ) {
-            SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i+1],
+            SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i+1],
                   (SDL_numjoysticks-i)*sizeof(joystick));
            break;
        }
is Already Aplied in the Original SDL Source Code 1.2.14.

Then Compile it with rpm-build -bb SDL12-1.2.14.spec and install it.
then i test it with pcsx2-beta r3881 (binary release)
and pcsx2-svn r4517 (re-compiled again from source)

- - without export SDL_JOYSTICK_DEVICE=/dev/input/js0 , i can'not using Left Analog Stick, because it's only detect Left Analog stick UP and Left direction.
- with export SDL_JOYSTICK_DEVICE=/dev/input/js0 i can set it in Onepad in pcsx2-beta, but in the game, i cannot use DPAd corecly,
sometime, the DPad Up direction not working, sometimes the DPad Down direction not working.

- with export SDL_JOYSTICK_DEVICE=/dev/input/js0 i can set it in Onepad in pcsx2 r4517, and now it's working corect.
But to setup is hard, i need a lot try.
after i get the right setuo, i coppied the ini to the pcsx2-beta
and now pcsx2-beta can use it corectly.


If you want, i can give SDL12-1.2.14 rpm to you.
or you could tell to Mandriva team, to aplly that patch to Fix Fix crash with joystick detection.
so tey can build new rpm and put it in updates repro.



@Gregory
I Got Another problem, to set up Onepad plugin in svn is hard to click OK button, because no scroll menu in Onepad anymore, like in pcsx2-beta.
This problem exist if i use sdl 1.2.13 or 1.2.14.
here the screenshot:
1.Pcsx2-beta r3881
[Image: onepadpcsx2beta1.jpg]



[Image: onepadpcsx2beta2.jpg]

Uploaded with ImageShack.us

2.pcsx2-svn
[Image: onepadpcsx2svn.jpg]

Uploaded with ImageShack.us

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35