Jump to content

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


117 replies to this topic

#1 evilC

    Member

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

Posted 17 January 2013 - 05:48 PM

What is it?
A program to combine axes and buttons from up to 8 joysticks into one 8 axis, 8 button virtual joystick.
It is not an MWO app, it will work with any game, but it may evolve MWO specific features.
If the joystick you wish to use appears in Windows' game controller list, it will work with UJR.

Why would I want it?
  • Your joystick is not recognised by the game
  • Your joystick is recognised, but an axis is the wrong way around and you cannot fix it.
  • You have deadzone issues - mech always turning etc.
  • You have a throttle, but want stop to not be in the middle of the axis, but a third from the bottom. (Planned feature)
  • You want to use two devices for a game (eg a pedals and a stick/throttle) for a game but it only supports one joystick at a time.
  • You want a specific feature, but lack the knowledge to write such a thing yourself. The code is pretty easy to understand and you just need a text editor.
Features
  • 8 Axis, 32 Button virtual joystick
  • Controlled by up to 8 physical joysticks
  • Invert any axis
  • Set a DeadZone for any axis
  • Adjust sensitivity for any axis
  • Settings saved between uses
  • "Manual Control" mode to control the virtual joystick via the UJR GUI




    Use this when the game detects the underlying physical stick instead of the virtual one - enable "Manual Control", tab into the game, double click the bind button, tab out, manipulate the desired input with the GUI, tab back into the game and it should recognise the change in the state of the virtual stick and bind it.
How does it work?
  • Uses the free open source app vJoystick to create a virtual joystick
  • UJR is written in AutoHotkey, an open source macro app - it sends instructions to vJoy
  • Configure UJR to tell it which physical joystick axis/button controls which axis/button of the virtual joystick - each axis and button of the virtual stick can be mapped to a different physical joystick
Can I modify and freely distribute it?



Yes, if you add a cool new feature, or know a better way of writing a bit of the code, please let me know!

Cool! Where can I get it?
Warning: Win7 x64 supported but you need to enter Test Mode (Enable unsigned drivers)

http://evilc.com/fil...hk/vjoy/ujr.zip

See the Readme.txt file in the zip for full instructions.

Posted Image


===================================== 8< =====================================
Changelog


Key:
! : Warning
* : Comment
= : Change / Fix
+ : Added feature

5.0 20th Nov 2013
* Rewrite using my ADHD library.
! Now intended to be used when compiled to an EXE - You no longer need AutoHotkey installed.
! Old profile files are NOT COMPATIBLE.
However, it is just the groups etc in the INI that will not work right.
If you create a new profile, exit UJR and paste in the contents of the old profile, it may well work.
= Manual Control is gone, replaced by QuickBind
= Profile support improved
= Less tabs
= Improved hat switch support (QuickBind supports hats, whereas Manual Control did not)
= Detect Axis gone for now, it will probably return

4.3
+ Basic support for Hat (POV) switches in.
Only "Continuous" hats supported for now.
Hats have no "Manual Control" mode for now

4.2
= Duplicate in profiles was always duplicating the Default profile, no matter what you had selected - fixed.
+ Added Delete Profile button

4.1
+ Duplicate profile added.

4.0
+ Profile support added.
INI file format changed, there are now two INI files - one for misc settings, one for profiles
Existing mappings are kept and moved to the default profile
Manual profile switching only for now...

