PC Ts World Raildriver And Joystick Interface

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

  1. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
    CobraOne, SGTDRE reverted back to the DTG PIE file and, at least, I am not crashing. Will start over with the interface. OK, this worked, everything is back to 'normal' with the interface. I now have the 9/21 PIE file in place in the binary folder. Now how do I get the updated one into there without causing problems again.
     
    Last edited: Nov 8, 2024
  2. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    try moving the the backups files out of the Binaries folder, what I did was make a new folder "Bckup RD Files"
    upload_2024-11-8_11-59-12.png

    And in the binaries folder I have like this, as long as you have the unused file with _bck.dll or like I did to shhow the date also the game will not see it, only the .dll will be seen and if that is incorrect in any way it will crash the game.
    upload_2024-11-8_12-1-16.png
    --
    That works to.
     
  3. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
    SGTDRE, CobraOne, Finally, maybe I have got this solved. The updated PIE file had that Net in its name and once I removed that all seems to be working with the 11/8 PIE file in place. Now, I am finding if I copy the application file to my desktop it gives me the error I noted earlier, but if I open it from the dl folder all is well. This makes no sense to me. Sorry about how scattered I seem to work. I reach out and, at the same time, am trying different things myself.
     
  4. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    Sharon E
    There is no need to copy any new files to the binaries folder as the PieHid64.dll file is the same as previous versions.
    The PieHid64Net.dll must remain in my program folder and not be placed in the binaries folder.
    You appear to be missing the SharpDX files from the program folder, did you unzip all the files from V2.0.1.0
    Your folder should look like this
    upload_2024-11-8_17-32-2.png

    If you have run the program already then you will also have a Settings folder and a Keymaps folder.
    Chris
     
  5. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    SGTDRE
    You need to edit your Master Lever Map to the right of the main form and assign the Raildriver BailOff to BailOff
    upload_2024-11-8_17-38-21.png

    Chris
     
  6. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    My program checks to see if the file in the binaries folder is the correct one, if not, my program updates it automatically. There is no need for you to copy any files over :)
    Chris
     
  7. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
    CobraOne, here is my unzipped folder for 2.0.1.0 and there is a set of SharpDX files present.
    bandicam 2024-11-08 12-55-17-110.jpg
     
  8. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    Sharon E
    You need to copy all the files and folders from inside the zip file to the folder on your desktop and then you should be OK
    Chris
     
    • Helpful Helpful x 1
  9. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Forgive my ignorance, If I am to click edit as shown, I get very few options, and when I select edit range the dropdown goes away and that is it unless I am to change in the .xml file.
    I did make a backup of .xml here
    [TSW Raildriver & Joystick Interface released CobraOne\TSW Raildriver And Joystick Interface V2.0.1.0\TSW Raildriver And Joystick Interface V2.0.1.0\KeyMaps\Master Levers], either, what I did, did not work.
    upload_2024-11-8_18-13-29.png
    upload_2024-11-8_18-12-40.png
     
  10. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Disregard my last post, I was too chicken to select "Assign Controller Axis"
    Once I did and moved the lever to Bailoff, it now looks as you showed.
    upload_2024-11-8_18-50-7.png
     
  11. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Just A Bit of an Update and A BIG Thank you CobraOne. The images Speak for themselves.
    Showing in-game, the RailDriver and your program, when I do and don't BailOff.
    Screenshot_@TSW__2024-11-09_01-55-09.jpg Screenshot_@TSW__2024-11-09_01-57-15.jpg
     
  12. jazzymanserg#1405

    jazzymanserg#1405 Member

    Joined:
    Sep 20, 2024
    Messages:
    31
    Likes Received:
    3
    Test OK )))
    1 Start game, start programm, start callback - All good (Joy working, speedometr working)
    10s - Game working, programm freeze
    disconnect speedometr (unplug it - not reset(reset no help)) - MAGIC - joystick working
    Plug speedometr -Everything working
    10s Game working, programm freeze
    -------------------------- e.t.c.
    Sometimes, game freezing when i disconnect arduino
    You might think that the reason for this is the program. May be. But its simple.
    I make it for test
    void setup() {
    Serial.begin(9600);
    }
    void loop() {
    }
    i tried change baud rate to 115200 - not help
    I believe that you will help me solve it
     
    Last edited: Nov 9, 2024
  13. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    I have just ran the game for 40 mins with a Arduino attached using your simple code above and I had no program freeze.
    I even diconnected the Arduino and reconnected it a few times with no problems.
    Can you try disconnecting everything attached to your Arduino and try again with the simple code above.
     
  14. jazzymanserg#1405

    jazzymanserg#1405 Member

    Joined:
    Sep 20, 2024
    Messages:
    31
    Likes Received:
    3
    I install VIRTUAL SERIAL PORT emulator and it some help me. So, I have arduino on com3, and create virtual com port 7 and split it with com 3. In your program write com 7. Now my speedometr working and joy working, but 20 -30 min, and then freeze, and game freeze when i disconnect arduino. I don`t understand
     
  15. jeffmorris

    jeffmorris Member

    Joined:
    Sep 26, 2023
    Messages:
    69
    Likes Received:
    18
    Next time I download new version of the software, should I install it over old version? I'm afraid of overwriting some files such as key map and lever map.
     
  16. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    You should not need to overwrite as the Program by CobraOne does not install, just keep the files in their own folders like I did and all is working well for me, make sure you copy and backup v2.0.0.8 PieHid.dll file from Steam\steamapps\common\Train Sim World 5\WindowsNoEditor\TS2Prototype\Binaries\ThirdParty\PieHid\Binaries if you ever want or need to switch back.
    I did it like this "PieHid64_bckUp_v2.0.0.8 - Copy.dll"

    I then send a shortcut to my desktop.
    upload_2024-11-10_22-58-4.png
     
  17. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    You can update the program from an older version in one of two ways.
    1. Unzip the new version and copy all the files to your previous versions folder, your keymaps and settings will not be changed.
    2. Unzip all the files to a new folder and copy the keymaps & settings folders from your previous versions to the new folder.

    If you look in the zip file, you will see there are no Keymaps or Settings folders, these are only created by the program when you first run it, if they do not already exist.
     
  18. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    I don't understand why you are using a Virtual Serial Port, you should be able to connect your Arduino on Com 3 and it should work.
    Can you try as I suggested, disconnect everything from your Arduino or if you have a spare Arduino, load the simple code you mentioned, assign the correct Com port for the Arduino and see if my program still freezes.
     
  19. jazzymanserg#1405

    jazzymanserg#1405 Member

    Joined:
    Sep 20, 2024
    Messages:
    31
    Likes Received:
    3
    Yes. I disconnect everything - clean arduino,dont use any programm and virtual ports and use simple code
    void setup() {Serial.begin(9600);}void loop() {}
    I tried Uno and Nano and 2 different arduino i tried on 3 different computers. On diferent versions 2.8. 2.9. 2.1.0.
    Sorry, but it freeze. I noticed that 1-2 seconds before freezing your programm arduino light TX stops blinking. Sometimes programm dont freeze 20 min and sometimes 1 min and crash.
    I Noticed - Restart arduino dont help me - BUT ITS HELP ME sometimes press "stop callback" and "start callback"in your pogramm. So It looks like the program is overloading some cache or memory or may be proble with some data, and i restart them when press those buttons.
     
  20. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
  21. heavypotato#6974

    heavypotato#6974 New Member

    Joined:
    Nov 11, 2024
    Messages:
    1
    Likes Received:
    0
    Hello. Was wondering if this program works with TSW5 downloaded from the xbox store on PC. Thank you!
     
  22. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    For those of us not using a serial port, is this a needed update?
     
  23. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    It should do, you will need to manually copy the PieHid64.dll file from the DefaultSettings folder into the TSW5 folder where you installed the game. The folder you need to copy the file to is "Train Sim World- 5\Content\TS2Prototype\Binaries\ThirdParty\PieHid\Binaries"
    Make a backup of the file in this location first.
     
  24. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    The long & short answer is "No" :)
     
  25. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Very Good Thank you.
     
    • Like Like x 1
  26. jazzymanserg#1405

    jazzymanserg#1405 Member

    Joined:
    Sep 20, 2024
    Messages:
    31
    Likes Received:
    3
    OHHH MEN !!!! I LOVE YOU !!! YOU SAVE ME !!!:love: GREET THX !!!!!
    7 days i broke my head !!! I tryed found mistake and write tones version of speedometr, - cleaned serial buffer by extension programm, made virtual ports, I even usedt TCP/IP for transfer serial data:)
    YOU ARE THE BEST !!!:love:
     
  27. chrispbacon#8438

    chrispbacon#8438 New Member

    Joined:
    Jul 27, 2024
    Messages:
    4
    Likes Received:
    0
    Hi, i scrolled through many pages in forums and watched a youtube video but i cant figure out how to handle the "unable to create raildriver" text that is shown in the bottom left corner of the program.

    Another guy on page 6 got the problem, but solved it by himself with selecting the Raildriver. But where? Cant do anything ingame.

    I would appreciate some help and be very thankful!
     
  28. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Did you read the Quick Start guide? It may help if you quoted the post from that page for anyone to assist, I'm not sure what you are expecting to see in the program as far as a text file.
     
  29. chrispbacon#8438

    chrispbacon#8438 New Member

    Joined:
    Jul 27, 2024
    Messages:
    4
    Likes Received:
    0
    Yes, followed the quick start Step by step with adding the .dll and so on. The problem is after starting TSW and the callback it connects to TSW but says „unable to create raildriver„

     
  30. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
    @chrispbacon#8438Just wondering,,, Does your initial screen for the interface look like this before you start callback? bandicam 2024-11-17 08-25-08-937.jpg
     
  31. jannie#6483

    jannie#6483 New Member

    Joined:
    Nov 13, 2024
    Messages:
    12
    Likes Received:
    8
    I am 90% into building my own controller, and have now switched to running the latest Cobra version V2.0.1.1.
    All is working very well, as well as the Arduino speed read-out on a 2016 LCD module.

    However, I would really prefer an OLED display, but lack the coding knowledge to convert the uploaded ino.
    Anyone of you coding wizards out there who can convert the LCD .ino to work on an I2C OLED, say 0.96 ?
    And then publish the new code on here?

    Thanks and regards
    Jannie
     
  32. chrispbacon#8438

    chrispbacon#8438 New Member

    Joined:
    Jul 27, 2024
    Messages:
    4
    Likes Received:
    0
    That is what is shown before and after. TSW is runing in background.

    If you need any more info just tell me. i´m an, as we would say in germany, a complete "dau" "stupidest user to assume".


    followed first the steps of
    after i havent got the same result, i deleted all files - started the steam repair and did from start with the QS-guide - same result

    thanks for the help and i´m sorry for bothering you..

    TSW 1.png TSW 2.png
     
  33. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    Try right clicking on the "TSW Raildriver And Joystick Interface.exe" file and selecting Run As Administrator
     
  34. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    Give me a few days and I will see what I can do for you, is it just the speed as in a number you want displayed, or do you want text as well? if so, what text?
    Chris
     
  35. jannie#6483

    jannie#6483 New Member

    Joined:
    Nov 13, 2024
    Messages:
    12
    Likes Received:
    8
    Thank you Chris. That would be magic.
    Just the speed "number" on its own is all I need.
    Much appreciated.
    Jan
     
  36. chrispbacon#8438

    chrispbacon#8438 New Member

    Joined:
    Jul 27, 2024
    Messages:
    4
    Likes Received:
    0
    Thx a lot, that did the trick.
     
  37. stuka#6016

    stuka#6016 New Member

    Joined:
    Mar 1, 2024
    Messages:
    1
    Likes Received:
    0
    Hi, jksn. I was confused by the same problem, sometimes spent hours to adjust these numbers to make it work properly. Fortunately, i spot the point.

    In your example:
    B2 - 0.20:0.30:0.36 <- doesnt work, sends 0.50
    B1 - 0.32:0.42:0.45 <- doesnt work, sends 0.50
    IDLE - 0.45:0.55:0.50 <- works

    ----please watch carefully at the last code of first group, is 0.36, it is bigger than the first code of next gruop, which is 0.32. Then watch the last code of second group, is 0.45, it equals to the first code of next group, 0.45. That's the point!
    Conclusion: the last code of each group MUST BE SMALLER than the first code of next group!
    Now check other groups that work properly. Do they hit this conclusion? Once i find out it, i never confused on notch setting and can always make a success setting in only one attempt.
    Hope it helps.
     
  38. friff

    friff New Member

    Joined:
    Mar 27, 2023
    Messages:
    13
    Likes Received:
    5
    Hi it doesnt work for me, only says unable to connect to tsw
     
  39. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
    CobraOne, You may have remembered the issue with being able to get my Rail Driver into reverse that I have brought up earlier in the thread. Well, I just installed some lines into my engine,ini file that were recommended in the thread started by JetWash on TSW5 enhancements. Somehow there is something in the added lines that cured the reverser issue and it now works as it should.
     
  40. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    Which lines are these, please? Or you could link to the post.
     
  41. friff

    friff New Member

    Joined:
    Mar 27, 2023
    Messages:
    13
    Likes Received:
    5
    WHY DOESNT IT WORK???
    Says Unable to connect to TSW
     
  42. friff

    friff New Member

    Joined:
    Mar 27, 2023
    Messages:
    13
    Likes Received:
    5
    [​IMG]
    Why does it say unable to connect to TSW
     
  43. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    Shouting won't get you an answer any quicker.
    The program is unable to communicate with TSW, this is usually caused by windows security and where you have placed the program.
    Try running the program as an Adminidtrator by right clicking on the "TSW Raildriver And Joystick Interface.exe" and selecting "Run as administrator"
     
  44. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,986
    Likes Received:
    1,960
  45. SGTDRE

    SGTDRE Well-Known Member

    Joined:
    Sep 6, 2022
    Messages:
    1,504
    Likes Received:
    790
    • Like Like x 1
  46. friff

    friff New Member

    Joined:
    Mar 27, 2023
    Messages:
    13
    Likes Received:
    5
    Already tried running as administrator. and i have it in my downloads folder
     
  47. friff

    friff New Member

    Joined:
    Mar 27, 2023
    Messages:
    13
    Likes Received:
    5
    Is there something i have to do besides unzipping the folder and running the exe to get it to work?
     
  48. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    That should not be a problem
    That should be all you need to do, but, I have found the problem in my code and am just about to release V2.0.1.2 to fix it for you (see next post). Simply extract the download into your current folder overwritting all your files, or extract them to a new folder and run the program from there.
    Chris
     
  49. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    TSW Raildriver & Joystick Interface V2.0.1.2 released.

    Fixes a bug where the location of the Steam version of TSW5 could not be ascertained for some users.

    Current users, simply extract the zip file into your current folder to keep all of your settings.
    New users, extract the folder and then run the "TSW Raildriver And Joystick Interface.exe"

    Main Program:
    https://www.dropbox.com/scl/fi/lobh...ey=8r9ih7yt8jwp2l4xmnz6w2cd0&st=eccsybws&dl=1

    Chris
     
    • Like Like x 1
  50. CobraOne

    CobraOne Active Member

    Joined:
    Jun 3, 2022
    Messages:
    251
    Likes Received:
    188
    The following link is to a zip file that you need to extract to your Arduino folder which is usually located in your Documents folder.
    Once done, you will have the 3 required Adafruit libraires in your libraries folder and a ino file called TSW_OLED_Speedometer.ino which when uploaded to your Arduino, will display the speed on the screen.
    You may need to alter the ID on line 38, it is set to 0x3C but your oled may use a different Serial Address.
    I have tested this with a 0.96 oled and it work fine.
    Chris
     

Share This Page