PSP Controller code with sensitivity.

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

PSP Controller code with sensitivity.

Post by binaryONE »

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.
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

Post by binaryONE »

J.F.

It seems that way, but you gotta try it, there's lots of things going on. :)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

Post by binaryONE »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

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.
Post Reply