Force Feedback for Linux (svn 831)

Linux geeks and Mac OS hipsters unite! A board for discussion of Supermodel on non-Windows platforms.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Force Feedback for Linux (svn 831)

Postby Spindizzi » Wed Oct 21, 2020 1:40 am

Information for FFB on linux
I personnaly only checked this feature on Ubuntu 18.04 lts and 20.04 lts

your ffb device must be correctly installed
I personnaly use modified ffb driver for logitech device (wheel)
because original built-in core driver only supports constant force

you can found these drivers at
https://github.com/berarma/new-lg4ff
to install, follow instructions from author

I use fftest software to check forces effects
if not already installed,
Code: Select all
sudo apt install joystick

if I remember correctly...

Code: Select all
sudo fftest /dev/input/event5

to test every force effects on your device

of course, if you don't have any forces effects working at the stage, you can't have force effects in Supermodel

I also use oversteer program to set wheel rotation angle for device
you can found it at the same author driver web site
https://github.com/berarma/oversteer

tested only with my own ffb devices : g27 wheel, xbox360 pad, some microsoft joysticks and a saitek evo force
note : it is needed to make some code changes for this last one. look inside code.

no needs to use the switch on linux system since it's the default option
Code: Select all
-input-system=sdl


just add commandline option
Code: Select all
-force-feedback

or define in supermodel.ini file
Code: Select all
ForceFeedback=1


I don't own any apple machines, I can't check if this works on it

note : it is also possible to use sdl2 ffb on Windows machines instead of direct input ffb
Code: Select all
-input-system=sdl -force-feedback



edit

I forgot to say, you can adjust the strength of each effects in supermodel.ini file like you do it for dinput or xinput
SDLConstForceMax = 100
SDLSelfCenterMax = 100
SDLFrictionMax = 100
SDLVibrateMax = 100

note about saitek evo force joystick
I only check this device on windows because there is no driver available in Linux. The trouble for this device is only windows related.
Last edited by Spindizzi on Thu Oct 22, 2020 12:12 am, edited 1 time in total.
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Force Feedback for Linux (svn 831)

Postby zuppa_di_pesce » Wed Oct 21, 2020 12:27 pm

THANK YOU SPINDIZZI!!!!!! 8-) ;) :D

DualShock 3 [CECH-ZC2E] is working out-of-the-box via bluetooth on ArchLinux!
Code: Select all
$ uname -sro
Linux 5.9.1-arch1-1 GNU/Linux

Code: Select all
$ evjstest
Device File: /dev/input/event12 (/dev/input/js0)
Device Name: PLAYSTATION(R)3 Controller
Device ID:   bus:0005 vendor:054c product:0268
"Did you surfcast that fish?" - "Kinda... But... That wasn't a fish... It was a GNU!"
User avatar
zuppa_di_pesce
 
Posts: 120
Joined: Fri Jun 12, 2020 1:51 pm
Location: surfCASTING on a beach

Re: Force Feedback for Linux (svn 831)

Postby zuppa_di_pesce » Wed Oct 21, 2020 12:31 pm

Spindizzi wrote:I use fftest software to check forces effects
if not already installed,
Code: Select all
sudo apt install joystick

if I remember correctly...

Code: Select all
sudo fftest /dev/input/event5

to test every force effects on your device

I suggest you also:evjs - Evdev Joystick Utilities
"Did you surfcast that fish?" - "Kinda... But... That wasn't a fish... It was a GNU!"
User avatar
zuppa_di_pesce
 
Posts: 120
Joined: Fri Jun 12, 2020 1:51 pm
Location: surfCASTING on a beach

Re: Force Feedback for Linux (svn 831)

Postby TheOldDragon » Sat Oct 24, 2020 9:03 pm

Spindizzi wrote:Information for FFB on linux
I personnaly only checked this feature on Ubuntu 18.04 lts and 20.04 lts

your ffb device must be correctly installed

This is great news.

Just tried it with a wired PDP Xbox One controller on Ubuntu 20.10 [with a 5.9.1 kernel], and it's working great with SVN 832 and "scudplus" and "daytona2" [using the -force-feedback cli arguement].
Code: Select all
$ evjstest
Device File: /dev/input/event5 (/dev/input/js1)
Device Name: Generic X-Box pad
Device ID:   bus:0003 vendor:0e6f product:02a0


Spindizzi wrote:I personnaly use modified ffb driver for logitech device (wheel)
because original built-in core driver only supports constant force

you can found these drivers at
https://github.com/berarma/new-lg4ff
to install, follow instructions from author

This is even better news... :-)

I'll try it with my Logitech G29 tomorrow and see if I can get the wheel - and force feedback - working with Supermodel.
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Force Feedback for Linux (svn 831)

