Community Event / Creation Sx2vJoy; get your 3DConnexion device working like a 3D joystick (formerly SN2vJoy)

Sx2vJoy; 3DConnexion 6DOF devices working like a 3D joystick (formerly SN2vJoy)

SpaceNavigator, SpaceMouse Pro, SpaceBall 5000 (USB), SpacePilot (both Pro and non-Pro), SpaceExplorer and SpaceMouse Wireless fully supported. For other devices, please read the Ctrl+Alt+B subsection of "How".

Updated: 23.12.2015, last at 12:35pm GMT.

Requires vJoy 2.0.4 241214 or later!


Changelog:

v1.2 build 5 test 7
  • fixed startup issues when using Russian, French and likely a couple other keyboard input locales
  • fixed error message when closing Sx2vJoy on controller and vJoy target device selection window


v1.2 build 5 test 6 (TESTED WITH vJoy VERSION 2.1.6)

  • fixed crashes on Sx2vJoy startup on Win10
  • fixed Sx2vJoy causing vJoy error message spam in Event Viewer\Windows Logs\System\


v1.2 build 4

  • heap corruption possibly fixed (this one is really though to track down; been two months since I last had one. Let's hope it's gone for good *fingers crossed*)
  • assign axes now works correctly
  • assign axes settings now load correctly in the GUI
  • pitch / sensitivity lower limit decreased from 1 to 0 in the GUI


v1.2 build 3

  • fixed button setups no longer working after yesterday's update
  • added support for SpacePilot Pro buttons
  • trackingan assigned vJoy ID through reconnects in case of vJoy reconfiguration


v1.2 build 2

  • optimizations to get rid of an occasional 0xc0000374 error
  • button support for the SpaceMouse Wireless


v1.2 build 1
  • added support for SpaceMouse Wireless
  • updated to work with vJoy >= 2.0.4 241214
  • vJoy availability and configuration checks
There has been some concern over the vJoyInterface.dll files being included in the Sx2vJoy archive in the past. As they are now part of a vJoy installation itself, I'm taking this opportunity to remove them from Sx2vJoy.



v1.1 build 6

  • fixed an issue that would sometimes cause Sx2vJoy to error out when movement occurs on an axis



v1.1 build 5
  • fixed an issue that would in some cases prevent profiles from activating, for real this time



v1.1 build 4

  • fixed an issue that would in some cases prevent profiles from activating
  • active profiles are now displayed as a traytip instead of a tooltip
  • button label was missing in the Assign Buttons section
  • buttons can now be configured by the label on the button, so there's no need anymore to look up the button ID pictures



v1.1.3b

  • sometimes the profile activation tooltip wouldn't go away after its 5 second appearance



v1.1.3

  • fixed a bug that would cause Sx2vJoy to throw error messages and quit when assigning vJoy buttons to 3DC buttons



v1.1.2

  • added ability to launch the config GUI from the Sx2vJoy tray menu icon


v1.1.1

  • (finally!) added full support for the SpaceExplorer


no version update
  • Updated GUI to allow to set throttle increments more finely


v1.1
  • controller profiles to switch between different settings for different applications / games
  • assign keyboard commands to 3DC controller buttons
  • enhanced throttle setup possibilities, also supports the mouse wheel
  • enhanced sensitivity control to better fine-tune axis behavior
  • "audio feedback" setup routine for games that (only) run in true fullscreen mode


v1.05 beta 1
  • Sx2vJoy
    • Always tries to start with admin rights
    • Added ability for users to manually select a vJoy target device if multiple target devices are found
    • Reassigned axis movement was applied erroneously
    • The Ctrl+Alt+S setup routine would sometimes attempt movement on vJoy axis "0"

  • GUI
    • Changed axes descriptors to be more in line with how vJoy and Windows represent them
    • Couple of changes to make the config.ini appear neat again
    • Axes conflicts message had "3DC" and "vJoy" swapped


1.04
  • added configuration GUI to help you set up Sx2vJoy
    • Info buttons (i) give detailed explanations for what each section is for.
    • Changes are saved automatically. Just close the GUI when you're done.
  • fixed a bug in Sx2vJoy that would ignore the throttle deadzone setting and use the normal deadzone setting instead if an axis was declared to operate as a throttle axis
  • if you happen to start multiple instances of Sx2vJoy, the older one will now close before the new one comes up. This will prevent fighting over which instance gets to control vJoy as well as the error messages that followed


