[UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO
-
@airtex2019 wow… just, wow… almost 18 years.
so hard to believe that still works at all… MS at their best? or worst. I don’t know anymore…
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t Just for completion, as I’m going to sleep now and I can’t help you until tomorrow, what I have installed in my prefix is:
d3dcompiler_43
dotnet40
dotnet45
dotnet46
dotnet48
msxml3corefonts
Wine is set to windows10 and emulate virtual desktop equal to my screen’s resolution.
As for the Lutris configuration I use Vulkan.
I have to add that I started this wineprefix on BMS4.34 so I don’t remember exactly why I have all this installed and/or if some are useful anymore. Some I believe are for Weapon Delivery Planner (maybe .Net48?).
I’ve installed all DirectX related things and whatever else I imagined could be needed, but 4.37.1 simply refuses to start with WINE 5.21.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I think 4.6.1 sufficient… but it’s built with a dogs-breakfast of 12+ year old dependencies, like Microsoft.DirectX.Input.dll.
That explains a lot. Is this needed for backward compatibility?
For that reason (I assume) it runs in 32-bit runtime process… even on x64 system. (I haven’t tested, I’m just guessing, there are some interop problems with the DirectInput wrappers on x64.)
Is .NET framework on WINE 64-bit only? I don’t know, but if so, that might explain why it’s crashing/hanging, especially at the moment it tries to begin collecting dx input.
I assume that Dotnet is 64bit, but WINE throws lots of warnings during the installation recommending a 32bit install.
But mixing and matching 32bit and 64bit prefixes is not possible, so it’s either Dotnet or any 64bit app.
The entire situation is a trainwreck, but fortunately most, simpler, apps work fine with Mono (the AL not being one of them).The funny thing is that I remember the AL working at version 1.4 or 1.6. But this was long ago.
I’d recommend to set aside the New Launcher… focus on getting BMS proper running and stable. Then maybe later, turn attention back to AL.
The AL is the least of my worries. Not having a usable HOTAS in 3D is my biggest one.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@airtex2019 wow… just, wow… almost 18 years.
so hard to believe that still works at all… MS at their best? or worst. I don’t know anymore…
Hm. WINE offers very old native overrides for dinput. If BMS uses the same ancient DLL, then maybe this could improve matters.
-
BMS starts working from WINE 7.20 onward and does not require any DotnetFX to launch and operate. It could be that 5.xx is unable to interface with some newer system libraries like Pipewire.
I also found out that only the device selected in the controller options in the 2D UI is being used. If I set the dropdown menu to the T16000M, I can use the stick, but not the TWCS. If I select the TWCS, I get input from that one, but not the T16000M. If I set it to “keyboard”, neither the T16000M nor the TWCS works.
Oh man. -
@ph34rb0t is that a regression from 4.36 or earlier?
I’m not a BMS dev so I don’t know what I don’t know. But I haven’t heard of any recent changes in the dx input stack.
-
I’m out of ideas.
Only to be fully sure. As mentioned on the first post, you need wine64 to run BMS but you can install 32bit apps inside it if you prepare the system for that.sudo dpkg --add-architecture i386
Maybe you need to install .net 32bit version? I’m just wild guessing here.
Other than that, I’ve reached my knowledge limit. Let’s hope people with more knowledge can help you.
-
Sorry if this is a dumb question, but you’re saying that you can assign all the axes (even of the TWCS) in BMS 2d setup after selecting the “joystick” as your main input device in 2d?
That’s the way it should be, only ever use the “joystick” as your main BMS 2d setup input device.
Then, once you have assigned all the TWCS and TM axes, you enter 3d and only the joystick works in 3d?
Cheers, Uwe
-
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t is that a regression from 4.36 or earlier?
I’m not a BMS dev so I don’t know what I don’t know. But I haven’t heard of any recent changes in the dx input stack.
I don’t know. My last attempt with BMS in WINE was 4.35 and I gave up. Before that I think I managed to run 4.33 for some actual flying.
All I know for searching the forums is that the axis issue also seems to happen on Windows and the advertised solution appears to be using the AL and not touch BMS’ 2D controller setup menu or vjoy or TARGET to combine two devices into a single virtual one.
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I’m out of ideas.
Only to be fully sure. As mentioned on the first post, you need wine64 to run BMS but you can install 32bit apps inside it if you prepare the system for that.sudo dpkg --add-architecture i386
Maybe you need to install .net 32bit version? I’m just wild guessing here.
Other than that, I’ve reached my knowledge limit. Let’s hope people with more knowledge can help you.
32bit libraries are required to run Steam, so these are already installed.
Thanks anyway for the effort.
@hoover said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
Sorry if this is a dumb question, but you’re saying that you can assign all the axes (even of the TWCS) in BMS 2d setup after selecting the “joystick” as your main input device in 2d?
Yes, all axes on each device work in 2D.
That’s the way it should be, only ever use the “joystick” as your main BMS 2d setup input device.
That’s what I read in the forums as well. Select the joystick as primary device in the 2D UI and all other connected devices should work in 3D as well.
Then, once you have assigned all the TWCS and TM axes, you enter 3d and only the joystick works in 3d?
Yes.
I’ve already tried native overrides for dinput.dll and dinput8.dll (as required to make IL-2 1946 work, btw.), but this does not do the trick for BMS.
-
@ph34rb0t Did you go to “advanced -> flight control” inside the controller options? It’s there where you can specify the other axes and devices.
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
searching the forums is that the axis issue also seems to happen on Windows and the advertised solution appears to be using the AL
I’m quite sure many hundreds of people have multiple devices (stick and throttle, at least) and don’t use AL.
You might see a lot of over-simplified advice, in recent posts, in the context of helping newbs who are confused why their changes being overwritten by AL… but you are on Linux debugging Wine, so you are not one of those people.
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
@ph34rb0t Did you go to “advanced -> flight control” inside the controller options? It’s there where you can specify the other axes and devices.
Yes, of course I did. I even pre-mapped all axes in DeviceDefaults.txt.
@airtex2019 said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
I’m quite sure many hundreds of people have multiple devices (stick and throttle, at least) and don’t use AL.
I’d be happy without AL if it wasn’t for the issue with the devices.
You might see a lot of over-simplified advice, in recent posts, in the context of helping newbs who are confused why their changes being overwritten by AL… but you are on Linux debugging Wine, so you are not one of those people.
The explanations about issues with multiple controllers were actually quite helpful to provide a clue about what goes wrong.
However, after unsuccessfully trying to run TARGET through WINE to combine controllers into a virtual one and not finding any suitable Linux tool to do the same, I’m giving up. After all, what good is a HOTAS if it doesn’t work?
-
@ph34rb0t at some point I’ll throw Ubuntu on an old laptop and try to play along… sadly all my linux experience is server-side stuff, not desktop/gui stuff
-
@ph34rb0t said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
Yes, of course I did. I even pre-mapped all axes in DeviceDefaults.txt.
I guessed you did, it was just wishful thinking about we being too focused on complex solutions while the easy one was there. Sorry
However, after unsuccessfully trying to run TARGET through WINE to combine controllers into a virtual one and not finding any suitable Linux tool to do the same, I’m giving up. After all, what good is a HOTAS if it doesn’t work?
I use joymap to merge my controllers into one for old games (A-10 Cuba! and EF2000). Drawback from this is you are limited to 18 buttons.
I use it also to “convert” my pedals into another controller when games don’t detect them but detect the HOTAS (EECH).
Documentation is really bad but, once I got it, it’s kind of easy and one-time set-up. Again, it’s late for me now but if you are interested I can do a tutorial tomorrow.This reminds me you can also use xboxdrv to convert anything into a virtual Xbox controller. I ignore if you can merge controllers with this option as I never went farther than converting my pedals with this approach. But I can explain the very basic way too.
-
This issue bugged me enough that I just could not let it go. I tried:
- Combining two devices into one with MoltenGamepad, which is like vjoy for Linux (does not work because the resulting virtual device is limited to 6 axes)
- Various WINE builds, including custom ones and Proton
- Various options
- Countless reinstalls
Then I got the idea that DirectInput may not like different devices with similarly named axes, so I searched the forum if somebody else had issues with the T16000M+TWCS combo.
Then I found this post: https://forum.falcon-bms.com/post/244992
I added the TWCS’ axes to the T.16000M stick in the 2D controller UI and…
Voilà, a fully functional flight setup with all assigned axis working.
However, it is is the most counterintuitive solution I have ever encountered in any flight simulator.
Now excuse I’m going to bang my head against the wall for an hour or three.
\
- Edit:
(Next stop: The “one POV hat” limit.)- Edit2:
POV limit fixed thanks to the lines for “Falcon BMS User.cfg” of Orffen’s T16000M+TWCS key file. -
Here’s a Bash script to install and manage BMS with a system-independent WINE runner and prefix. Rather simple, but enough to please my laziness.
Supports Falcon 4.0 from the Falcon Collection on GOG.It creates some subfolders to contain specific elements for managing a BMS installation and has a looping menu so you won’t have to restart it after every step.
Code:#! /bin/bash ###### # Version 20230211 ###### ## # Variables ## bms_ver=4.37 bms_storage="$PWD/z_downloader_installer" bms_installfolder="$PWD/BMS_$bms_ver" wine_runner="$PWD/0_wine_runner" #wine_runner="/usr" export WINEPREFIX="$PWD/0_wine_prefix" # loop=yes # ## # Functions ## function pause(){ read -p "$*" } # function checkdirectories(){ if [ ! -h "$bms_storage" ]; then mkdir "$bms_storage" echo "CREATED: $bms_storage"; fi if [ ! -h "$wine_runner" ]; then mkdir "$wine_runner" echo "CREATED: $wine_runner"; fi if [ ! -h "BMS_$bms_installfolder" ]; then mkdir "BMS_$bms_installfolder" echo "CREATED: BMS_$bms_installfolder"; fi } # function menu(){ if [ $1 == "main" ]; then clear echo "Falcon BMS $bms_ver WINE launcher" echo " " echo "Wine binary folder: $wine_runner " echo "Wine prefix: $WINEPREFIX " echo "BMS install folder: $bms_installfolder " echo " " echo "1) Falcon BMS $bms_ver" echo "2) Falcon BMS $bms_ver Launcher" echo "3) Falcon BMS $bms_ver Alternate Launcher " echo " " echo "4) Install or update Falcon BMS " echo " " echo "5) Manage WINE prefix " echo " " echo "6) Exit " echo " " echo "Choice [1-6]:" echo " " # Read choice read case; # Choices case $case in 1) "$wine_runner/bin/wine" "$bms_installfolder/Bin/x64/Falcon BMS.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_installfolder/Launcher.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_installfolder/Launcher/FalconBMS_Alternative_Launcher.exe"; loop=yes; break ;; 4) menu "install" ;; 5) menu "wine" ;; 6) break clear exit esac fi if [ $1 == "install" ]; then clear echo "Falcon BMS installation options " echo " " echo "1) Falcon 4.0 GOG Installer " echo "2) Falcon BMS Downloader " echo "3) Falcon BMS $bms_ver Installer " echo "4) Update Falcon BMS $bms_ver " echo " " echo "5) Return to main menu" echo " " echo "Choice [1-5]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" "$bms_storage/setup_falcon_4_2.0.0.1.exe"; "$wine_runner/bin/wine" "$PWD/Falcon 4.0/falcon4.exe"; loop=yes; break ;; 2) "$wine_runner/bin/wine" "$bms_storage/Falcon_BMS_Downloader.exe"; loop=yes; break ;; 3) "$wine_runner/bin/wine" "$bms_storage/Falcon BMS_${bms_ver}_Full_Setup.exe"; loop=yes; break ;; 4) "$wine_runner/bin/wine" "$bms_installfolder/Updater.exe"; loop=yes; break ;; 5) menu "main" ;; esac fi if [ $1 == "wine" ]; then clear echo "WINE prefix management " echo " " echo "1) WINE Configuration " echo "2) WINE Registry Editor " echo "3) WINE Control Panel " echo "4) WINE Uninstaller " echo "5) Winetricks " echo " " echo "6) Return to main menu" echo " " echo "Choice [1-6]:" echo " " read case; case $case in 1) "$wine_runner/bin/wine" winecfg; loop=yes; break ;; 2) "$wine_runner/bin/wine" regedit; loop=yes; break ;; 3) "$wine_runner/bin/wine" control; loop=yes; break ;; 4) "$wine_runner/bin/wine" uninstaller.exe; loop=yes; break ;; 5) winetricks; loop=yes; break ;; 6) menu "main" ;; esac fi } ## # Programs ## checkdirectories # while [ "$loop" = yes ]; do loop=no menu "main" done
Usage:-
Save the above code in a text file named “z_BMS_Manager.sh” (or any other name) and make sure to make the script executable.
-
Move the script to your intended BMS container folder (e.g. “Falcon_BMS/z_BMS_Manager.sh”) and run it to have it create all required folders.
-
Download a WINE build from the “Releases” page of the “Wine-builds” Github repository. Pick any “-amd64” package.
Unpack the downloaded archive, then move the “bin”, “lib” and “share” folders into “Falcon_BMS/0_wine_runner”. -
Download the BMS Downloader from the main website and the Falcon 4 installer from GOG.
Move both exe files into the “Falcon_BMS/z_downloader_installer” folder. -
Install Falcon 4 from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target should be the “Falcon 4.0” folder in the same folder as the install script (e.g. “Falcon_BMS/Falcon 4.0”).
If you stuck to the “Falcon 4.0” folder name, Falcon 4 will be started after the installation. Once it is at the main menu, exit F4. -
Run the Falcon BMS Downloader from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The download target for the installer should be “Falcon_BMS/z_downloader_installer”. -
Install Falcon BMS from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target for BMS should be the “Falcon_BMS/BMS_[version number]” folder. -
Run the BMS Updater from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
-
Launch BMS directly or with the standard or alternative launcher.
If you successfully ran all of the installers, chances are high that BMS will also run.
The script’s main menu will loop until you pick the “Exit” option, terminate it with CTRL+C or close the terminal window.
Notes:With this script, you theoretically have a completely portable BMS installation, as long as you make sure that the WINE drive letter of the partition that contains “Falcon_BMS” remains constant across computers.
You can also have multiple BMS releases exist side by side if you make a copy of the script, change the value of $bms_ver before installing any past or future BMS release and use the copied script to manage that BMS installation.Without any long-term experience (e.g. campaign), I found that I did not need any extra WINE configuration steps to run Falcon BMS and get into 3D.
However, I’ve installed DXVK with winetricks (which must be installed at system-level) to make sure that Direct3D calls are piped to Vulkan instead of OpenGL (faster!).
Disclaimer:
The script could have bugs or other deficiencies and I take no responsibilitiy if it does unintended things to everything and anything.
Feel free to modify it to your liking though.
Changelog:
2023/02/11 - Moved BMS installation options and WINE management options into submenus, added option to launch BMS’ exe directly -
-
So happy you made it!!
I know that feeling of non stopping until making it. Great work!
And great idea about the script.
Happy flying!
-
@Ferde said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:
So happy you made it!!
I know that feeling of non stopping until making it. Great work!
Thanks. A decade of Linux usage has taught me that determination is an important asset in making this operating system work.
Happy flying!
Well, that’s still on the agenda. I need to map the buttons first and do a refresher on weapon employment.
Maybe try to get WDP to work as well as I may need key assignments and checklists as kneeboard pages. -
It’s not the OS really, but trying to get non-supported software like BMS working on it… to be fair
Once Linux works, it’ll continue to do so until the sun goes nova, hardware permitting
All the best,
Uwe
-
Got AITrack+Opentrack to work my BMS setup.
General workflow, in case anybody also wants to give AITrack and OpenTrack a try and needs pointers:-
Compile AITrack for Linux (read its readme for instructions).
-
Run AI Track and set it up for good tracking. Play around with the camera and tracker settings and make sure to tick “Use remote OpenTrack client”. IP should be 127.0.0.1 (i.e. local) and port 4242.
Leave AITrack in tracking mode. -
Compile my OpenTrack fork featuring enhanced WINE/Proton integration. Read the “build script” part of the readme for pointers regarding compilation and- more importantly - system dependencies. The compiled opentrack release in the “opentrack-install” folder can be moved to whereever you want it.
-
Launch OpenTrack and set it up with “UDP over network” with port 4242 (same as for AITrack) as input and “WINE […]” as output.
Start tracking. If AITrack is still in tracking mode and the octopus image is moving, the UDP connection works.
Stop OpenTrack’s tracking. -
In OpenTrack’s “Output” settings dialog, select “WINE” and point the “Prefix” and “Runner” paths to the prefix and WINE runner folders from my BMS Manager script setup (i.e. “[…]/Falcon_BMS/0_wine_prefix” and “[…]/Falcon_BMS/0_wine_runner”. Tick “ESync” and “FSync”, set the protocol “Both” and the Wrapper to “
opentrack-wrapper-wine.exe.so
”. -
Start tracking in OpenTrack again. This may prompt an update of the WINE prefix, meaning that WINE and the prefix were found.
Actual verification of the correct initialisation of the WINE Wrapper can be done by entering the Registry of the WINE prefix from my BMS Manager script and checking the presence of the “HKEY_CURRENT_USER\Software\Freetrack\FreeTrackClient” and “HKEY_CURRENT_USER\Software\NaturalPoint\NATURALPOINT\NPClient Location” keys. -
Set up Opentrack. It is recommended to create a profile for BMS from OpenTrack’s profile controls.
For AITrack, I found that OpenTrack’s “Hamilton” filter with large smoothing values provides the best result.
In the general options menu, assigning F12 and F11 as shortcuts for “Center” and “Toggle” will not block any significant BMS functions.
In the “Output” tab, some input axes (in my case: pitch, roll and z) may need to be inverted.
It is recommmended to enable game detection for BMS by pointing the executable to “[…]/Falcon_BMS/BMS_4.37/Bin/x64/Falcon BMS.exe” and selecting the BMS profile. This will automatically put Opentrack into “Tracking” mode whenever BMS is executed.
The rest of the setup like other options and curves is to taste. -
Start BMS from my BMS Manager script.
In the “Setup” -> “Controllers” -> “Advanced” menu, enable the TrackIR related checkboxes.
Start a Dogfight, TE or else. You should have headtracking now.
Notes:- OpenTrack tracking must always be started after BMS, otherwise it will create a WINE server which blocks BMS.
- As of today, AI Track will not start tracking automatically after it is started, so you still require a click.
- Disabling the “Enable preview” checkbox in AITrack will save some CPU cycles as the image won’t have to be rendered constantly.
- I found that a WINE runner based on the “Staging-tkg” (or “Staging” in general) release from Wine-Builds refused to cooperate with BMS and/or OpenTrack, not providing any headtracking at all. Changing the runner to the regular WINE build (also from Wine-Builds or as installed on my Linux distro) fixed this.
- By default, looking around with the mosue and coolie hat in BMS will stop working with OpenTrack’s NPClient64.dll, whether OT is running or not. This can be fixed/worked around by replacing NPClient64.dll with an older version of NPClient64.dll, for example the one sourced from here. Simply move it into the “opentrack/libexec/opentrack” fvolder and overwrite the original.
If this breaks some other games that you’re using OpenTrack with, simply make a copy of the Opentrack folder for BMS use and use that one. There is no extra effort required in making ands running a copy as all instances of OpenTrack on the system look for tracking profiles in “~/Documents/opentrack-2.3/”.
Hope this is useful. -
-
I’ve updated the BMS Manager script with submenus to declutter the main menu and also added an option that starts “Falcon BMS.exe” directly.
@hoover said in [UNOFFICIAL] Running BMS on Linux/WINE with opentrack HOWTO:It’s not the OS really, but trying to get non-supported software like BMS working on it… to be fair
Well, I’ve been using Arch Linux for a decade now because I like my performance improvements. Troubleshooting, while much more rare than Arch’s reputation makes it out to be, can becomme quite tiring once things start to get weird or broken.
Once Linux works, it’ll continue to do so until the sun goes nova, hardware permitting
On my system, Linux works until Windows or my backup distro decides to wipe the bootloader after an update. Reinstalling it is my flavor of the “Falcon dance” from days long past.
But yes, if left untouched, Linux lasts forever. I still have a mid-2000s laptop around for nostalgia reasons which also runs Arch. I just need to boot it once a year, perform an update and it’s good to go.
-
thanks for your work on BMS manager! I tested it yesterday to set up Falcon 4 and BMS in a test installation and that worked like a charm. I haven’t gotten around to trying BMS itself yet (I plan to use the trad. launcher), but hopefully some time over the weekend.
Cheers, Uwe