RailDriver® and OpenBve:

RailDriver® and OpenBve:

"RailDriver® Desktop Train Cab Controller" from P.I. Engineering (http://raildriver.com/products/raildriver.php) is specifically designed for train simulations fans. Unfortunately, it is NOT recognized as joystick under Windows and, therefore, not usable in OpenBve. Nevertheless, a workaround patching Tao.Sdl library (http://www.mono-project.com/Tao) has been developped in order to make RailDriver® controller regognized by OpenBve as a joystick (with 7 axes and 44 buttons). The right way to make RailDriver® supported in OpenBve (and other sims) would be to develop a Windows device driver based on the HID report provided by P.I. Engineering. Help from anyone having the required competences for this job is, of course, welcome !



Installation:
  • Unzip RailDriver4OpenBve.zip in the same directory as OpenBve.exe. Be sure to REPLACE existing Tao.Sdl.dll by the patched version.
  • Unzip RailDriverCalibration.zip in another directory.
  • Launch RailDriverCalibration.exe to calibrate your device, otherwise, default values will be used and device accuracy could be affected. The resulting values will be stored in calibration.dat file which must be copied into the same directory as OpenBve.exe.
  • Assign axes and button to commands via usual "Customize controls" menu. Two samples are available below: one for UK plugins and one for default built-in safety systems.

This release has to be regarded as a beta version and feedback is highly welcome. 


Licensing:


All sources are available to download and can be freely modified and (re)distributed according:

There is no source code for PIEHidDotNet_s.dll as it’s P.I. Engineering’s propriety and log4net.dll (http://logging.apache.org/log4net/), used for logging, can be freely distributed according to "Apache License Version 2.0" (http://www.apache.org/licenses/LICENSE-2.0.html).


Current (known) limitations:
  • This workaround does NOT work on Linux.
  • Only one RailDriver® is usable in OpenBve (this is probably not an issue for most of us …).
  • RailDriver® will "hide" other(s) joystick(s) in OpenBve.
  • RailDriver® display is currently NOT active.


Technical details:
  • Logging is implemented in Logger.dll and log files can be found in OpenBve and RailDriverCalibration directories. They are configured via log4net.xml files (http://logging.apache.org/log4net/release/manual/configuration.html). 
  • Binaries are targeted for .NET 2.0 (as defined by OpenBve.exe original developers).  
  • Source code is packaged in two VS Express 2012 solutions (http://www.microsoft.com/en-us/download/details.aspx?id=34673). 
    • The first one (RailDriver4OpenBve) contains 4 projects:
      • Logger: logging subsystem, based on log4net library and configured in log4net.xml.
      • RailDriver: uses P.I. Engineering's API (PIEHidDotNet_s.dll) to collect axes & buttons events and store them into a queue.
      • RailDriverLib: static library wrapper for RailDriver required for calls from Tao.Sdl which is also static.
      • Tao.Sdl: modified Sdl wrapper to SDL.DLL (http://www.libsdl.org/download-1.2.php) to support RailDriver®. Changes are identified by "jbpi" prefixes and the main part consists to read queue content mentioned upper and to "translate" them into SDL events.
    • The second one (RailDriverCalibration) contains only one project (the application) and reuses RailDriver.dll, RailDriverLib.dll, Logger.dll, log4net.dll and PIEHidDotNet_s.dll. Images and texts are embedded as resources. Log file configuration is stored in log4net.xml.
  • By default, log files are configured to filter out debug messages but, if neccessary, this can be changed by modifying <level value="INFO"/> in <level value="DEBUG"/> in the <root> section of the two log4net.xml files.
SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Download
Config for default safety systems  3k v. 1 Feb 21, 2014, 11:53 AM RailDriver OpenBve
ċ

Download
Config for UK plugins  3k v. 1 Feb 21, 2014, 11:53 AM RailDriver OpenBve
ċ

Download
  1837k v. 1 Feb 21, 2014, 11:54 AM RailDriver OpenBve
ċ

Download
  161k v. 1 Feb 21, 2014, 11:54 AM RailDriver OpenBve
ċ

Download
  791k v. 1 Feb 21, 2014, 11:54 AM RailDriver OpenBve
ċ

Download
  211k v. 1 Feb 21, 2014, 11:55 AM RailDriver OpenBve
Comments