pSX Emulator
« Possible fix for controller configuration problems »

Welcome Guest. Please Login or Register.
May 21, 2013, 3:24pm



Important Links
[ pSX Homepage | FORUM RULES | FAQ | Things to Remember when Posting Reports | Known Requests | Search ]
Make sure you familiarize yourself with ALL of the above links.

Global Announcement
As of this now, new users will no longer be able to register. Absence of staff to keep up with registrations and the security issue with throw-away email addresses are the cause of this.

Also, there will be no more posts permitted by users, again due to lack of active staff plus lack of development.


The illegal sharing of copyright material will not be tolerated. This includes, but is not limited to, the sharing of disc images, ROMs, and BIOS images. We do not provide support for people who have obtained their games or BIOS images by illegal means.

Emulator Problems Announcement
This forum is for generic bugs found in pSX, not compatibility issues. If the problem you're having affects gameplay in general, then more-likely-than-not, it is a game compatibility issue. As such, please report it in the appropriate forum.

pSX Emulator :: Support :: Emulator Problems :: Possible fix for controller configuration problems
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Possible fix for controller configuration problems (Read 7,107 times)
vynce
New Member
*
member is offline





Joined: Jan 2007
Posts: 3
 Possible fix for controller configuration problems
« Thread Started on Jan 31, 2007, 5:41pm »

First of all, excellent work on this emulator so far! I find it amazing that it works so well even though it's relatively new - it replaced ePSXe for me soon after I discovered it.

I just bought a Super Joy Box 5 Pro from Play-Asia.com and I'm having the same controller configuration problems that many others are having with similar adapters.

When I click on any input field in the controller setup, that field, and all the ones following it, are set to Axis5 -ve.

I have the official Playstation 2 dualshock controller. I'm using the most recent adapter drivers dated 06-12-2006 from MayFlash's website. I've tried with and without the driver and the drivers for some of the other MayFlash adapters (they didn't work with my adapter). I've calibrated the controller in all cases. I have been using a Nyko Airflo Ex for the past few months and it has worked fine with pSX. However, the Nyko has a horrible D-pad, hence the switch to a dualshock and USB adapter.

The problem does not appear to be due to the analog sticks not being centered properly, or "jitter" from the sticks being just slightly off-center. I tested this using the Joystick Test Script for AutoHotkey. The values for the axes stay stable.

I noticed that the adapter driver configuration dialog showed two additional "slider-type" analog axes, but I couldn't get them to respond. It later dawned on me that these are for the pressure sensitive button support. It also seems like most of the people having problems with all of the inputs in pSX being set to Axis5 -ve are using adapters that support the pressure sensitive buttons. The first four axes are used for the two analog sticks, so axis 5 is probably one of these pressure sensitive button axes.

Interestingly, the AutoHotkey joystick test script only detects four analog axes (like it should, since I have the pressure sensitive buttons disabled in the driver). Digging into the AutoHotkey source code, it uses joyGetDevCaps () to get the joystick capabilities. This is part of the winmm library. DirectInput does it something like this: joystick->GetCapabilities(&capabilities), but I think it should give similar results to joyGetDevCaps(). Most of the joystick code for AutoHotkey is at the end of the script2.cpp file.

Since I haven't had any problems with any other software with this adapter, I can only assume that the problem must be in the way that pSX gets the joystick capabilities, or the way in which it polls for changes in the state of the joystick, or how it interacts with the adapter driver (unlikely since other software doesn't seem to have this problem). For some reason, pSX seems to be polling the disabled, pressure sensitive, axes even though they're disabled. The solution could be as simple as only polling for changes on axes that the joystick reports that it has.

I hope this helps clarify and narrow down the problem. I'd be happy to help debug/test this further if needed.

Here are some of the related threads:
http://psxemulator.proboards54.com/index....read=1168131869
http://psxemulator.proboards54.com/index....read=1152508381
http://psxemulator.proboards54.com/index....read=1154107017
http://psxemulator.proboards54.com/index....read=1153598621
http://psxemulator.proboards54.com/index....read=1151094880
http://psxemulator.proboards54.com/index....read=1150242974
http://psxemulator.proboards54.com/index....read=1144494317
« Last Edit: Feb 3, 2007, 12:18pm by vynce »Link to Post - Back to Top  IP: Logged
Ultima
Administrator
*****
Ulti-Admin
member is offline





Joined: Jan 2006
Posts: 2,333
 Re: Possible fix for controller configuration prob
« Reply #1 on Jan 31, 2007, 6:12pm »

Yep, your explanation jives with my suspicions/suggestions -- I'd always been saying that changing the drivers helped for me, and that one should try messing with the deadzone settings for the controller to be sure the axes aren't off-center. BTW, thanks for the well-informed thread, as well as for gathering up a bunch of the threads in one -- makes for easier referencing in the future :)
« Last Edit: Jan 31, 2007, 6:16pm by Ultima »Link to Post - Back to Top  IP: Logged

pSX Frontend (v1.12.1 on 2009-05-08)
pSX Emulator Compatibility List, a (currently outdated) JavaScript implementation of smegforbrain's compatibility list
Mika
Posting Freak
*****
member is offline

[avatar]



Joined: Aug 2006
Gender: Male
Posts: 886
Location: Finland
 Re: Possible fix for controller configuration prob
« Reply #2 on Feb 1, 2007, 6:20pm »

Best first post ever. While I personally haven't had any issues with my ps2>usb converter with default windows drivers (who needs rumble anyway), there are many who have indeed.

This is a good thread.
Link to Post - Back to Top  IP: Logged

[image]
vynce
New Member
*
member is offline





Joined: Jan 2007
Posts: 3
 Re: Possible fix for controller configuration prob
« Reply #3 on Feb 3, 2007, 12:17pm »

Thanks guys!

It seems like quite a few people have been having this and similar problems. Since I've now run into the same problem I thought I would try and figure it out. I hope the info that I've put together here helps PSX Author improve the pSX controls.

Here's some DirectInput related links:
HID Game Controllers and DirectInput
Interfacing with a joystick using C#
Beginning Game Development: Part IV - DirectInput
Microsoft's DirectInput Documentation
Microsoft DirectX 9.0 SDK: Tutorial 3: Using the Joystick
Microsoft DirectX/XNA SDK: Tutorial 3: Using the Joystick
DirectX/XNA Forums

The bsnes source has most of its DirectInput code in \src\ui\input which might be a useful comparison. I don't think bsnes makes much use of axes though.
« Last Edit: Feb 3, 2007, 2:18pm by vynce »Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]


Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile