top of page

iF-22: Windows is alright for controllers and flight

5 minutes ago
6 min read
iF-22.

A guide for adding joystick and HOTAS support to Interactive Magic's iF-22. iF-22 has been notoriously difficult to get USB or DirectInput controller to work. This guide will be covering a solution to this problem using a number of open source projects.


Note: The following solution was developed and tested on Win10, but remains untested on Win11.


Contents



Before we begin


This guide is a continuation from the earlier, iF-22: Infuriating F-22! guide. As such it assumes:


  • iF-22 has been installed and patched as appropriate.

  • DDramCompat and the specific iF-22 DDrawCompat fixes have been obtained and utilised.

  • ViGem Bus Driver may have already been installed, but this is not a prerequisite.

  • HidHide may have already been installed, but this is not a prerequisite.

  • vJoy, Joystick Gremlin, XOutput and x360ce may have been installed. These tools are not used in this guide and the decision to keep or remove them is left to personal preference, they should not interfere with the required tools specified below.


The following RetroBridge config and libraries are not used and should be removed from the iF-22 installation folder (if present):

retrobridge.config.yml
retrobridge_core.dll
winmm.dll 

Strategy


The strategy employed uses the optimized solution covered in Controllers & retro sims part 11: The WinMM problem. As the background material has already been covered, this guide will concentrate on installation and configuration settings for the tools used.


The GremlinEx (GEX) and Xidi tools both provide configuration options, however only GEX is configured, with Xidi using a default configuration. The reasons for a single GEX config are as follows:


  • Spreading the config between GEX and Xidi makes the config more complex and less intuitive and more difficult to manage.


  • It is assumed that GEX will be easier to configure, as it based on an earlier version of Joystick Gremlin, which many will already be familiar with, despite GEX using an earlier Joystick Gremlin configuration style (release 13 and earlier), rather than the current style (release 14/15).


  • GEX provide finer grain config options that some may wish to use, e.g. response curves.


  • GEX can be used to map additional buttons, not used by Xidi, to keyboard commands.


Tools


It is recommended to keep a copy of the tools installation files in the game management tools folder for safe-keeping.


ViGem Bus Driver


The ViGem Bus Driver (ViGem), created by Benjamin Höglinger-Stelzer, allows the creation and configuration of a virtual XBox 360 XInput controller similarly to vJoy creating and configuring a virtual DirectInput controller.


The recommended  ViGEm Bus Driver version is the latest one, ViGEmBus Setup 1.22.0 "It's dead, Jim" Release available from GitHub ViGEm Bus Driver repository, Releases.


Installation is straightforward using the executable installer app, ViGEmBus_1.22.0_x64_x86_arm64.exe.


GremlinEx


GremlinEx (GEX), created by muchimi, extends the original Joystick Gremlin and allows multiple DirectInput devices to be mapped to a single XInput device using the ViGEm Bus Driver. Although stated in earlier articles the following points are worth repeating:


  • GEX is still very much a work in progress with continuous releases of varying robustness. Although GEX seems to function reliably during gaming, exceptions and faults should be expected when configuring devices. Since configuration is an initial 'one and done' task, this should be considered a fairly minor issue. It is recommended to save frequently when creating the config.


  • GEX uses the older Joystick Gremlin release 13 style of configuration. Those familiar with the release 14/15 style will need to adapt to this older style.


  • GEX takes longer to start than Joystick Gremlin as it needs to initialise ViGEm.


The recommended version is the latest release candidate, which changes frequently (so is not listed). It is available from JoystickGremlinEx repository, Releases.


Installation is straightforward using the installer zip package. It should be downloaded and extracted into a suitable folder.


GremlinEx (GEX).
GremlinEx (GEX)

HOTAS config


Configuring axes will be required no matter how many axes are available as DirectInput axes are mapped to XInput axes. It is recommended that the HOTAS configuration be carried out in the GEX tool only. Xidi should use its default configuration.


Those with fewer than 4 axes should map remaining axes to the keyboard in the in-game configuration. Those with fewer than 4 buttons should leave any remaining buttons unconfigured.


For further background material on this HOTAS config, it is recommended to consult the optimized solution covered in Controllers & retro sims part 11: The WinMM problem.


Stick, throttle and rudder are supported. The physical axes to Xinput and iF-22 axes were configured as follows:

Physical axis

XInput axis

iF-22 axis

Joystick x-axis

Left stick x-axis

Roll axis

Joystick y-axis