v1.03:
  • added support for the SpacePilot (non-Pro)
  • Fixed a bug that would prevent mouse button clicks from being recognized by Windows / other applications.
  • Graphical guides showing which button on a device has which ID are no longer part of the archive. Sx2vJoy's tray menu accessible via the tray icon now allows you to download the specific image you require, instead of having to download them all if they were part of the archive.


v1.02:
  • added support for the SpaceBall 5000 (USB)
  • The cause for the "[VJoy_DeviceErr] Device 1 is not ready." error message that appeared when your 3DConnexion device was generating input while Sx2vJoy was still in its startup phase should now be fixed.



How:

Download and unzip Sx2vJoy:
https://github.com/Lasse-B/Sx2vJoy-test

Download and install the open-source program vJoy:
http://vjoystick.sourceforge.net/site/index.php/download-a-install

Set up a vJoy stick to use the following axes setup and as many buttons as your 3DConnexion device has.
Click here for picture:

Just run Sx2vJoy.exe

Ctrl+Alt+S opens a setup dialog which walks you through setting up your 3DConnexion device in the game of your choice.

Ctrl+Alt+D opens an "audio feedback" setup dialog which helps you to set up your 3DConnexion device in the game of your choice. This is necessary for games that only run in true fullscreen mode as the tooltips shown during the "normal" setup mode only display when a game is running in windowed mode.

It works similarly to telephone computers. Each number you hear designates a step of the setup process:

1 = ready to receive your axis input. Move the handle of your 3DConnexion device or quit the setup process
2 = axis movement detected, you've got 5 seconds to click on the control in the game that you want to assign axis movement to
3 = assign attempt complete, you should see the axis you moved in (1) has appeared in the control field you selected in (2)

4 = setup mode ended


Ctrl+Alt+B enables logging mode for the button IDs. If your 3DConnexion device is not fully supported, knowing which button has which ID makes it possible to assign these buttons to vJoy buttons. Just press each button once, close the dialog by using Ctrl+Alt+B again, then post the content of Sx2vJoy.log here together with the vendor and product IDs of your controller.

To find out these two IDs, you can click on "Start" on the task bar and enter "dxdiag" (followed by hitting the "enter" button) in the input field. On the "Input" tab of the window that appears you'll see a couple of "DirectInput Devices". Scroll down until you see your "Space..." controller, then simply post Vendor and Product IDs here.



Right clicking the tray icon gives you a menu with the following items:

Open Joystick Properties leads you directly to Window's own Game Controller dialog in which you can see how vJoy and your 3DConnexion device work together.

Download Button ID Guides lets you download pictures detailing which button has which ID.

About is for finding out what application that icon belongs to, the version number and the author.

Exit closes Sx2vJoy.



Configuration:



Just run the included Sx2vJoy Config GUI. The info buttons [ i ] give detailed explanations about what each section does. Alternatively, if you don't want to run the GUI for whatever reason, you can take a look at infobox.ini. Not as straightforward as the GUI, but enough to get you started.

Any changes you make in the GUI are saved as soon as you make them, unless a window says otherwise. "Exponent" is a bit of an oddball though. It only saves when set to odd integer, because even integers don't make much sense.



FAQ:

Q: What's the purpose of this when there already is joystick emulation in 3DConnexion's driver?
A: 3DConnexion's drivers and GUI are designed with professional CAD software in mind and don't work too well with games. As there is no GUI to fully customize 3DConnexion's joystick settings, you either have to manually change the configuration .XML files, or you can use Sx2vJoy and use your controller like you would any other joystick.

Q: There's no save button or anything in the Sx2vJoy GUI. How do I apply changes I make?
A: Valid changes are saved automatically at the moment you make them, unless a window says otherwise.

