Jump to content

U J R - Universal Joystick Remapper - Any Stick With Mwo Via Virtual Joysticks


117 replies to this topic

#41 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 02 March 2013 - 10:38 AM

Hmm, I just remembered. There is another virtual joystick app, also called vjoy, that does have signed drivers.
This one does not work with AutoHotkey, but it does have libraries for C++ etc.
I was thinking of moving UJR to C++ or something like that, so if that comes to fruition, I am sure that I could make it work with the other vjoy, so giving a version which does not require test mode.
This is not likely to be in the near future though. 6 months at least probably. Unless there is someone else out there with C experience who can guide me through the C/C++/C#/WPF/Forms minefield that currently lays before me.

#42 CyBerkut

    Member

  • PipPipPipPipPipPipPip
  • 609 posts
  • LocationSomewhere north of St. Petersburg

Posted 03 March 2013 - 03:05 PM

I see that alternate VJoy handles up to 4 POVs. :)

#43 Attackmack

    Member

  • PipPip
  • Knight Errant
  • 39 posts

Posted 04 March 2013 - 02:19 AM

Getting at least 1 POV working would be the dream.
Getting there without needing testmode is of course a bonus, but then again im not bothered a whole lot about it saying "testmode" at the bottom of the screen.

Just adding again, evilC you are doing one helluva job here, impressive to say the least!

#44 Loc Nar

    Member

  • PipPipPipPipPipPipPipPip
  • 1,132 posts

Posted 04 March 2013 - 01:28 PM

So much win in the latest Creative Content post...



Quote

New User Controls and Joystick Improvements

Players will now have more options with regards to how they pilot their BattleMechs. Several new control systems and improvement have been added including Throttle Decay (gas pedal vs set throttle), Arm Lock to torso, Set Point Throttle (10-100% throttle values in 10% increments), Face Torso, and Joystick Analog turning. Player will also be able to customize their key bindings via the Pause Menu during matches.


#45 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 04 March 2013 - 02:47 PM

well I didn't expect it that quick.

#46 CyBerkut

    Member

  • PipPipPipPipPipPipPip
  • 609 posts
  • LocationSomewhere north of St. Petersburg

Posted 05 March 2013 - 03:08 PM

The controls changes aren't here yet. Carry on. ;)

#47 ego1607

    Member

  • PipPipPipPipPip
  • 133 posts
  • LocationZagreb, Croatia

Posted 08 March 2013 - 04:22 AM

Should this work on win8? I've intstalled it acording to instructions, but when I try to map it in MWO, it does not detect my virtual joystick. I tick manual control and move the sliders but the game just waits fr input.

#48 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 08 March 2013 - 08:25 AM

View Postego1607, on 08 March 2013 - 04:22 AM, said:

Should this work on win8? I've intstalled it acording to instructions, but when I try to map it in MWO, it does not detect my virtual joystick. I tick manual control and move the sliders but the game just waits fr input.

Not had anyone report whether win8 works yet or not.
Does UJR correctly operate the virtual stick?
You can test this by opening game controllers and previewing the status of the virtual joystick. Can you get it to move around?

If that works, I see no reason why the game should not recognise it.

#49 Lynx7725

    Member

  • PipPipPipPipPipPipPipPip
  • 1,710 posts

Posted 08 March 2013 - 08:34 AM

Where to begin? Well, first, to thank evilC for this very nice software/ middleware.

I'm writing to document my experience with setting up UJR for Windows 8 to work for the xBox 360 Controller. Out of box, the controller works, but has an inverted axis (Y-axis) which also bounces, and has a Z-axis also mapped to LMB, leading to all sorts of entertainment. There is also issues with the rate of rotation for the upper torso, but that's not strictly solvable right now to my limited understanding.

So to start off:

1. Yes, UJR/ vJoy/ AHK does work in Windows 8. But there are some tricks. The problem is mainly vJoy due to the unsigned drivers. But -- read this:

http://vjoystick.sou...indows-8-64bits

The tricky part is this -- the disabling of the check for signed drivers do work, there is a significantly different UI when doing the installation. The installation would report failure. But you have to check the log file indicated, if it reports a success, vJoy would work anyway.

