Emuforums.com

Go Back   Emuforums.com > PSX Emulation > PSX Plugin Questions & Troubleshooting
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old April 13th, 2003   #1 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
Analog pad on Linux

Ok, I searched in the forum for that, but I couldn't find the exact information I need, so I'm posting here.

The question: analog pad (so DualShock ones) are supported in P©SX/Linux? Because AFAIK the F5 on P©SX/Linux doesn't switch from analog/digital (as on the Windows version IIRC). So, as ePSXe/Linux doesn't support analog pad ATM, I guess if P©SX can and if yes in which way, because I'm trying the ammoQ's padAnalog pad plugin w/ GT2...

Thx, bye
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 13th, 2003   #2 (permalink)
Emu author
 
ammoQ's Avatar
 
Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
Chris L. wrote to me some time ago:
Quote:

Just letting you know that padAnalog is working fine
for me. _I just concluded my first test run using an
interact hammerhead FX dual shock pc gamepad. _The pad
is connected to an emu10k1-gp and of course is using
the interact driver. _The game I tested with was
Re-Volt, both analog sticks worked correctly (left for
steering, right for gas). _The emulator used was pcsx.
__________________
If you think my English is bad, wait till you read my Polish.
ammoQ is offline   Reply With Quote
Old April 13th, 2003   #3 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
ok, thx ammoQ, tomorrow evening I'm going to recompile your padAnalog w/ my buttons/axeses layout and I'll give it a try on P©SX w/ GT2 and "Ape Escape" (which specifically requires a DualShock pad).

Thx again, as usual I'll send u my results

Thx, bye
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 14th, 2003   #4 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
hello,

I tried to adjust & recompile the padAnalog w/ my settings, but nothing changed, I mean I can't use the padAnalog on GT2 (the buttons and the axeses r all mixed together, so UP is the CROSS and so on) and "Ape Escape" doesn't start.


Here the P©SX output when I tried to start "Ape Escape":

Quote:
gismo:/usr/games/pcsx# ./pcsx

PS-X Realtime Kernel Ver.2.5
Copyright 1993,1994 (C) Sony Computer Entertainment Inc.
KERNEL SETUP!

Configuration : EvCB 0x10 TCB 0x04

BOOTSTRAP LOADER Type C Ver 2.1 03-JUL-1994
Copyright 1993,1994 (C) Sony Computer Entertainment Inc.
setup file : cdrom:SYSTEM.CNF;1
TCB 00000020
EVENT 00000020
STACK 801ffff0
BOOT = cdrom:\SCUS_944.23;1
argument = EVENT=20
STACK=801FFFF0

KERNEL SETUP!

Configuration : EvCB 0x20 TCB 0x20
boot file : cdrom:\SCUS_944.23;1
EXEC:PC0(800a3660) T_ADDR(80010000) T_SIZE(000a5000)
boot address : 800a3660 801ffff0
Execute !

S_ADDR(801ffff0) S_SIZE()
CD_init:addr=800a6f98
ResetGraph:jtb=800a87f8,env=800a8840
Segmentation fault
gismo:/usr/games/pcsx#
And here my pad.c used to recompile the padAnalog:

Quote:
/*
* Pad for Psemu Pro like Emulators
*
* By ammoQ <ammoq@ammoq.com>
* Based on padXwin by linuzappz <linuzappz@hotmail.com>
*
*/


/* Definition for AXIS; just a wild guess...*/
#define AX_DIGIAL_X 8
#define AX_DIGIAL_Y 9
#define AX_LEFT_X 0
#define AX_LEFT_Y 1
#define AX_RIGHT_X 6
#define AX_RIGHT_Y 2

#define PCSX_STYLE 0

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/joystick.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>

typedef char HWND;

char *LibName = "ammoQ Analog Pad Driver";

const unsigned char version = 1; // PSEmu 1.x library
const unsigned char revision = VERSION;
const unsigned char build = BUILD;

// Filenames for device files, e.g. "/dev/input/js0"
char devicefilename[2][100] = {"/dev/input/js0", ""};

// File desciptors for device files
int devicefile[2] = { -1, -1 };