Q: I started Sx2vJoy, but in the game I want to play I get rather uncontrollable spinning.
A: Your game is probably still accessing your 3DConnexion controller directly. Rebind the axes controls in the game's configuration menu using one of Sx2vJoy's two setup modes, which is basically playing back your controller actions with a 5 second delay. This delay when setting up the controls is necessary so the game can distinguish between input coming through vJoy (what we want) and input coming from the 3DC device directly (what we don't want).

Q: When I start Sx2vJoy's setup mode, my game leaves fullscreen mode and runs in a window. Why?
A: Sx2vJoy is trying to display information that will walk you through the setup process. Unfortunately for the time being this is done through tooltips, which force some games out of fullscreen mode. Luckily though this is a one time process, so once axis setup is complete you can go back to fullscreen mode using Alt+Enter or by restarting the game. (If there is an open source overlay API that works with Direct3D 9 through 11 and / or OpenGL, please let me know.)

Q: What if my game only supports fullscreen mode and does not run in a window? How am I supposed to set up my controls then?
A: Since the process of setting up axes is rather simple, you don't really need the on screen instructions if you follow the steps as outlined under "Ctrl+Alt+D" in the "How" section.

Q: You're a complete stranger and I can't know your intentions. What if your software contains malicious code?
A: You can have a look at the included source code and make your own compilation from it. You can also upload the executables and .dll files to www.virustotal.com and have them checked by 50+ malware scanners, which is what I'd recommend. However there is the possibility that some scanners report malware. Generally speaking, if the overwhelming majority of the scanners say a file is clean, it usually is and the results of the few scanners that do show an alert are just "false positives".

Q: The "Couldn't load vJoyInterface.dll" error message keeps popping up. How can it be fixed?
A: Try installing / doing a repair install of both the Visual C++ Redistributable for Visual Studio 2012 & 2013, both x86 and x64 versions, which can be found here:
https://www.microsoft.com/en-US/download/details.aspx?id=30679
https://www.microsoft.com/en-US/download/details.aspx?id=40784

That would make 4 downloads / installs in total.
 
Last edited:
Very interesting. I have one of those Space Navigator thingies from the days I played with a bit of 3D CAD stuff. It's not seen the light of day since then. I am quite happy using a HOTAS setup for normal flight but was wondering if the Space Navigator would be a good addition for using on the navigation map as that can have it's own controls looking at the bindings page. Do you think this is a feasible use?
 
It works just as you described it, although in practice it seems the galaxy map controls need fixing as some movement isn't applied even when using keyboard buttons.
 
Ahh thats good to hear. They will probably fix the movement anomalies in the next update. This is our first versions of the map so must be due an update.
 
Thank you, sir.
With this post and a lot of mangling, I was actually able to get my old Spaceball 5000 usb working in game! :smilie:

May your cargo hold never see another fish!
 
Trial and error.

i'm not 100% on this as there was a lot of uninstall/reinstalls but I think what worked was:

1 run the 3d driver and plug in the spaceball
2 install vJoy (specify target device 1 in the configure app)
3 run Sx2vJoy

I went ahead and uninstalled everything to get the exact method, but this time everything just worked...
I might go back and uninstall everything again with Revo to remove any reg keys or configs that might be hanging around.

I do not know the correct method for adding the device IDs and Button IDs, but if you would like to fill me in that would be cool (or point me to the documentation).

btw; buttons from the Log are just 0-11
 
Hi,

I posted this on the 3dconnexions forum, but I thought I'd post it here to see if anyone has the same problem.

I just took delivery of a SpaceNavigator for Notebooks. Refer to this image for the names of the axis I'll be using:

http://www.slipperybrick.com/wp-content/uploads/2006/11/spacenavigator-control.jpg

When the is fully twisted in the "Spin" axis, I can't put any input in the "Pan right/left" or "Zoom in/out" axis. It feels like this is a hardware limitation because the doesn't move at all - it's locked. You can still use the "Pan up/down", "Tilt", and "Roll" axis, it's just the other two that are locked.

It's probably not much of a problem when using 3D design apps, but in Elite it means you can't lateral or front-back thrust while yaw-ing.

Does anyone else see this? I'm wondering if it's an undocumented limitation of the smaller, lighter "for Notebooks" version of the controller...
 
@CommanderHaggard
If Sx2vJoy works, it should work whether or not the 3DConnexion drivers are installed or not. Sx2vJoy is set up to listen to the USB input from 3DConnexion devices directly and ignores any driver settings. Only problem is the buttons, because button IDs aren't necessarily without gaps, as the SpaceMouse has shown.

Anyway, I did put in some SpaceBall support for the buttons, however I still need confirmation from you whether or not they work. So if you could give this a try, I'd be much obliged:

http://lbsoftware.bplaced.net/Sx2vJoy/Sx2vJoy_test.zip

And even more so if you can also supply me with the order in which you pressed which button together with the output of Sx2vJoy.log. Maybe the buttons with numbers start with the lower IDs, maybe it's the buttons with the letters, maybe they're mixed. This would allow me to set up a graphical guide showing which button generates which ID so you and other SpaceBall users have an easier time setting up their buttons in the future.





@davelondon
My SpaceNavigator (normal, cable version) hasn't shown this behavior, but I remember a setting in the driver that gives preference to whichever axis has the most movement. Maybe this setting is active for the rotate (Z rotate) axis.
 
Hey can you double check? It's definitely a hardware limitation of the controller I have. Once you twist the z-rotate axis all the way round the two translation axis don't move at all - it's locked.
 
Thanks for all your work on this Lasse B.

-Install
I do have to run the 3DConnexion driver and go through their little setup or vjoy/Sx2vjoy? does not recognize the spaceball.
I just get device 1 not ready errors from Sx2vjoy.

After that I can run Sx2vjoy no problem and disable the 3DConnexion driver

-Button layout
I pressed them in the order they are on the device.
order pressed: 1 2 3 4 5 6 7 8 9 a b c
Log output: 0 1 2 3 4 5 6 7 8 9 10 11

-Button confirmation
Vjoy (and windows) only recognizes button press 1 and 2.


Additionally, something strange with the buttons.

When I press the buttons from the log its always:
0 1 2 3 4 5 6 7 8 9 10 11

However if I jiggle the ball (no laughing) while pressing the buttons I get:
21 3 4 20 21 20 21 9 21 10 20 11 18
(jiggling the ball by itself produces nothing however.)

Let me know if you need any more testing.
I love getting old hardware working :)
 
