PC Ts World Raildriver And Joystick Interface

Discussion in 'TSW General Discussion' started by CobraOne, Nov 8, 2022.

  1. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    I was wondering if it could be done using the PC editor introduced with TSW4. AFAIK it has the capability to examine the Simugraph configurations of trains, and possibility edit them. As such I was curious if that could be used to find the notch values in a more practical manner.
     
  2. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    If you are asking if Simhub can extract data from TSW then as TSW does not export any data other than speed, I would say not.
    Also looking at the list of supported games, I see that TSW is not on that list which would seem to support my conclusion, all the other games do export the necessary data, including TSC.
    Chris
     
  3. zappatime

    zappatime Well-Known Member

    Joined:
    Mar 19, 2020
    Messages:
    212
    Likes Received:
    370
    Hi Chris, DTG Matt has recently made a few comments in the TSW4 streams about an API being in testing and hinting at a release soon (though he’s also said this a few tines in the past too but nothing seemed to get any further), so maybe it might just happen
     
    • Like Like x 1
  4. troffeo#3130

    troffeo#3130 New Member

    Joined:
    Jul 17, 2022
    Messages:
    10
    Likes Received:
    3
    Many Thanks!
     
  5. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Let's hope he wasn't refering to my dll :)
     
  6. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    3,326
    Likes Received:
    18,784
    I wasn't. We have a dedicated new API now that you access via JSON requests and gives deep access to innards of the sim.

    Matt.
     
    • Like Like x 10
  7. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Hi Matt
    That's good news indeed, any idea when it will be available?
    Chris
     
  8. fizzbin14

    fizzbin14 Member

    Joined:
    Jan 22, 2022
    Messages:
    35
    Likes Received:
    3
    Hi Chris,
    I sent my feedback before I got TSW4 but I manually copied the DLL to the correct location in the TSW4 installation and it works fine.

    My only problem is with the throttle/brake lever on the 72 stock Bakerloo Line, the position for Rheo/Hold seems to be in the wrong place on the scale, any way of changing it?

    Regards
    Phil
     
  9. j.elkroc

    j.elkroc Member

    Joined:
    Mar 27, 2023
    Messages:
    61
    Likes Received:
    21
    I like to keep things simple so I use "Throttle and Brake" settings for almost all locos, except for the US ones. With TSW4 came Dresden, which I've been longing for. The loco I have issues with is the BR143. It doesn't have the usual throttle setup, but I can make do by swapping knobs on my quadrant.
    Such a shame you don't get any info out of TSWx. Need an API badly. Just think of the possibilities - the ability to track your train on Google, tracking hauling progress with an online group or service (an FSEconomy type service), even multiplayer could evolve from a third-party.
     
  10. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    I HAVE DONE A THING.
    Thanks to some advice from DTG Matt, I have now gotten some things to work, though not without some problems.

    Using the editor and creating a child blueprint of a loco's RVM file, you can select the lever component you want to view, and on the right side of the window, you should be able to see a list of notches (sometimes it's a bit weird, might depend on when the loco was developed.) Mousing over them you should see their minimum and maximum values, which should be equal for most notches, from there you can note them down and work from there.

    This is where you have to be more cognizant of the differences between the game and the interface;
    I tested this on the BCC Class 323, and had mixed results.
    The reverser has notch values of 0, 0.333, 0.667, and 1. This handled beautifully, and I was very impressed. However, when I tried the PBC, it got a bit strange. In the editor, it's values are -1, -0.6, -0.4, -0.2, 0, 0.25, 0.5, 0.75, 1. This does not translate to the RD interface however, as whilst the game considers this a range of -1 to 1 the interface still considers the "ThrottleAndBrake" axis to go from 0 to 1. As such I improvised values of 0, 0.2, 0.3, 0.4, 0.5, 0.625, 0.75, 0.875, 1. This seemed to make it happy but I noticed a problem; I couldn't access the P1 or B1 positions (0.625 and 0.4 respectively). I would move the handle slightly away from center and it would appear to go into the first notch momentarily before immediately going to the second. I don't know why this would happen or how it might be fixed, so I may need CobraOne io experiment further with this. However, I am nonetheless happy that I was able to get this working somewhat, and to prove that it can be done.

    EDIT: another issue I've found, I can't seem to make the speed display go blank after use. This probably has to be done on the software end.
     
    Last edited: Oct 2, 2023
  11. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Hi Phil
    If you mean it is physically in the wrong place in the loco, then no.
    If you mean it doesn’t line up with the controller, and it did in V3, then try the following which work for me in both V3 & V4.

    1. copy the Raildriver.ini file from your Documents\My Games\TrainSimWorld3\Saved\Config\WindowsNoEditor to
    Documents\My Games\TrainSimWorld4\Saved\Config\WindowsNoEditor

    2. Try these setting for the ThrottleAndBrake notches
    0, 0.133, 0.180, 0.239, 0.305, 0.341, 0.403, 0.450, 0.486, 0.521, 0.718, 0.953

    Chris
     
  12. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    I appreciate what you have acheived, but I'm not convinced it is any easier than the method I suggest.
    With regards the PBC values going from -1 to 1 this is common in both TSW and TSC where the lever acts as both brake and throttle or the reverser on a steam loco. The Raildriver only sends values from 0 to 254 which I translate to 0 to 1 for easy notch calculation.
    TSW takes care of the conversion to the correct values.
    I have uploaded a program I quickly wrote for you to convert the values from the TSW levers to the equivalent values for my program,
    it's called Map Calculator you can download it here
    https://www.dropbox.com/scl/fi/ckqg...ator.exe?rlkey=0jkk071v2p732qw1r74iwv23l&dl=1
    When run you will see this window
    Empty.jpg

    Here you would enter the following values for your PBC lever
    -1 for source min
    1 for source max
    and in the source value you enter the lever position value you want to calculate, -1 in this case
    You then click the Calculate button and the required value for my program is displayed in the Target value box.

    Minus 0ne.jpg

    The same, but with a source value of 0 (mid way between -1 and 1) gives

    Zero.jpg

    With regards the speed display not turning off, I will be releasing a patch later tonight to fix it.

    Chris
     
  13. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    I would say that assuming all goes well, my method may be faster, and is certainly less tedious, it does appear to have one limitation that until someone more experienced with the editor figures it out, holds my method back. It would appear that not all trains have their notches listed where I'd expect them to be. The BR143, for example, only seems to show 3 notches on the speed selector, whilst all the notches on the brake handle are shown.
    upload_2023-10-3_15-58-12.png
    According the the tooltips inside the editor, any input between the min and max values of any notch will be calculated linearly. Since it appears that all the actual speeds are within the same notch, it will require some extra calculations to find each notch for the increments of 10km/h.

    For reference, here are the notch values for the 143's brake handle:
    upload_2023-10-3_16-6-11.png
    (This is not all of them because there are too many to fit into one screenshot.)

    Finally, and perhaps most pressingly, I attempted to carry out some more testing and found out that something appears to be seriously wrong with the way the throttle works in the current version of the interface. Below is a screenshot of the notch values for the GCC Class 314
    upload_2023-10-3_17-26-26.png

    Notice that the setup appears relatively simple. in fact when using the auto-value function of the interface, these are the exact values it spits out for a 4 notch throttle. However, upon testing the Class 314 with this set up I fount that the throttle behaved erratically, being only able to access notches 2 and 4, and jittering about notch 0. The train brake also seemed to move the in-game lever slightly short of its actual notches, as it had to move itself into position, whereas the reverser did not, despite me confirming that the brakes used the same notch values as the throttle.I do not know what causes this, and I would appreciate if more people could test it, as I cannot currently determine whether the problem lies in the interface, or my hardware.
     
    Last edited: Oct 4, 2023
    • Like Like x 1
  14. fizzbin14

    fizzbin14 Member

    Joined:
    Jan 22, 2022
    Messages:
    35
    Likes Received:
    3
    Thank you Chris, that helped no end.

    Phil
     
  15. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    I'd tag CobraOne here but I don't know how.

    I am wondering if the cause of my issues is the way the interface calibrates throttle inputs. When I calibrate mine,, the extremities are shorter than what appears to be the total range available.

    Full Throttle:
    upload_2023-10-5_11-52-29.png

    Full Brake:
    upload_2023-10-5_11-52-59.png

    I am wondering if the interface is handling this correctly, as this happens with all of the levers on my RailDriver unit. Most of them seem to work fine with the interface, but the throttle lever is consistently troublesome. I'm also wondering if there is a way to get my RailDriver to use the full range of values rather than this reduced range, as it may net me some better performance.
     

    Attached Files:

  16. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    The Raildriver is designed to output a range from 0 to 255 for each lever, but unfortunately, the levers do not use the full range of the potentiometers due to the long plastic rods inside going from the levers to the pots on the circuit board at the end of the Raildriver.
    My range for the throttle is 37 to 247, this is why I have the calibration routine so that I can ascertain the range and convert it to the values fro 0 to 1. I have had no problem with this in my TS Classic version which uses the exact same code.
    I am looking again at the code for the notches to see if I can make any improvements but as the code again is taken from the TS Classic version and which works OK, I don't think there is anything I can do.
    Chris
     
  17. adam#7861

    adam#7861 New Member

    Joined:
    Oct 5, 2023
    Messages:
    17
    Likes Received:
    13
    Hi Cobra I just wanted to say a massive thank you for your program! I struggled with it at first but now I have it working perfectly on my X56! You’ve completely changed the game for me. You are amazing :)
     
  18. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Ok, that makes more sense. I am wondering would you perhaps be able to reproduce my circumstances when I discovered the VERY messed up throttle positions?
    Class 314
    Notches 0, 0.25, 0.50, 0.75, 1
    Notches enabled
    Cab lever Throttle
    Raildriver binding Throttle

    Let me know how it goes,
    Thanks so much.
     
  19. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Unfortunately I don't have the class 314 so can't test for you
     
  20. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Ok, are there any simple-ish "two handled" trains I can try that you may be able to reproduce the results from?
     
  21. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    The only loco I have with a 4 position throttle is the class 101 dmu.
    I set the Throttle to 4 notches as well as the gear lever which is assigned to the TrainBrake and they both worked perfectly without missing any notches

    I will try again tomorrow with a class 45 which has 7 or 8 notches for the throttle.
     
    Last edited: Oct 5, 2023
  22. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    So I'm trying to do some more testing, but I can't seem to get the interface to work now. Whenever I press Start Callback I get this error.
    upload_2023-10-6_8-32-17.png
     
  23. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Actually I was wrong, the 45 has 10 notches but when setup as such, my program does skip a couple, but, when I revert back to the original PieHid64.dll and don't use my program, the same thing happens, a couple of notches are skipped. Using the PC Editor it shows only 3 notches, 0 - 2

    Class 45.jpg

    Notch 2 goes from 0.1001 to 1.0 which means anything above 0.1001 is just read as a linear input as if the Raildriver had no notches assigned, so in this case, there is no real point in trying to assign any notches.
    I did some further testing with the BNSF ES44C4 which has 8 notches for the Dynamic brake and 8 notches for the Throttle I had similar results with notches being missed. Looking at the throttle only, the values sent should be between 128 and 255, here are the results


    Raildriver Values.jpg
    Also, when you calibrate the Raildriver in TSW you see this
    Advanced Controls.jpg
    In view of the results we are getting I would say that if the notches that my program creates for you don't work, then stick to using no notches.
    Chris
     
  24. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    It's hard to tell without the rest of the error message, but I suspect it may be your Loco's.txt file is corrupt.
    In your Settings folder, make a copy of the Loco's.txt file. Next, copy the Loco's.txt file from your defaultSettings folder into your Settings folder. If that doesn't work, can you post the whole error message.
    Chris
     
  25. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    TSW Raildriver & Joystick Interface V2.0.0.1 released.

    Patch for those who have V2.0.0.0 installed, simply copy the exe file to your main folder
    https://www.dropbox.com/scl/fi/cz60...face.exe?rlkey=377sqyllpvttv6qm3wl5cjjjo&dl=1

    Main Program
    https://www.dropbox.com/scl/fi/9kpl....0.1.zip?rlkey=3v63wmv60eqjkgnpye072vrac&dl=1
    Quick Start Guide
    https://www.dropbox.com/scl/fi/usv1....0.0.pdf?rlkey=r9up8ze24xtp49yyj5g4bcg5k&dl=1
    DirectX
    https://www.microsoft.com/en-gb/download/details.aspx?id=8109

    This simply turns off the Raildriver display or sets your Arduino display to zero when you click the Stop Callback button.
    Chris
     
    Last edited: Mar 24, 2024
    • Like Like x 2
    • Helpful Helpful x 1
  26. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Tried this, same error.

    `See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
    at System.Collections.Generic.List`1.get_Item(Int32 index)
    at TSW_Raildriver_And_Joystick_Interface.Form1.Connect()
    at TSW_Raildriver_And_Joystick_Interface.Form1.Poll()
    at TSW_Raildriver_And_Joystick_Interface.Form1.Start()
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    TSW Raildriver And Joystick Interface
    Assembly Version: 2.0.0.1
    Win32 Version: 2.0.0.1
    CodeBase: file:///E:/TSW%20Raildriver%20And%20Joystick%20Interface/TSW%20Raildriver%20And%20Joystick%20Interface.exe
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    SharpDX.DirectInput
    Assembly Version: 4.1.0.0
    Win32 Version: 4.1.0
    CodeBase: file:///E:/TSW%20Raildriver%20And%20Joystick%20Interface/SharpDX.DirectInput.DLL
    ----------------------------------------
    SharpDX
    Assembly Version: 4.1.0.0
    Win32 Version: 4.1.0
    CodeBase: file:///E:/TSW%20Raildriver%20And%20Joystick%20Interface/SharpDX.DLL
    ----------------------------------------
    PIEHid64Net
    Assembly Version: 2.2.5.23674
    Win32 Version: 2.1
    CodeBase: file:///E:/TSW%20Raildriver%20And%20Joystick%20Interface/PIEHid64Net.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.`
     
  27. fatnslo#7264

    fatnslo#7264 Member

    Joined:
    Jan 15, 2021
    Messages:
    43
    Likes Received:
    40
    Thanks so much for all the work you have done on this & the version you created for TSC! It is greatly appreciated!
     
  28. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    It looks like your lever map you are using may be corrupt. Can you make note of the Lever Map/ Enabled Asset, then select the ThrottleAndBrake lever map and click Start Callback to see if you still get the error.
    If you don't, then from the menu, select Keymaps\Lever Map\Copy Lever Map. In the 'Select File To Copy' box, select the ThrottleAndBrake and for the 'Enter the New File Name', select the Lever Map you noted at the start.
    Chris
     
  29. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    @Illegal Prime
    I managed to purchase the 314 for £2.21 and over the last couple of days, I have been doing some vigorous testing with the following conclussion.
    Setting the notch values as shown in the PC Editor to 0.0, 0.25, 0.5, 0.75, 1.0 as you know, does not work properly, it skips notch 2.
    Using my method, I came up with 0.00, 0.25, 0.36, 0.50, 0.74 which worked perfectly, until I recalibrated the Raildriver and again, notch 2 was skipped. Testing again with my method, the values changed to 0.00, 0.28, 0.42, 0.56, 0.70
    I also noticed that the throttle lever in the cab was twitching, yet the values sent from my program stayed constant. I then reinstated the original PieHid64.dll and noted the twitching was still evident.
    In view of these results, I would suggest that if you cannot get the notches working correctly for a particular lever/loco then stick to using no notches.
    Chris
     
    Last edited: Oct 8, 2023
  30. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Ok, good to know, and I've been doing more testing too.

    I seem to have discovered that editing a lever map corrupts it and causes the error message I noted above. For instance, I changed the lever map on the BR101 to have the loco brake lever control the AFB. But when I tried to load it in it had been corrupted, even though it had worked fine just before. Do you think there might be a fix for this, or should I delete all the default lever maps and create all new ones?
     
  31. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    I'm guessing you either changed the name of the locobrake in the first column to AFB or you created another command called AFB.
    If so, that was the problem. My program only recognises the names as used by the Raildriver i.e.
    Reverser, ThrottleAndBrake, Throttle, DynamicBrake, TrainBrake, Locobrake, Wipers and Lights. I don't have the BR101 but I do have the BR185 which has the AFB already assigned to the Locobrake lever. I would assume the BR101 is the same.

    If you load up your scenario and then go to Options\Settings\Controls\Advanced Control and then select the BR101, if you then hover your mouse over the levers and buttons on the image of the Raildriver, it will show you what each lever is assigned to.
    Although in my program you can switch which lever does what, you cannot rename them.
    I will remove the option of Adding or renaming controls from the program to save confusion.
    Chris
     
  32. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Strangely enough, it's the loco brake. Which is fine until you realize how little you use it compared to the AFB.

    Anyway, what I did was change the Cab control lever dropdown from LocoBrake to CruiseControl. I did not touch anything else, so I'm not sure if either of the things you described would be a problem.
     
  33. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    I'm in the process of removing the other names from the dropdown list as we speak, they were left over from my TSC version, it was selecting CruiseControl that caused the crash, because my program only recognises the default Raildriver levers. If you leave the Locobrake as is, then you can simply use the locobrake lever as the AFB without changing the Lever Map because that is how it is assigned in TSW.
    As I say, this was not your fault, I should have debugged the code for editing lever maps a bit better.
    Chris
     
  34. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    Wait a moment. When I used the default 101 levermap, the loco brake lever controlled the loco brake. Is this unexpected behavior?
     
  35. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    I was refering to the BR185, I don't have the BR101 which may be different.

    It may even be that the BR101 does not have a lever assigned for the AFB and instead you have to use the keyboard, the only way to find out is as quoted above. If none of the levers are assigned to the AFB, there is nothing you can do as the levers are assigned by TSW and that can't be changed.

    Chris
     
  36. Illegal Prime

    Illegal Prime Member

    Joined:
    Nov 28, 2020
    Messages:
    66
    Likes Received:
    45
    That is really unfortunate.
    Fortunately there is a mod that changes that, but it hasn't been updated for TSW4 yet so we may have to wait a bit.
     
  37. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    TSW Raildriver & Joystick Interface V2.0.0.2 released.

    Patch for those who have V2.0.0.0 or V2.0.0.1 installed, simply copy the exe file to your main folder
    https://www.dropbox.com/scl/fi/cz60...face.exe?rlkey=377sqyllpvttv6qm3wl5cjjjo&dl=1

    Main Full Program V2.0.0.2
    https://www.dropbox.com/scl/fi/lnma....0.2.zip?rlkey=oxq7q16wjcr47c1cptz63mtjm&dl=1

    Quick Start Guide v2.0.0.0
    https://www.dropbox.com/scl/fi/usv1....0.0.pdf?rlkey=r9up8ze24xtp49yyj5g4bcg5k&dl=1

    Directx

    https://www.microsoft.com/en-gb/download/details.aspx?id=8109

    Removed the option to add or delete levers in the Lever Maps and to edit the names of the controls as doing so caused the program to crash.
    Updated the user manual to reflect the changes.
    Chris
     
    Last edited: Mar 24, 2024
  38. adam#7861

    adam#7861 New Member

    Joined:
    Oct 5, 2023
    Messages:
    17
    Likes Received:
    13
    Hello, been using this for a week or so now. However only today it seems that the interface is having frequent crashes which results in my TSW4 locking up and needing to be force closed via task manager. I have the latest version, correct DirectX. No new mods have been added to my game. As say was working flawlessly yesterday and before that.
     
  39. adam#7861

    adam#7861 New Member

    Joined:
    Oct 5, 2023
    Messages:
    17
    Likes Received:
    13
    I have resolved my issue. I have to ensure I start TSW4 and load in before I launch the application. No issues now :)
     
  40. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Hi Adam
    I have been trying to recreate your issue today, without success, it should not matter which you start first and as you say, it worked fine until yesterday, i'm not sure my program is the issue.
    Still at least you have it working now:)
    Chris
     
  41. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,518
    Likes Received:
    797
    Hello Chris,
    I just downloaded your most recent TSW Raildriver program from Post 337, For the most part, the Raildriver works well with TSW2,3 & 4 for me, What I was hoping to do is get the Raildriver working with TSW2020, yes I know it's a step or two backwards and I tried to search through the thread here as well as on forums, with little success. But if what I read in the earlier posts here it will work? Or is it the older version of your program?

    I also have macroworks 3.1 installed and as of recently, I saw on the P.I. Product support website "macroworks 3.1" is not needed, I'm not sure as to what may or not work, but any advice and your assistance would be appreciated.
     
  42. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    Hi SGTDRE
    DTG Did not add support for the Raildriver until TSW2, so unfortunately my program won't work with V1 (2020).
    As support is built in from V2, you do not need Macroworks installed to use it.
    The older version of my program 'TSClassic Raildriver and Joystick Interface' is solely for Train Sim Classic and won't work with TSW.

    Chris
     
  43. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,518
    Likes Received:
    797
    Thanks for getting back to me Chris,
    I do understand macroworks is not needed for TSW2 and onward, the odd thing is, Macrroworks does see TSW1 (2020) after it's up and running, and why I thought just maybe? I guess I may have misunderstood a bit when I saw TSW2 talked about it in conjunction with your program.

    Of all the searching I did, on here and the net, I found only one other video that is three years old by the user "Yamazaki93" with links to a program on GitHub, I did check it with Virustotal, many unknown AV programs to me saw threats but not the more well known AV programs like Bitdefender saw no threat. I downloaded it and scanned it and still no threat was detected.

    Maybe you have seen or heard of and or know of the person?
     
  44. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    254
    Likes Received:
    189
    I had not heard of him until now. Looking at the program, it appears he is reading various memory locations to ascertain where the lever is in TSW and then sends keyboard keys until the Raildriver matches the lever position in memory. It is the reading of the memory that is causing a warning from your Anti-Virus software.

    Having a quick look at the code, I can't see anything that would make me suspicious of it, but then the actual program could have things in it that are not shown in the code. Use it at your own peril :)

    Chris
     
  45. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,518
    Likes Received:
    797
    Again thanks for getting back to me, I appreciate it. And thank you for all ya efforts in making our games more enjoyable.
    I will ponder what to do while getting back to TSC for a bit, My Bitdefender AV found ZERO threat, but I do use Virustotal as a double check on almost anything I download, as well as URLs, and have suggested too many to do the same, nowadays we all have to take care.
     
    • Helpful Helpful x 1
  46. tsubasawu#4769

    tsubasawu#4769 New Member

    Joined:
    Nov 14, 2023
    Messages:
    3
    Likes Received:
    0
    When I use the TSW Raildriver & Joystick Interface V2.0.0.2 in TSW4, I find a problem of the class 395(SEH 395), it does not match well. Sometimes, when I quickly switch from throttle to brake, the brakes don't respond. Conversely, the same of this when quickly switching from brake to throttle, the brakes do not release, but the throttle can works. I'm unsure what happen of this, maybe it is TSW Raildriver & Joystick Interface V2.0.0.2 bugs or not. Someone can tell me, how to fix this!

    Finally, please forgive me for my poor English, I haven't used it for a long time.
     
    Last edited: Nov 14, 2023
  47. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,518
    Likes Received:
    797
    TSW 2, 3, and 4 Have native Raildriver support, no need for any other application or program, you use "Ts World Raildriver And Joystick Interface" for TSC.
    You can calibrate it through the game under advanced controls. Hope this helps you.
     
  48. tsubasawu#4769

    tsubasawu#4769 New Member

    Joined:
    Nov 14, 2023
    Messages:
    3
    Likes Received:
    0
    Thank you for your help. I have tried it before, but the problem was still not solved, and if the calibration is not good, the problem will be more serious.
    This problem is really interesting, with the same settings, other trains can operate normally, only the class 395 cannot cooperate.:|
     
    Last edited: Nov 16, 2023
  49. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,518
    Likes Received:
    797
    I am not sure what to say here, I just did all the training modules with Class 395 with my rail driver and all worked well and I do have it calibrated within the game, TSW4, I also have Macroworks 3.1 installed, but I do not need to have it installed, I just never uninstalled it. Were you trying to do any one Timetable route or scenario?
     
  50. tsubasawu#4769

    tsubasawu#4769 New Member

    Joined:
    Nov 14, 2023
    Messages:
    3
    Likes Received:
    0
    I think I know what happened of us now.
    First, I'm sorry for my message before, maybe I didn't explain well and it let you got some misunderstanding.

    Through your message, I guess you have the raildriver and it can perfectly cooperate with TSW4, and you try to tell me, I can calibrate the raildriver through the game under advanced controls, right?

    If it is true...
    OK...
    I can tell you my situation.

    In fact, I don't have the raildriver, my joystick is "TWCS USB Throttle Controller", it is a Throttle Controller of FlySim, so when I play TSW4, the "TSW Raildriver & Joystick Interface" is very important of me, I have to use it to change my joystick signal to raildriver.

    So, the problem of my first message, I can't get perfact control with class 395, when I drive this train, sometimes the brake cannot be triggered when I try to brake, sometimes the brake cannot be released when I switch brake to neutral and want to accelerate the train, So, I think it's possible that the problem was caused by "TSW Raildriver & Joystick Interface". I try to ask someone in here, hope he or she can tell me, how to fix the "TSW Raildriver & Joystick Interface" or fix the signal to get perfect control of class 395.
     
    Last edited: Nov 16, 2023

Share This Page