// Position of directional buttons in PadButtons
#define PSXBTN_UP 12
#define PSXBTN_RIGHT 13
#define PSXBTN_DOWN 14
#define PSXBTN_LEFT 15

// Zero range (for analogue sticks)
#define MINZERO -50
#define MAXZERO 50

// Assignment of PSX buttons to device buttons
short PadButtons[2][16] = {{
4, // L2
5, // R2
6, // L1
7, // R1
0, // Triangle
1, // Circle
2, // Cross
3, // Square
9, // Select
10, // Left Analog???
11, // Right Analog???
8, // Start
-1, // Up
-1, // Right
-1, // Down
-1 // Left
},
{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }};
I also attached my padAmmoq.cfg renamed in padAmmoq.txt(this works greatly). I've a question: in the pad.c (for padAnalog) do I need to assign the buttons as "B0P1" and the axeses as "A0P1" as in the padAmmoq.cfg?

Thx, bye
Attached Files
File Type: txt padammoq.txt (1.2 KB, 38 views)
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 15th, 2003   #5 (permalink)
Emu author
 
ammoQ's Avatar
 
Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
Quote:
Originally posted by Gismo
hello,
I also attached my padAmmoq.cfg renamed in padAmmoq.txt(this works greatly). I've a question: in the pad.c (for padAnalog) do I need to assign the buttons as "B0P1" and the axeses as "A0P1" as in the padAmmoq.cfg?
No, just numbers. But to use it with PCSX, it might help to set PCSX_STYLE to 1.
__________________
If you think my English is bad, wait till you read my Polish.
ammoQ is offline   Reply With Quote
Old April 15th, 2003   #6 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
ok, ammoQ, I'm glad to tell u that your padAnalog (configured for my PSXtoUSB) works perfectly on GT2 (left stick for steering and right one for accelerating/breaking)

So, my next question/demand: can I configure the padAnalog to use 2 analog pads (as for the padJoy)? If yes, in which way?

I tested also "Ape Escape", but it still gives me the same error and so I thought a moment: yes, IIRC "Ape Escape" can't start on P©SX (as I remembered, no one here at NGEmu.com can start it and I already asked for help, I've the NTSC version). So, it's the problem w/ the game, not w/ the padAnalog.

Thx, bye
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 15th, 2003   #7 (permalink)
Emu author
 
ammoQ's Avatar
 
Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
Quote:
Originally posted by Gismo
ok, ammoQ, I'm glad to tell u that your padAnalog (configured for my PSXtoUSB) works perfectly on GT2 (left stick for steering and right one for accelerating/breaking)
That's great news. The same plugin does not work at all in ePSXe? (Try to change PCSX_STYLE to 0)
Quote:

So, my next question/demand: can I configure the padAnalog to use 2 analog pads (as for the padJoy)? If yes, in which way?
If might work if the second pad is a separate device in Linux (not just more buttons and axis on the first device) - this restriction is a result of the simple design of padAnalog. With padJoy, this restriction will not apply.

Line 38f:
// Filenames for device files, e.g. "/dev/input/js0"
char devicefilename[2][100] = {"/dev/input/js0", ""};

Replace the second "" with the device file name of the second pad, e.g.
"/dev/input/js1"

Line 54ff:
// Assignment of PSX buttons to device buttons
short PadButtons[2][16] = {{
10, // L2
11, // R2
6, // L1
7, // R1
4, // Triangle
1, // Circle
0, // Cross
3, // Square
9, // Select
12, // Left Analog???
13, // Right Analog???
8, // Start
-1, // Up
-1, // Right
-1, // Down
-1 // Left
},
{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }};

The second part (16 times -1) must be changed to reflect the configuration of the second pad.

Good luck,
ammoQ
__________________
If you think my English is bad, wait till you read my Polish.
ammoQ is offline   Reply With Quote
Old April 15th, 2003   #8 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
Quote:
Originally posted by ammoQ
That's great news. The same plugin does not work at all in ePSXe? (Try to change PCSX_STYLE to 0)
eheheh... I knew u would ask me for this... so I already tried the padAnalog on ePSXe (changing PCSX_STYLE to 0) but it doesn't work , sorry... I'll made another test w/o changin PCSX_STYLE, just to know if it'll work.

