Jump to content

SIOC to DCS over the Vjoy


Recommended Posts

Hi guys,

some time ago a brilliant Mig21 module was released, so I decided to make some mock up panels to use this jet a bit more comfortable.

1) First try.

First thing I tried was to use Mjoy16 for the custom panel prototype that I quickly made. I used one pair of inputs for every toggle switch and discovered that there are not many standard commands that support different actions when joystick button is pressed and when it’s released. So I went to Mods -> Mig21 -> Input -> Joystick -> default.lua and made some custom lines to provide support for this (a lot of posts on this forum about this so I skip the details).

It turns to be very unusable so I have to turn the switch up and down several times, so DCS (or Mig21) for some reason doesn’t want to recognize button release events if the joystick button was pressed before the mission starts.

2) More wires.

I had plenty free inputs in my Mjoy’s for the extra buttons so I changed some switched and rewired them so every change of state was triggering the press button event. Well it turns to be a bit more comfortable, but again if I left the switches in some other position then Mig21 model switched positions on mission load time I have to click them all again. Needless to say that this DCS «feature» is very annoying.

3) Good old times.

I dig up the forum and ended up on Oakes export.lua for the Opencockpits cards that I had plenty from the time of the MSFS. I remembered SIOC to be absolutely flexible so I rewired my panel for the Opencockpits Master Card and went to the lua scripting. My Lord, I spend couple of days to figure out that performClickableAction sucks as well as SetCommand for Mig21. It works well in A10 but completely unusable in Mig21. I have no idea whom to blame or whom to pray but finally I was close to give up completely.

4) Angry user. :mad:

I start looking for the other ways to bind SIOC to DCS. I discovered vJoy project that makes virtual joystick device so it can be fed from another application. Hooray! I took vJoy SDK sample, quickly put IOCP server into it and I made IOCP-vJoy link working easily.

 

In SIOC you can play with any logic you want for the virtual buttons, like making two or more buttons for one physical switch (maybe useful for controls with protective cover caps). Literally anything you want you can do with SIOC. Its also possible to create as many vitrual buttons as you need for any change of the physical switch position.

And the best option of this solution is switches synchronization. I put initialization in SIOC script so it sends the initial button presses every time it connects to the application. In one click I have my panel and DCS Mig21 switches fully synchronized.

 

The program is doing few things:

- lookins for any vJoys configured (I made it yet just for one vJoy with 128 buttons without axis

- starts IOCP server on the localhost on 8099 port

- registers first 128 IOCP variables as vJoy butons

- resets all the buttons every time SIOC reconnects (sync feature)

 

P.S. I think its not good to share the binary or the program. But the source code is made from different parts of my other projects and its far from understandable form to share the source. Anyway PM if you need this IOCP-vJoy link. I think there are not many people using SIOC, so I can easily share it for some of those who need it.

 

P.S. Until the time when lua scripts and internal function behavior will be mature in DCS I probably will keep using this solution.

 

P.P.S. Not much of details just because I am not sure if there will be someone interested. :book:

 

Cheers, Vitabutch

128088097_SIOCtoDCSovertheVjoy.thumb.jpg.26dd39ff203c2e4328c9fc82af6186c1.jpg

Link to comment
Share on other sites

Update: I have found this message about wrong Device ID numbers in devices.lua

 

http://forums.eagle.ru/showpost.php?p=2239499&postcount=3

 

I counted correct deviceID from the top of the file and now performclickableaction works. So my Vjoy applet becomes more or less obsolete. The only use case I see now is to use it in multiplayer where modified export.lua are not allowed by the server.

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Thank you very much Vitabutch!:thumbup:

 

Kind Regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

  • 1 month later...

Hey Vitabutch!

 

When starting your vJoyClient.exe (as admin), i get some kind of errormessage: "Systemerror vJoyInterface.dll is missing" and nothing further happening.

 

I have installed the latest vJoySetup.exe and devices are set and visible.

What vJoySetup version is the preferred one? Do i need some additional files to get this running?

 

Kind regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

Hey Vitabutch!

 

When starting your vJoyClient.exe (as admin), i get some kind of errormessage: "Systemerror vJoyInterface.dll is missing" and nothing further happening.

 

I have installed the latest vJoySetup.exe and devices are set and visible.

What vJoySetup version is the preferred one? Do i need some additional files to get this running?

 

Kind regards,

Terrorvogel

 

Hi Terrovogel,

 

do you have FeederSDK installed? vJoyInterface.dll is a part of it. In fact my application is just a modified feeder application from vJoy SDK example sources.

SDK link is the following (from the same vJoy site) http://vjoystick.sourceforge.net/site/index.php/component/weblinks/weblink/13-uncategorised/11-redirect-vjoy2sdk?task=weblink.go

 

No any addiotional files are needed other to run my application rather than SIOC.

Link to comment
Share on other sites

No i haven´t installed it before.

Now i have downloaded the .zip file from your link, but a stupid question, how do i install it? Do i have to copy it over the vjoy installation? How do i open the ReadMe.odt file inside? Just need a little direction for this. Sorry for my noobian knowledge due to this and thank you for your support!

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

No i haven´t installed it before.

Now i have downloaded the .zip file from your link, but a stupid question, how do i install it? Do i have to copy it over the vjoy installation? How do i open the ReadMe.odt file inside? Just need a little direction for this. Sorry for my noobian knowledge due to this and thank you for your support!

 

I just checked that I have needed dll file by the path where vJoy configuration application and driver are installed C:\Program Files\vJoy\x64 Please also check if you have vJoy driver and application installed.

 

Probably I should write a step by step guide in the few coming days when will have free time.

Link to comment
Share on other sites

I have copied the vJoyInterface.dll from the SDK zip file

C:\vJoy216SDK-030216\SDK\lib\amd64\vJoyInterface.dll

into my vjoy install path:

C:\Program Files\vJoy\x64

 

I´m currently running SIOC.exe Ver. 5.0B5

 

When running your vJoyClient.exe now (as admin for sure), that i have also copied into vjoy installpath, i get an errormessage that vJoyclient is not working anymore -->Close Program

With origin vJoyInterface.dll from vjoy itself, there is a different error message and abort too (no CMD screen)

 

errormessagebk2zhecfu9_thumb.jpg

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...