Friday 15th May, 2015
RDShark is a debugging tool for RailDriver.dll plugins. It is a train sinulator simulator, showing you what your plugin is sending, and responding in a vaguely sensible way back to the plugin.

RDshark screenshot

To install this, copy it into the plugins folder with RailDriver.dll, then run it instead of Rail Simulator while you run your plugin. If you run both this and Rail Simulator at the same time, expect strange things to happen. You can download the binary here or browse or download the source here.

Incoming messages, either 'gets' or 'sets', show up in the list box. The list box, by default, automatically scrolls to the latest get or set. You can stop it automatically scrolling by using the View -> Follow new requests menu item.

When the plugin sets a value, it shows up in the list. When the plugin requests a value, that too is logged in the list and the debugger responds (in this version it always responds with 42.0).

Note that queries from plugins about changing of locomotives don't show up in the list. They work the other way: the simulator notifies the DLL of the change of locomotive and that state just sits there until the plugin picks it up. The plugin's request for information never actually reaches the simulator program at all. To simulate a change of locomotive, use the 'send' menu, which lets you simulate a change of locomotive either with or without combined throttle and brake.

More features incoming.

posted by Rob Mitchelmore, 14:57 (anchor)
Tuesday 5th May, 2015
An important post-scriptum to the previous posts about raildriver.dll: as currently shipped, raildriver.dll is 32-bit only. When you're driving it, you should do one of two things:

If you do not do this, when your executable is run on a 64-bit OS, the executable will run in 64-bit mode, and when it tries to call the (32-bit) raildriver.dll it will raise an ImageFormatException.

posted by Rob Mitchelmore, 23:07 (anchor)
June 2015May 2015April 2015June 2014
January 2014November 2013October 2013July 2013
April 2013March 2013January 2013November 2012
older posts