Quote:
If might work if the second pad is a separate device in Linux (not just more buttons and axis on the first device) - this restriction is a result of the simple design of padAnalog. With padJoy, this restriction will not apply.
As probably u remember, my PSXtoUSB (and I think all the PSXtoUSB for 2 players like mine) maps the 1st-player pad and the 2nd one on the same device (and this is the reason for the changes in MAXAXESES and MAXBUTTONS in padJoy). So, I can't make the changes u wrote me, but anyway I can always try mapping to the same device. The bad news is that I can't try ATM, as I don't have here at Geneva a second PSX pad, but this w/e again I'll be in Italy and I'll give it a try

Thx, bye

edit > ops, I forgot: u did a great work w/ padJoy and padAnalog... I thx u again
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 15th, 2003   #9 (permalink)
Emu author
 
ammoQ's Avatar
 
Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
I made a new version of padAnalog that should fit your needs, good luck!
Don't forget to save your version of padAnalog, you will have to modify padAnalog0.2 the same way.

http://download.ammoq.com
__________________
If you think my English is bad, wait till you read my Polish.
ammoQ is offline   Reply With Quote
Old April 18th, 2003   #10 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
hello, I'm here again and now I'm in Italy...

I tried the padAnalog0.2 w/ all the 2 PSX pads my PSXtoUSB let use: on GT2 there'r 2 analog pads This is wonderful, your padAnalog is perfect (at least for the function, I mean, it needs a config window and about this, I sent u a @).

So, another time, go on, merge padJoy and padAnalog... and next step, why not the rumble on Linux?

Thx, bye
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Old April 19th, 2003   #11 (permalink)
Emu author
 
ammoQ's Avatar
 
Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
about the rumble: I have to find information...
a) how (if at all) does the emulation tell the plugin to rumble
b) how to make the pad rumble (drivers etc.)
__________________
If you think my English is bad, wait till you read my Polish.
ammoQ is offline   Reply With Quote
Old April 19th, 2003   #12 (permalink)
A man w/ a lot of dreams
 
Gismo's Avatar
 
Join Date: Nov 2002
Location: now Geneva (CH) / past Lodi (ITA)
Posts: 731
Quote:
Originally posted by ammoQ
about the rumble: I have to find information...
a) how (if at all) does the emulation tell the plugin to rumble
sorry, but this is a thing far from me, I don't know a lot about it... And AFAIK, there'r not opensource pad plugin for Windows w/ rumble support. The only I know is the Harakiri one (http://www.geocities.co.jp/Playtown-Rook/2087/) and u can also download some parts of the plugin code. Maybe u need to ask linuzpappz, Calb or other emu authors for this.

Quote:
b) how to make the pad rumble (drivers etc.)
as I already posted about the Logitech Wingman on Linux, I'm trying to recompile the kernel w/ rumble support, but as I'm a newbie on Linux I'm encountering some difficulties in doing this. On the other hand, the author of the rumble support for Linux wrote me that this is only for I-force gamepad, but anyway I want to test w/ my PSXtoUSB. I've also a Logitech Wingman Rumble for other tests Once I get my PSXtoUSB rumble, I'll write u how to make the pad rumble

Finally, I'm here to give u all the support u need, in testing, finding solutions or everything other u want.

Thx, bye
__________________
< half-december '02: ASUS L2480C (14" TFT / Athlon XP 1600+ / SiS 630/730 / 256MB SDRAM / 20GB HDD / DVD-ROM+CD-RW)
> half-december '02: ASUS L3562T (15" TFT / Pentium4 2.0GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> end-march '03: ASUS L3568T (15" TFT / Pentium4 2.4GHz / SiS 650 / 256MB DDR / 40GB HDD / DVD-ROM+CD-RW)
> june '03: ASUS M3410C (14" TFT / Intel Centrino Pentium-M 1.3GHz / Intel 855GM / 512MB DDR / 40GB HDD / DVD-ROM+CD-RW)
==============================
always... Debian sid/unstable (& sometimes WXP-Pro+SP1+lastDX) / Super Dual Box (2-players PSXtoUSB) / Sony DualShock 2 Ocean blue
Gismo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:53.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5