Postby TheOldDragon » Fri Nov 20, 2020 2:44 pm

Here are my impressions of FFB with certain games. Same settings for all (see below):

Scud Race - fantastic
Emergency Call Ambulance - decent
Sega Rally 2 - OK
Daytona 2 and Daytona PE - doesn't work properly at all....

Daytona 2:
- it's really strange.. it feels like you're almost locked to the straight-ahead, and have to "break free" to get past that.. and once you do, there's basically no feedback once off of centre. I tried multiple settings in oversteer, but can't get anything to work properly...

Setup:

System:
ASRock B550 w/ Ryzen 5 3600
Ubuntu 20.10 [5.8.29]

Wheel:
Logitech Driving Force G29

Driver:
New-newlg4ff [v0.3.1]

Oversteer [0.5.0]:
Controls:
Compatibility: G29
Rotation range: 270 deg
Force Feedback:
FFB Gain: 100
Autocenter strength: 30
Spring force: 40
Damper force: 30
Friction force: 30

Supermodel [SVN r832]:
Config file settings:
InputJoy1XDeadZone = 1
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Force Feedback for Linux (svn 831)

Postby Spindizzi » Mon Nov 30, 2020 7:30 am

Hi, I was really busy these months, sorry for late reply

can you try to edit
Src\OSD\SDL\SDLInputSystem.cpp

line 514-516
Code: Select all
if (ffCmd.force == 0.0f)
        StopConstanteforce(joyNum);
      else if (ffCmd.force > 0.0f)
        ConstantForceEffect(ffCmd.force * (float)(sdlConstForceMax / 100.0f), -1, 100, joyNum);
      else if (ffCmd.force < 0.0f)
        ConstantForceEffect(-ffCmd.force * (float)(sdlConstForceMax / 100.0f), 1, 100, joyNum);
      break;

to
Code: Select all
if (ffCmd.force == 0.0f)
        StopConstanteforce(joyNum);
      else if (ffCmd.force > 0.0f)
        ConstantForceEffect(ffCmd.force * (float)(sdlConstForceMax / 100.0f), -1, SDL_HAPTIC_INFINITY, joyNum);
      else if (ffCmd.force < 0.0f)
        ConstantForceEffect(-ffCmd.force * (float)(sdlConstForceMax / 100.0f), 1, SDL_HAPTIC_INFINITY, joyNum);
      break;


this will change the duration of the constant force effect (100ms to infinity)

can you check other games with this change ?

let me know if I must commit or not

note: instead of change in oversteer config, you can directly change the amount of effect force in supermodel.ini file
Code: Select all
SDLConstForceMax = 100
SDLSelfCenterMax = 100
SDLFrictionMax = 100
SDLVibrateMax = 100

in general (for all game) or in specific game section
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Force Feedback for Linux (svn 831)

Postby TheOldDragon » Mon Nov 30, 2020 12:59 pm

Spindizzi wrote:Hi, I was really busy these months, sorry for late reply

can you try to edit
Src\OSD\SDL\SDLInputSystem.cpp
.....

Thanks for the reply.

I made the code update [uisng svn 833 as basis], and yes, it fixes Daytona 2 [normal & PE]; it's much better now. Fantastic! :D

I ran Scud Race and Sega Rally 2 with the changes and they seem unaffected... so still good...

Thanks again!
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Force Feedback for Linux (svn 831)

Postby new_holmes » Tue Mar 30, 2021 2:08 am

On kubuntu 20.10 :
Wheel : MS Sidewinder FFB USB

To identify the event associated to the wheel:

cat /proc/bus/input/devices

In my case this returns event6 for the Wheel.

Then you can do the test:
sudo fftest /dev/input/event6

Works perfectly in supermodel (tested with Daytona2 and ScudRace)
new_holmes
 
Posts: 13
Joined: Fri Jul 24, 2020 12:59 am

Re: Force Feedback for Linux (svn 831)

Postby belegdol » Sun Dec 19, 2021 5:48 am

I tested this with my Xbox One gamepad via the dongle, using xone experimental driver [1] on Fedora 35. With Daytona 2 Power Edition the pad rumbles. With Star Wars Trilogy, however, there is nothing. Is it supposed to, or is swtrilgy using real force feedback as in adjusting the resistance of the stick?

[1] https://github.com/medusalix/xone/commits/experimental
belegdol
 
Posts: 9
Joined: Mon Nov 05, 2018 10:28 am

Re: Force Feedback for Linux (svn 831)

Postby spazmoid » Mon Aug 21, 2023 3:12 pm

Is there anyway of getting this to work on Mac OS?
spazmoid
 
Posts: 4
Joined: Sat Aug 12, 2023 3:30 pm


Return to Alternative Fashion

Who is online

Users browsing this forum: No registered users and 1 guest