Of course, I am saying this without having rebooted my system after the install, so if I reboot and my vJoy suddenly become v-no-Joy, I'd be eating my hat. Lucky I don't wear one.

AHK and UJR installs with no problem.

2. Then it gets to configuration. Before we even get to vJoy, we need to settle the Windows devices. What I see is my xBox controller, and a "vJoy_raw_device_00", which would show up as a Game Controller. If you go into the various properties, you eventually can find a menu to decide which is the default controller. Changing that to vJoy would (AFAIK) change vJoy to UJR's Physical Stick 1.

It's a good idea to always read UJR instruction to detect the joystick anyway, but if you, like me, decided to change this in the middle of a Testing Ground session, you can at least explain why your buttons and axis suddenly decided to not work (because the associated physical stick has been renumbered by Windows).

3. vJoy configuration, you have to match to your joystick. For the xBox Controller, you would need the following:
  • X, Y and Z axis (Z axis unused -- explanation later)
  • R/ Rz/ Rudder
  • Rx and Ry axis
  • 4 direction PoV (not supported but what the heck.)
  • 10 buttons
  • Target Device 1 (may change)
4. Once you have this set up, then it becomes a matter of programming UJR. At this point, I'm going into very specific xBox Controller mapping, but the logic is similar for other sticks.
  • First, figure out which physical stick you are using.
  • On the Xbox Controller:
  • Axis 1 is the upper left thumb stick's X-axis.
  • Axis 2 is the upper left thumb stick's Y-axis. You need to invert this as the default have you pulling back to go forward. Suggested value is 25% deadzone and 90% sensitivity, though I doubt the sensitivity do squat.
  • Axis 3 is the two big triggers underneath. Yes that's an axis. It's not very useful because the right trigger is also somehow tied to respond with a LMB equivalent.
  • Axis 4 and 5 is the lower left thumb stick's X and Y axis.
  • Buttons 1 through 10 can be found via experimentation. 9 and 10 are the thumb stick clicks, so don't forget them.
  • PoV Hat doesn't work, but don't worry about it. I'll get to that.
One note -- I explicitly mapped my Z-axis, Axis 3, to Z-rotation, not Z-axis. This is for a variety of reasons but none that worked out for MWO.

5. At this point you have a vJoy that mostly works. So time to configure the MWO joysticks.

MWO defaults assume two joysticks, joy0 and joy1. Because of the way UJR is programmed, you will have two joysticks. The vJoy, which I set to joy0, and joy1, which in this case is the actual xBox Controller -- MWO still detects the physical hardware. Two things implied:

A. You can use the PoV Hat on the Xbox because that UJR doesn't block it and MWO detects it as joy1 POV hat.

B. Occasionally the physical joystick is detected even if you are using the vJoy. Double check that all the controls are using joy0 and not joy1 (or whatever you have).



Because of the weird *** way Microsoft or MWO decided to interpret the xBox right trigger signal, the Z-axis triggers are fairly useless. Except that it's still a LMB signal, so you might as well map the Z-rotation on joy0 to "Fire current selected weapons group".

I have the following setup right now:
  • X-axis to turning
  • Y-axis to throttle
  • Button 9 (Upper left thumb stick click) to reversing throttle
  • X-rotation to twist
  • Y-rotation to pitch
  • Z-rotation to shoot current selected group
  • Button 10 (lower right thumb stick click) to opening weapons door
The rest of the buttons is up to you to assign. I have A on Group 2, B Group 3, Y Group 4, X jump jets IIRC. Left should to zoom, Right on target select. The fallthrough POV buttons to therma, Advance zoom, etc. This is up to you really.

6. Then finally, a lot of fine-tuning. What I ended up with:
  • X-axis to turning; 50% sensitivity (which may not matter).
  • Y-axis to throttle; inverted; 25% deadzone, 90% sensitivity.
  • X-rotation to twist; 10% deadzone, 100% sensitivity.
  • Y-rotation to pitch; 10% deadzone, 100% sensitivity.
Sensitivity may not matter. MWO right now is digital turning, so it turns at a constant rate as long as you are holding down the right button; it's the polling rate that is more important than the sensitivity. Mouse will out turn/ twist a joystick in MWO any day right now.