Left stick y-axis*

Pitch axis

Joystick button 1

Button A

Button 1

Joystick button 2

Button B

Button 2

Joystick button 3

Button X

Button 3

Joystick button 4

Button Y

Button 4

Throttle

Right stick x-axis

Throttle axis

Rudder

Right stick y-axis*

Rudder/yaw axis


Note: Axes marked with * may require the axis to be inverted in GEX. The XInput throttle and rudder axes may seem counterintuitive but will be correct in the game.


It is recommended to use a profile name that explicitly indicates it is a GEX profile, e.g. iF-22-gex.xml.


Xidi


Xidi, created by Samuel Grossman, improves the gameplay experience when using modern XInput-based controllers (such as Xbox controllers) with older games that use DirectInput or WinMM to communicate with game controllers.


Xidi was originally rejected as a solution but this may have been due to the recommended Hookshot method used, which may have tried to use DirectInput and DirectInput wrapper libraries with iF-22. The method presented below only uses the winmm.dll library copied into the game installation folder.


The recommended  Xidi version is the latest one, v5.0.0, available from GitHub Xidi repository, Releases. To install:


  • The installer package, Xidi-v5.0.0.zip, should be downloaded and extracted.


  • The libraries used should be 32-bit to match the 32-bit iF-22 game not 64-bit. They can be found in the Win32 folder.


  • The following libraries should be copied into the iF-22 installation folder:

Winmm.dll
Xidi.32.dll

  • Although the Hookshot method, using the HookModule form of Xidi is recommended, this should be avoided to prevent DirectInput library use.


HidHide


HidHide is a device firewall created by Benjamin Höglinger-Stelzer, hiding devices from any app not explicitly allowed through the firewall.


The recommended HidHide version is the latest one, HidHide Drivers v1.5.230, available from GitHub HidHide repository, Releases.


Installation is straightforward using the executable installer app, HidHide_1.5.230_x64.exe.


Configuration


In order for iF-22 to start and work with controllers, GEX and the Xidi libraries should be allowed to see through the device firewall with all devices hidden from iF-22. The affected part of the optimised solution is shown below:


iF-22 solution with HidHide.

  • The following application and libraries should be added to the list of applications allowed to see through the firewall:

gremlinex.exe		(GremlinEx/GEX)
Winmm.dll		(Xidi 32-bit library)
Xidi.32.dll		(Xidi 32-bit library)


  • GEX needs to see through the firewall to map physical DirectInput controllers to a virtual XInput controller.


  • The Xidi libraries need to see through the firewall to receive the virtual XInput controller inputs and pass them to the game.


  • All controllers including physical DirectInput and virtual XInput controllers must be hidden by HidHide.


Example config settings are shown in the gallery below:


  • The application list includes GremlinEx and Xidi libraries.
  • All physical and virtual controllers must be hidden.

Ramp start (running)


Due to the required order of running tools and the limited command line options available to GEX, running the game requires a manual or 'ramp start' sequence. The steps are as follows:


  • Start GEX, load the iF-22 profile (e.g. iF-22-gex.xml) and enable the profile.


  • Start HidHide and ensure, in the Devices tab, all controllers including the Controller (XBOX 360 For Windows) virtual controller is hidden.


  • Check the Enable device hiding checkbox and close HidHide.


  • Go to the iF-22 installation folder and run the game, if22.exe.


When the game is quit, to return the system to a clean state:


  • Uncheck the Enable device hiding checkbox and close HidHide.


  • Disable the iF-22 profile and close GEX.


In-game configuration


This section supplements the exiting In-game configuration in the earlier, iF-22: Infuriating F-22! guide. The following gallery shows the settings for joystick, throttle and rudder pedals:


  • Setting the stick, throttle and rudder controls.

Remaining issues


Further work corrected a broken Indeo video codec installation with the K-Lite codec pack tweak tool. This fixed the video playback, however, the WinMM library used by Xidi seems to have issues with video playback so the animations should remain disabled.


Example video


iF-22 with full HOTAS support

Finally...


Credit and thanks go to the following individuals without which, iF-22 would still be languishing without joystick or HOTAS support::


  • Samuel Grossman for Xidi.

  • Benjamin Höglinger-Stelzer for ViGEm Bus Driver.

  • muchimi for GremlinEx.


Good hunting!

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Drop Me a Line, Let Me Know What You Think

Thanks for submitting!

© 2035 by Train of Thoughts. Powered and secured by Wix

bottom of page