3.2
+ The first physical POV Hat can now be mapped to virtual buttons. AHK only supports reading one POV :(

3.1
+ Sensitivity option for each axis.

3.0
! Please note that the format of the config file has changed, the program will back your old one up
= Fixed bug stopping button mappings not saving
= Improved UI layout, labels etc
= Major cleanup of code - now much more understandable
+ GUI position now saved in config file - when you close the app, next time you reopen it, it will be in the same place on your desktop
+ Only settings changed from their default setting are stored in the config file
+ Detect axis button! Use this to try and find out the stick ID of a physical stick.
Instructions now simplified
+ Experimental - Merging of axes
eg Merge two pedal axes into a rudder axis


2.3
+ Much improved deadzone code
So with a 50% deadzone, if you move to 50 on an axis, it will be dead, but moving to 51 now outputs 1 rather than 51
+ Deadzone is now a text input field, so you can use any value you like
+ Input / Output slider renamed to "State"
+ Input and Output values for axes now displayed
+ Much more commented code

2.2
+ Added per-axis deadzone settings. Just 5,10,20,30,40,50,60,70 or 80 percent at the moment but I intend to allow any figure in a future version


2.1
= Fixed bug stopping UJR from working on 64-bit AHK installs.
= Fixed bug stopping mapping of virtual axis 4 or greater
+ 32 Buttons listed for physical joystick

2.0
+ Now uses Axlar's vJoy library (http://www.autohotke...to-control-vjoy)
+ Now uses vJoy 2.x - Support for up to 32 buttons
You will NEED to uninstall vJoy 1.x and install 2.x to use this version

1.1
= Code for button testing no longer has one subroutine per button
= Optimised technique for inverting axes - thanks Babba on AHK forums!

1.0
* Fully functional basic version!
= Fixed bug stopping invert working in Manual Control mode
+ Button mapping in

0.3
+ Settings now saved in an INI file

0.2
+ All 8 axes now mappable
+ Code optimisations

0.1
- Initial Proof of concept

Edited by evilC, 20 November 2013 - 01:07 PM.


#2 evilC

    Member

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

Posted 18 January 2013 - 06:46 AM

ToDo List:
  • Remap Axis Scale

    Allow remapping the scale of an axis. For example, if you have a throttle with a detente (Notch) at 25%, remap 0-25% to be reverse and 25% or more to be forwards - the "centre" point for that axis has moved...
  • Combine Axes

    eg if you have driving pedals where each pedal is a separate axis, but you want to use them as one axis in MWO (eg for speed or steering).
  • Any button as shift button.

    Say you have a stick with 8 buttons - assign one button as a "Shift" button, and when you hold it and hit another button, it would send a different button to normal. eg button 1 normally triggers button 1, but button 8 (set as shift) + button 1 = button 9
  • Keyboard control of axes - allow mapping of keys to control the axes (eg throttle, along with half speed and full speed shortcuts)
  • (Conceptual) Simulate analogue turning - surely if you strobe a turn key at varying speeds, you could simulate different speed turns. Worried it might spam the servers and annoy PGI though.

Edited by evilC, 31 January 2013 - 06:52 PM.


#3 evilC

    Member

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

Posted 18 January 2013 - 09:15 AM

New version up, 0.3

Settings are now saved in an INI file, so you only need set it up once.

#4 evilC

    Member

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

Posted 18 January 2013 - 04:35 PM

New version up, 1.0 - FULLY FUNCTIONAL

#5 Denniz0229

    Rookie

  • 8 posts

Posted 22 January 2013 - 04:00 AM

8 axis = great
8 buttons = sucks

i would need a lot more then 8 buttons to give this any try

ps: i still appreciate the effort for making this!

#6 evilC

    Member

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

Posted 22 January 2013 - 04:09 AM

I have a new version in the works that uses vJoy 2.x and has support for 32 buttons. Expect it within the next couple of days.

I also realise I forgot to implement hat support. This may take a little longer.

#7 CyBerkut

    Member

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

Posted 23 January 2013 - 02:37 PM

View PostevilC, on 22 January 2013 - 04:09 AM, said:

I have a new version in the works that uses vJoy 2.x and has support for 32 buttons. Expect it within the next couple of days.

I also realise I forgot to implement hat support. This may take a little longer.


Will Win7 x64 still need to use Test mode?

#8 evilC

    Member

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

Posted 23 January 2013 - 11:19 PM

View PostCyBerkut, on 23 January 2013 - 02:37 PM, said:


Will Win7 x64 still need to use Test mode?

Unfortunately, yes.

Edited by evilC, 23 January 2013 - 11:20 PM.


#9 evilC

    Member

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

Posted 24 January 2013 - 02:15 AM

New version up - 2.0


2.0
+ Now uses Axlar's vJoy library (http://www.autohotke...to-control-vjoy)
+ Now uses vJoy 2.x - Support for up to 32 buttons
You will NEED to uninstall vJoy 1.x and install 2.x to use this version

1.1
= Code for button testing no longer has one subroutine per button
= Optimised technique for inverting axes - thanks Babba on AHK forums!

#10 evilC

    Member

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

Posted 24 January 2013 - 02:34 AM

Apologies, if you downloaded 2.0 before the timestamp on this post, please re-download, I botched the upload.

Also, I have not had a chance to test this on x64 systems yet, if someone could test and verify (Ideally with 32-bit AND 64-bit AHK on an x64 system) then that would be great.

#11 evilC

    Member

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

Posted 24 January 2013 - 12:39 PM

New version up, 2.1


2.1
= Fixed bug stopping UJR from working on 64-bit
= Fixed bug stopping mapping of virtual axis 4 or greater
+ 32 Buttons listed for physical joystick

#12 glycerin

    Member

  • PipPipPip
  • 67 posts
  • LocationAustin, TX, USA

Posted 24 January 2013 - 01:55 PM

Thx for working on this.

#13 Loc Nar

    Member

  • PipPipPipPipPipPipPipPip
  • 1,132 posts

Posted 24 January 2013 - 04:33 PM

Nice work. I'm not in need of this since I've taken matters into my own hands and built my own HOTAS just for mech piloting (all metal!) and have nicely honed profiles to use, but it warms my little heart to see this kind of support for others who do need it. If anyone has a Thrustmaster T16000, Cougar, or Warthog, I have excellent MWO scripts for them in TARGET, which is Thrustmaster's kb/m emulator, but I'm really not trying to hijack here. Carry on.

#14 Inconspicuous

    Member

  • PipPipPipPipPipPip
  • 456 posts

Posted 27 January 2013 - 05:04 PM

Very nice! Will try this out soon!!! :P

#15 evilC

    Member

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

Posted 30 January 2013 - 06:37 AM

Updated to version 2.2

+ Added per-axis deadzone settings. Just 5,10,20,30,40,50,60,70 or 80 percent at the moment but I intend to allow any figure in a future version

#16 evilC

    Member

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

Posted 30 January 2013 - 09:08 AM

Hmm, a little clarification is probably in order here.
The deadzone support is currently very basic, a bit of a bodge really.

Say you set a 20% deadzone - if you move the stick up to 20%, it will report no change.
Once you move to 21%, the virtual axis will jump straight to 21%, not to 1%

I intend to fix this, as well as add finer granularity settings (ie any % for deadzone) in the next version.

#17 evilC

    Member

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

Posted 30 January 2013 - 04:24 PM

2.3 is up


+ Much improved deadzone code
So with a 50% deadzone, if you move to 50 on an axis, it will be dead, but moving to 51 now outputs 1 rather than 51
+ Deadzone is now a text input field, so you can use any value you like
+ Input / Output slider renamed to "State"
+ Input and Output values for axes now displayed
+ Much more commented code

#18 evilC

    Member

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

Posted 31 January 2013 - 10:45 AM

I just realised that the latest version is a little broken.

3.0 should be released tonight (within the next 5 hours) with fixes and a bunch of new features

#19 evilC

    Member

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

Posted 31 January 2013 - 06:53 PM

3.0 is up!
Lots of goodies in there

#20 Foust

    Member

  • PipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 394 posts
  • LocationKentucky

Posted 31 January 2013 - 07:40 PM

I support this thread. Awesome work.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users