Deadzone is very important for the xBox Controller. In particular, the throttle is exceptionally sensitive to "bounce", so the throttle keeps going all over the place without a deadzone. Even with a deadzone, it still is a bit problematic, but workable.

Pitch and Yaw needs a bit of deadzone, otherwise your crosshair will bounce all over the place. Experiment to see what works for you.

7. Feedback on UJR under Windows 8: panel is now squished. Can still work, but not resizable so a bit harder to work with.

Going for a restart to see if I encounter any issues after a reboot. Will update if there is issues.

#50 ego1607

    Member

  • PipPipPipPipPip
  • 133 posts
  • LocationZagreb, Croatia

Posted 08 March 2013 - 09:19 AM

Ok, I got it working (sort of). It shows only 5 buttons, and it registers only button 1 (i've set vjoy configuration to 32 buttons but it does not help).

is there a way to set y axis to be set to 0 and not 50% in neutral position, so I can use it as a throttle?

#51 Lynx7725

    Member

  • PipPipPipPipPipPipPipPip
  • 1,710 posts

Posted 08 March 2013 - 09:52 AM

I got to eat my hat.

Turns out, Windows 7 and Windows 8 both tightened out on malicious drivers quite a bit. So in this case vJoy got caught in the crossfire.

The method used above just disables the check once, for you to install. At the next reboot, the check will apply again and any installed drivers will be disabled.

So, yeah. Test Mode. https://freevps.us/thread-6845.html

Specifically:

Quote

Method 2 (permanently):
    1. Open the Windows command promt as "Run as Administrator".
    2. Run "bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS" (without the "").
    3. To finalize the process run "bcdedit -set TESTSIGNING ON" (without the "").
    4. Reboot and you're done.
To disable it do step 1 and run these commands on step 2 and 3:

2. "bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS" (without the "")
3. "bcdedit -set TESTSIGNING OFF" (without the "")

Then do step 4 and you're done.


Don't do it if you have a tendency to install things from everywhere. I don't, so safer. You do the above at your own risk!

And to address something I missed out.

Is the performance worth it? In a word, no. With digital turns and throttling, you simply get more responsiveness from a mouse and keyboard. Turns and twists are slow with a controller/ joystick. The hope is that the upcoming analog turns etc. will do justice to this.

Edited by Lynx7725, 08 March 2013 - 09:54 AM.


#52 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 08 March 2013 - 01:42 PM

View Postego1607, on 08 March 2013 - 09:19 AM, said:

is there a way to set y axis to be set to 0 and not 50% in neutral position, so I can use it as a throttle?

This is a game setting, not a UJR one
in your user.cfg, The line

cl_joystick_throttle_range = 0

alters the behaviour of the throttle so that neutral is stop, up is forwards and down is reverse.
By default, down is stop, up is full forwards and there is a button to go into "reverse" mode.

#53 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 08 March 2013 - 01:46 PM

And as you say Lynx, it just isn't worth it for now.

I wouldn't mind using a throttle and mouse, but without analogue turning, it is pretty pointless.

Despite writing UJR, I do not use joystick in MWO for now - I wrote UJR for the people who cannot or will not use mouse, to give them at least some chance to play the game; I was not expecting controls to be fixed so soon.

#54 Lynx7725

    Member

  • PipPipPipPipPipPipPipPip
  • 1,710 posts

Posted 08 March 2013 - 08:59 PM

As it turns out, someone bumped this thread, and things changed a bit...

The settings provided by PGI were rough, but made things a lot better. Still not s good as mouse and keyboard but much much closer. You'll need to inverse some inversed axis, but otherwise throttle control is infinitely better (though ends up being gas pedal), and torso twists and pitch are markedly better, but not great.

I'm still running feeds through UJR because at the moment you can tune things on the fly. You need to ballpark the user.cfg numbers in first, then use UJR to fine tune.

#55 Hammerhai

    Member

  • PipPipPipPipPipPipPip
  • Bad Company
  • Bad Company
  • 999 posts

Posted 12 March 2013 - 01:11 PM

I would have a use for UJR despite all this. The idea is this:
HOTAS Warthog as one Joystick.
Saitek Combat Rudder pedals mapped to UJR.
Now in order to tweak the rudder control it should theoretically be possible to adjust its' axis sensitivity curve, should the need arise.
So I would stick the rudder on UJR and tweak its' response that way, as the Mad Catz software (Thrustmaster do not integrate a rudder into their setup) is ineffectual to say the least.
What do you think? Might I also say for that reason alone UJR may have a greater longevity than you think. So see what you can do about development.
And thank you for the effort so far

#56 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 13 March 2013 - 06:35 AM

Yes, this is an intended use for UJR.
I would imagine that you could map the warthog to UJR, and use both TARGET and UJR in tandem - if TARGET passes an axis or button through to windows, you could tweak it via UJR or leave it alone, and if you remap a button to a key in TARGET, then UJR would not "see" that button.
I have a prototype of UJR working in C#, I just need to work out how to get a C# "WPF" application to keep processing input even when it is not the active window. Once I have that sorted, I see no real barriers to a more fully-fledged version of UJR.

#57 Hammerhai

    Member

  • PipPipPipPipPipPipPip
  • Bad Company
  • Bad Company
  • 999 posts

Posted 14 March 2013 - 05:48 AM

I don't think even Deon of PPJOY fame got that one properly sorted. As I remember the window needed to be open, but not active. That is as far as it got.

All the same this is a great tool. It could also stand promotion on SimHQ.com and similar forums.

#58 Lynx7725

    Member

  • PipPipPipPipPipPipPipPip
  • 1,710 posts

Posted 19 March 2013 - 02:56 PM

So after the analog joystick support patch? Still feels sluggish, not able to match a mouse (in my case trackball) performance. Also seems like they flipped the pitch axis, and tweaked some sensitivity (or maybe that's the analog thing). Overall workable but will get you killed in games.

#59 Ikester

    Member

  • PipPipPip
  • FP Veteran - Beta 1
  • FP Veteran - Beta 1
  • 91 posts
  • LocationBoise, Idaho

Posted 19 March 2013 - 03:17 PM

Turning seems to work properly. By that I mean, a slight movement to the left causes a slight turn, the more you move the stick to the left or right the faster the turn. Throttle is working well. Torso twist and pitch are not; there is very little difference if any, in a slight movement or a full movement of the stick it simply will cause extreme movement in the reticule. I'm using the Thrustmaster HOTAS. Getting closer.

#60 von Pilsner

    Member

  • PipPipPipPipPipPipPipPip
  • 1,043 posts
  • LocationColorado

Posted 11 April 2013 - 01:12 PM

View PostIkester, on 19 March 2013 - 03:17 PM, said:

Turning seems to work properly. By that I mean, a slight movement to the left causes a slight turn, the more you move the stick to the left or right the faster the turn. Throttle is working well. Torso twist and pitch are not; there is very little difference if any, in a slight movement or a full movement of the stick it simply will cause extreme movement in the reticule. I'm using the Thrustmaster HOTAS. Getting closer.


In my setup I had to change the joystick curve from a linear one:
Posted Image

To a nice gentle curve...
Posted Image

Perhaps EvilC could make a linear/Log checkbox for the axis (would require a recalibration if checked/unchecked).

Assuming that controller.AimingX and controller.AimingY is a value from 0-255
and axisx and axisy are what the program outputs/uses

Here is the code snippet that worked for me...

   xaxis = (127-controller.AimingX);
   xaxis = ((-1*xaxis)*xaxis);
   if (controller.AimingX >= 128)
   {
	xaxis = xaxis*(-1);
   }
 
   yaxis = (127-controller.AimingY);
   yaxis = ((-1*yaxis)*yaxis);
   if (controller.AimingY >= 128)
   {
	yaxis = yaxis*(-1);
   }


Just a simple adjustment of the axis value to x^2 gives much more control in the middle of the stick and still allows full speed movement when the stick is near its maximum range. The downside is that since I do not scale the values back down a recalibration is required.

Edited by von Pilsner, 11 April 2013 - 01:20 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users