Yes I know, you (if it was you who wrote the email I
replied to) called
it PS2Linux joystick. I did’nt want to put a
dampener on your efforts
so I went along with what you called it. However,
actually DualShock2
anyway, because it has presure sensitive buttons.
(Which I will also
be
adding functionality for!)The usual linux joystick driver isn’t able to use
the
2nd analog stick, something has gone wrong in the
chain, either the driver isn’t looking for a 2nd
stick, or the PS2 hasn’t told it it’s there, ore
something like that.I believe joypadlib uses ioctl() commands to get
button pressures, the 2nd analog stick, and the R3
and
L3 buttons, which the standard linux driver does
not.
If you’re looking for the best way to make use of
such
things, then really look at the joypadlib source,
it’s
a good read.
Well I have done a lot of it already. joypadlib just
uses the same
ps2pad kernel module as the SDL code I have >written.
There is not much
point in using middleware to call middleware to call
kernel functions.
So I implemented it cleanly from scratch based on
the API.It’s that comprehensive that I wondered if it
should
make it into SDL code, but then not many control
devices have a 2nd stick, so it doesn’t sound like
writing for 2 sticks is a portable feature, so
isn’t
needed in SDL at the moment.Unless of course you could have your games detect
whether 2 sticks exist, and if the 2nd one doesn’t,
map the mouse onto a second stick…The standard linux joystick driver also doesn’t
allow
for the actuators (Sony’s way of saying vibrator,
and
avoiding the double-entendre) I think ioctl()s
come to
the resuce again to allow joypadlib to access them.To summarise, joypablib != (standard linux joystick
driver), but then (PS2 pad) != typical joystick.I dont think there is a standard pad now, every
manufacturer does it
different, and they always will. SDL has a great
abstract design, the
joystick stuff is perfect for supporting extra
buttons or other
features.I’ve written most of an extra module now, I will
submit a patch when
its done.the ps2pad api is reasonably well thought out and I
have the basics
working.Cheers
JG
Please accept my apologies, I think somewhere along
the line I read ‘standard p2spad API’ as ‘standard
joystick driver’ and hadn’t realised you’d done so
much work. It’s hard work reading all of this list!
If you’re running SDL on the PS2, can you tell me if
you have problems with video when running straight
from the command line? IF I try
PAL nointerlace 32bpp 640 240
the screen comes out wrongly, but
PAL nointerlace 32bpp 640 256
seems to come out fine for some reason. I’ve given up
trying to get round it, and am forcing my PS2 to
640x256 before I load my SDL game. Would be nice to
fix though
Certainly being able to incorporate the 2nd stick and
extra buttons using the SDL API I’m now getting used
to would be really good, I hope your code makes it
into SDL in some way, shape or form.
Paul__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more