| View previous topic :: View next topic |
| Author |
Message |
binaryONE
Joined: 18 Apr 2006 Posts: 19
|
Posted: Sun Mar 16, 2008 2:40 pm Post subject: PSP Controller code with sensitivity. |
|
|
I wrote this for for use in games and thought it maybe useful for others.
http://devrc.org/pub/pspctrl/ (has eboot, makefile and source)
Have fun. |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sun Mar 16, 2008 11:06 pm Post subject: |
|
|
Sensitivity = pressure.
I am sure xbox1 got that capability (Tested w/ openXDK) but not PSP. _________________ Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Mar 17, 2008 4:05 am Post subject: |
|
|
This is just plain WEIRD. The "sensitivity" means it won't return a key until it's been held a certain amount of time, but not if held too long... like a bad debounce routine. It also returns the keys as a string for a single key - no support for multiple keys at all, not to mention making it a string makes checking which key later a pain in the butt.
In conclusion, an odd bit of example code, but not really useful for anything I can think of. Glance over the code, but don't use it. |
|
| Back to top |
|
 |
binaryONE
Joined: 18 Apr 2006 Posts: 19
|
Posted: Mon Mar 17, 2008 4:28 am Post subject: |
|
|
J.F.
It seems that way, but you gotta try it, there's lots of things going on. :) |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Mar 17, 2008 7:47 am Post subject: |
|
|
| Okay, another look shows you are keeping the buttons as a bitfield, and the strings are just for mapping purposes (I guess you'd use that in a GUI). However, it's only timing how long you hold the buttons. That's not the same thing as sensitivity, no matter how you look at it. |
|
| Back to top |
|
 |
binaryONE
Joined: 18 Apr 2006 Posts: 19
|
Posted: Mon Mar 17, 2008 7:50 am Post subject: |
|
|
You are right, however, this simulates sensitivity, I don't think there's any other way to measure it other than timing (at least not on psp), since that requires voltage variation or some mechanical feedback being interpreted by the kernel.
If there is something like that I'd like to check it out for sure. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Mar 17, 2008 12:30 pm Post subject: |
|
|
| I suppose it would be useful for some things, even if I can't think of something off the top of my head. :) It's also useful as sample code for people who are just learning about controller input. |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Mon Mar 17, 2008 10:33 pm Post subject: |
|
|
Steering a moving vehicle maybe, but nobody has written any game of
near enough quality I've seen that would call for attention in the area
of player control over improvement in other areas. Not for a game involving a vehicle at least.
There was a nice 3D homebrew racing car demo, but I don't remember seeing the full game.
I'm glad we didn't get analogue buttons on the PSP.
It just isn't the way arcade buttons are meant to be.
It's Yes or No. You can keep the Maybe for Human relationships. _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
|