If I may ask a dopey question: How ideal (or not) are these devices for the galaxy map in the game?

I've seen one or two YouTube vids, and they look quite nifty, but what about this specific usage? (Thinking future Oculus Rift usage, and wondering if one of these can be a good map interface device, rather than for ship control).
 
If I may ask a dopey question: How ideal (or not) are these devices for the galaxy map in the game?

I've seen one or two YouTube vids, and they look quite nifty, but what about this specific usage? (Thinking future Oculus Rift usage, and wondering if one of these can be a good map interface device, rather than for ship control).
Usage in the galaxy map is something I found was most enjoyable.
You can spin and shift the map around in a intuitive way. Very enjoyable!

Docking is a bliss and also very easy using the space mouse.

What I had (have) problems with is dogfight. I am just not exact enough with the to get the crosshairs over the ship. It is possible but the pixelaccurate work is, for me, quite stressing and difficult. Perhaps I am more the KB+M person, which I use for now too many decades :)

An interesting match was to use the combination of 3D mouse + keyboard + mouse all at once.
Use the 3D mouse for ship movement, keyboard for actions and HUD panel control and the mouse for freelook (or use a headtracker for this, however I like to move my head around to relax the neck muscles while playing and that messes with the view so tracker's are not my thing).
The middle mouse button is a switch to enable/disable headlook.
When it's disabled I control the ship with BOTH 3D mouse and normal mouse at the same time so I can point and shoot with the mouse while also able to sling the ship around with the 3D mouse.
That worked out very good for me.

Bindings:
- 3Dmouse: 6DOF, left button: afterburner, right button: FAon/off
- keyboard: heavily customized, panel control moved to numpad for the right hand while the left hand is on the 3D mouse
- mouse: headlook/pan+pitch, left button: fire, right button: alt fire, middle button: headlook on/off, wheel: throttle +/- for "cruise control"
 
Last edited:
  • Like (+1)
Reactions: Rog
Hey can you double check? It's definitely a hardware limitation of the controller I have. Once you twist the z-rotate axis all the way round the two translation axis don't move at all - it's locked.
You're right. And it's not just the SpaceNavigator, it's the SpaceMouse as well.

Here are pictures where someone disassembled his SpaceNavigator:
http://forum.poisonnuke.de/index.php?action=ViewThread&TID=6462

Pictures 4 and 7 seem to show that the problem is actually how the mechanism is designed. When you spin the fully into any direction, the three pins reaching down from below the green disc-like PCB seem to lock panning and zooming.

Thanks for making me check again. For my previous reply it somehow didn't compute for me you were talking about a problem with the actual hardware.





@CommanderHaggard

Here's a new version for you to test. At least the buttons should be working now.

http://lbsoftware.bplaced.net/Sx2vJoy/Sx2vJoy_test.zip

It's the same link, but the file has updated content.

Sx2vJoy should work whether the 3DConnexion driver is installed or not, but a couple of prerequisites need to be met:
  • the device must register using VID 0x046D. You can check the input tab of dxdiag for that. Or just check whether the buttons work with this latest version of Sx2vJoy.
  • the handle must generate axis inputs ranging from -350 to +350. That's how the SpaceMouse and SpaceNavigator do it. If the SpaceBall (or one of their other devices) deviates from this convention, adjustments to Sx2vJoy have to be made. This could take a bit since I don't have a SpaceBall.

The error message you described shows up when the 3DConnexion device is generating handle input while Sx2vJoy is in its start up phase.

The seemingly garbled numbers in the log when you move the while pressing buttons are caused by the way 3DConnexion devices input is read. There's just four variables from which to get all possible states. If you press any combination of buttons simultaneously you get similar results.

What happens is that some of the data from the inputs are joined together. Bitand is then used to make sense of such joined data.

E.g.

button 1 = 1 (or 2^0)
button 2 = 2 (or 2^1)
button 3 = 4 (or 2^2)
button 4 = 8 (or 2^3)
button 5 = 16 (or 2^4)

If you were to push buttons 1 & 3 simultaneously you'd get 5, if you pushed 3, 4 and 5 you'd get 28, and so on.

Bitand basically checks whether the result (28) contains a specific power (2^n). Since you can't simply tell it to tell you which buttons are pushed, you have to ask it for each button individually.

The button data returned from a 3DConnexion device is always a power of 2. Since dealing with button IDs like 1048576 (the SpaceMouse goes even higher than this) is rather impractical, I simply break down the power to its exponent used and use it to describe a specific button.
 
@Lasse B.
"The error message you described shows up when the 3DConnexion device is generating handle input while Sx2vJoy is in its start up phase."
Ok - that makes sense.
It is entirely possible that the Spaceball was receiving some random vibration during Sx2vjoy start-up, as it is bolted to my chair :) and it is extremely sensitive.
I made sure to remain entirely still and the error went away and Sx2vjoy loaded just fine without using the 3D drivers.

