Post by vynce on Jan 31, 2007 17:41:56 GMT -5
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:
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1168131869
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1152508381
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1154107017
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1153598621
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1151094880
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1150242974
psxemulator.proboards54.com/index.cgi?board=bugreports&action=display&thread=1144494317
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:
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1168131869
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1152508381
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1154107017
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1153598621
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1151094880
psxemulator.proboards54.com/index.cgi?board=support&action=display&thread=1150242974
psxemulator.proboards54.com/index.cgi?board=bugreports&action=display&thread=1144494317