Force feedback joystick actuator patch - alpha

Hi All,

I mentioned in a few other threads that I have been working on force
feedback joystick actuator support. This is now ready for alpha release
(I’m just adding some configure.in). If anyone has a PS2Linux kit
beta/1.0 release please could you try out this patch please? (please
email me and I will send you the patch and extra files you need)

This actuator support patch was really interesting to develop. It is
all in keeping with the platform independent SDL style and works well
with the test programs. (I have created a new program testactuator.c too).

The actuator support was possible because I used the PS2Linux kernel
module ps2dev.o. Other architectures joysticks will not be affected by
this other than the dummy functions. (Hopefully other architectures will
have actuator support at some point.)

So, to summarise, please email me if you want this alpha patch. I
expect the final releas will follow in under one week or so.

Cheers

JG

If anyone has time to test this code on PS2Linux and other platforms
this would be appreciated. I don’t think I have missed anything.

I might check out doing an win32 force feedback module too, has anyone
used force feedback from win32 before here? Does DX8 include the
functions or do you have to link with development code from the
manufacturers?

Logitech iFeel mice also have an actuator, only supported under win32 I
believe, this would be great to support in SDL too. Black & White used
this functionality effectively.

Cheers

JG

Hi All,

OK, I’ve got it all working perfectly now. It has been tested on
PS2Linux and my pc a little too. (patch is attached)

Included in this patch:
2003-03-07

  • Force feedback actuator API for SDL:
    SDL_JoystickNumActuators();
    SDL_JoystickSetActuator();
    SDL_JoystickGetActuatorType();
    SDL_JoystickGetActuatorRange();

  • PS2Linux native joystick module - supporting plain digital, Analog
    and DualShock 1/2 controllers.

  • PS2Linux implementation of force feedback API.

  • Other joystick modules patched with dummy functions to work with the
    new API.

  • testactuator.c created to test the actuator API and the PS2Linux
    implementation.

  • testjoysticktext.c created to test the joystick in text mode.

  • testjoystick.c modifed to return info about the actuators on the device.

  • testjoystick.c added extra argv[2] to select the analog stick other
    than 0.

  • testjoystick.c modified to avoid analog stick display going off the
    edge of screen (overscan issue).

  • added startup printf usage help to testjoystick, and aditional
    programs by myself.

  • configure.in and PS2Linux makefile.am patched to support the new
    features.

  • added extra generated filenames to .cvsignore (so that “diff -X
    SDL12/.cvsignore” provides clean output).

  • renamed several “Playstation 2” comments to "PS2Linux in
    configure.in (for clarity, because I have been doing some native PS2).

It has been great fun implementing all of this. Now it would be great
if more platforms were supported by this API addition. If someone else
with a force feedback joystick can code up another platform module this
would be great.

I am on ICQ 11122941 if anyone uses ICQ at all.

Cheers

JG

-------------- next part --------------
A non-text attachment was scrubbed…
Name: ps2linux-actuators-09.patch.gz
Type: application/gzip
Size: 14998 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030307/014028cd/attachment-0007.bin

Another quick message before I sleep :slight_smile:

There are many different types of force feedback actuators in devices.
This alpha patch addresses the ones I have (PS2 Dualshock 1/2 style).
I’m also working on the follow up to this alpha patch which will be more
encompassing.

Cheers

JG