Everything seems to be working perfectly now!

All buttons recognized in the correct order (0123456789abc = button 1 2 3 4 5 6 7 8 9 11 12) by vJoy and windows.

I suppose we can now do away with 3Dconnextion's shoddy legacy support and I can uninstall their Vista drivers.
- a million thank you's for that!

@Dirk Brabeen
I use the Spaceball as a 6dof throttle, mouse for aiming and VoiceAttack for everything else.
Works perfectly.
 
Posted this already in the other SpaceNavigator thread, but in case anyone's interested:

Have found a page with a 3rd-party driver for the Spacenavigator and these other models:
  • SpaceBall
  • SpaceTraveler
  • SpacePilot
  • SpaceNav
  • SpaceExplorer
  • SpaceNavigatorForNotebooks
  • SpacePilot Pro
http://www.omniflux.com/devel/#rbc9

Source code is there too.

Looks like it's compatible with 64 bit Windows. Haven't got a 3D mouse (yet), so can't say if it works well.

Link to it's original development thread on the 3Dconnexion forum.
 
Everything seems to be working perfectly now!
Great, glad to have another device on the "supported" list. I'll release a "final" version tomorrow to include a picture illustrating the button layout. Just in case someone is wondering whether letter or number buttons are first ;)





@Rog
Are he RBC9 drivers working for you? I didn't have a lot of luck when I tried them on my old Windows installation. They crashed almost every time I tried to access the settings. But that might just have been the old installation of Windows acting up. The new one is showing less quirks, but I haven't used the RBC9 driver since.
 
@Rog
Are he RBC9 drivers working for you? I didn't have a lot of luck when I tried them on my old Windows installation. They crashed almost every time I tried to access the settings. But that might just have been the old installation of Windows acting up. The new one is showing less quirks, but I haven't used the RBC9 driver since.
Ah, don't have a 3Dconnexion device yet, just woke up to the possibility of using one in the game - especially for the galaxy map. Didn't know if you guys were aware of the 'non-official' driver though.

FWIW, the original RBC9 drivers look as though they were left in limbo for a while, then picked up and sorted at a later date by someone else, including the 64-bit version.

This looks like the latest, with the source code being HERE.

Alas, my coding experience is largely in dinosaur languages, and windows development is pretty alien to me.

Seems a bit naughty of 3Dconnexion not supporting 'legacy' devices fully, when they're all USB and essentially the same.
 
Top Bottom