Trackball with sc-controller

Need help? Ask here and someone will help
Post Reply
jibbity
Posts: 3
Joined: Mon Dec 30, 2019 12:45 pm

Trackball with sc-controller

Post by jibbity » Mon Dec 30, 2019 3:16 pm

Hello,

I'm using my Steam controller with sc-controller to emulate a gamepad for GIMX. I've got it connected to my PS3 via bluetooth. It's all working very well except for sc-controller's trackball. Normal mouse movement with the right pad works great, it's only when I swipe and release to activate the trackball that the input starts to stutter.

I think I've exhausted all configuration options and I can't get the trackball to behave well with GIMX. I believe the issue is that GIMX's refresh rate is too fast to play well with the emulated output of sc-controller when the trackball is activated.

When running GIMX with the `--curses` option I can see that when the trackball is activated the crosshair will blink between the direction I moved and dead centre. It should smoothly go towards the direction I swiped and back to the center. Hopefully this output when running with `--status` will help to illustrate:

Code: Select all

0 1577716761.752663, rstick x (12), rstick y (-12)
0 1577716761.763918, rstick x (19), rstick y (-8)
0 1577716761.775203, rstick x (35)
0 1577716761.786429, rstick x (40), rstick y (-4)
0 1577716761.797684, rstick x (51), rstick y (-3)
0 1577716761.808939, rstick x (70), rstick y (-5)
0 1577716761.820175, rstick x (125), rstick y (-16)
0 1577716761.831437, rstick x (156), rstick y (-26)
0 1577716761.842677, rstick x (184), rstick y (-32)
0 1577716761.853948, rstick x (213), rstick y (-41)
0 1577716761.865171, rstick x (276), rstick y (-58)
0 1577716761.876430, rstick x (290), rstick y (-61)
0 1577716761.887675
0 1577716761.898957, rstick x (321), rstick y (-68)
0 1577716761.910171
0 1577716761.921448, rstick x (350), rstick y (-74)
0 1577716761.932670
0 1577716761.943947, rstick x (376), rstick y (-79)
0 1577716761.955126
0 1577716761.966440, rstick x (400), rstick y (-84)
0 1577716761.977596, rstick x (422), rstick y (-89)
0 1577716761.988950
0 1577716762.000202, rstick x (443), rstick y (-93)
0 1577716762.011442
0 1577716762.022694, rstick x (462), rstick y (-97)
0 1577716762.033903
0 1577716762.045189, rstick x (479), rstick y (-101)
0 1577716762.056432
0 1577716762.078944, rstick x (495), rstick y (-104)
0 1577716762.090192, rstick x (509), rstick y (-105)
0 1577716762.101416
0 1577716762.112703, rstick x (518), rstick y (-111)
0 1577716762.124036
0 1577716762.135170, rstick x (526), rstick y (-113)
0 1577716762.146445, rstick x (531), rstick y (-115)
0 1577716762.157664
0 1577716762.168940, rstick x (503), rstick y (-109)
0 1577716762.180167
0 1577716762.191419, rstick x (478), rstick y (-103)
0 1577716762.202662
0 1577716762.213918, rstick x (431), rstick y (-90)
0 1577716762.225203
0 1577716762.236441, rstick x (413), rstick y (-86)
0 1577716762.247666
0 1577716762.258943, rstick x (395), rstick y (-82)
0 1577716762.270160
0 1577716762.281440, rstick x (376), rstick y (-78)
0 1577716762.292633, rstick x (381), rstick y (-79)
0 1577716762.303884
0 1577716762.315207, rstick x (337), rstick y (-70)
0 1577716762.326440
0 1577716762.337687, rstick x (316), rstick y (-66)
0 1577716762.348927
0 1577716762.371412, rstick x (295), rstick y (-61)
0 1577716762.382662, rstick x (273), rstick y (-57)
0 1577716762.393955
This is one full swipe of the pad followed by the activation of the trackball when my thumb leaves contact with the pad. As you can hopefully see, it starts out with consistent movement when my thumb is touching the pad, but after release the trackball activates and the stuttering begins.

Interestingly, running GIMX in test mode and forcing the refresh period to 30.00ms seems to fix the stuttering. The problem with this is that the `--refresh` option doesn't seem to work when GIMX is actually connected to my PS3. The curses interface reports approximately 33Hz in test mode with `--refresh 30.00`, but when connected to the console it's more like 88Hz and that's when I get stuttering.

Is there anyone who can help me running GIMX with sc-controller? I'd like to use the configuration options available in sc-controller, specifically the trackball mouse. Is there a way to have GIMX run consistently at a specific refresh period when connected to a console?

Thanks

User avatar
Matlo
Posts: 5537
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Trackball with sc-controller

Post by Matlo » Mon Dec 30, 2019 5:07 pm

Hello,

The --refresh option does not work when using the bluetooth connection method with a PS3. Update period is synced on PS3 output period.

Try using mouse smoothing, maybe it will help.
GIMX creator Donate Shop

jibbity
Posts: 3
Joined: Mon Dec 30, 2019 12:45 pm

Re: Trackball with sc-controller

Post by jibbity » Mon Dec 30, 2019 5:41 pm

I'm afraid mouse smoothing has no significant effect. With buffer 30 and filter 1 there's still a lot of stuttering.

Is it possible to change the refresh period GIMX uses to capture input while still maintaining the constant that the DS3 requires? I was testing things out on Demon's Souls and when I forced the refresh period to 30ms the trackball seemed to work fine for a second or two after startup then would go back to stuttering. Checking the --curses interface tells me that the refresh rate increased from ~33Hz to ~88Hz in the first few seconds after it connects.

Or is there any other way around this? Trackball mode is such a useful feature.

jibbity
Posts: 3
Joined: Mon Dec 30, 2019 12:45 pm

Re: Trackball with sc-controller

Post by jibbity » Tue Dec 31, 2019 4:01 pm

I believe I have solved this issue. I'll post my solution for posterity.

Instead of using sc-controller I'm using Steam itself to emulate the gamepad. The way I've done it is by setting the controller's desktop configuration to what I want it to be and then launching GIMX. It's a bit annoying doing it this way as the interface to set up the desktop configuration wont allow you to bind to typical controller buttons/axes. To get around this, I set up the configuration in Big Picture mode for a different game, saved the config as a template and then applied this template to the desktop config. Alternatively, I suppose you could add GIMX as a non-Steam title, create your config for it and then launch GIMX through Steam, although I have not tested this.

To get GIMX to play nice with Steam's emulation I had to disable support for the Steam controller in GIMX itself. To do this I had to build GIMX manually after deleting `shared/gimxinput/src/hid/steamcontroller.c` from the source files. It's still necessary to create a config for GIMX with gimx-config. It will recognise input from the Steam controller as "Microsoft X-Box 360 pad".

Took a bit of fiddling, but I'm now enjoying a smooth trackball mode and all of Steam's advanced configuration options on my PS3 :D

Post Reply