Shared Memory API

Discussion in 'Community Workshop' started by Mikael Hermansson, Jun 7, 2015.

  1. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    Hey Pixel,
    i went there and saw the sample scripts but for me its chinese lol
    i even dont know where to put the script in the prog or how etc
    maybe with a good tuto but i doubt it.
     
  2. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    @pixeljetstream,
    i saw your page with the analysis but there are many folder and dll. what am i suppose to do, i woulndt know where to start and what to do.
    thats why i stated i am willing to donate if someone does this for me.
     
  3. Gopher04

    Gopher04 Well-Known Member

    Joined:
    Mar 6, 2015
    Ratings:
    +211 / 0
    Be lucky if the Siminstruments dash will work again, seeings as Siminstruments guys have vanished and don't reply to anyone anymore..Yeh i know Fanaleds software works with it as well, but just isn't as good.
     
  4. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    Righty... I've constructed a grotty C# console application that copies some of the new data into the old data file and layout. I can't really test this much - I've verified that it creates the file and I can read a few things from it (position, speed, world position & acceleration and gear data). It's incomplete but does contain the player position / acceleration data and a few other bits and bobs.

    Anyone wanna test it? It's dead simple - just a .exe file that runs in the background as a console window app.

    I need to tidy up and stuff - add some options and stuff (it's currently a hard-coded subset of the data being copied, at a hard-coded 100Hz). I also need to check the code into Github and (maybe...) make a build script. It's here if anyone's brave enough to try it:

    http://crewchief.isnais.de/R3EMemoryTranslator.zip

    [edit]

    It currently copies this data:

    EngineRps, NumberOfLaps, RacePosition, ControlType, CarSpeed, MaxEngineRps, Gear, CarCgLocation, CarOrientation, LocalAcceleration, FuelLeft, FuelCapacity, FuelPressure, EngineOilPressure, ThrottlePedal, BrakePedal, ClutchPedal, BrakeTemp, TireTemp

    Along with all the high-precision PlayerData (world position, acceleration, orientation etc).

    Adding more is fairly simple, but things like opponent data & track name would be a ballache
     
    • Winner Winner x 4
    • Like Like x 2
    Last edited: Nov 20, 2016
  5. Sascha Reynders

    Sascha Reynders Well-Known Member

    Joined:
    Feb 18, 2016
    Ratings:
    +98 / 0
    Nice job Mr. B ! Just tested it and my SRD-9C is working again: rev lights, speedometer, fuel :) Even if it's not copying all available data (yet?) I'm more than happy with your app until Renovatio update their software.
    Thanks a lot, cheers !
     
  6. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    I just tryed it and guess what......it works !!!!!!
    Thank you so much Mr. B your the man :)
    everything is working perfectly as it was prior the patch, even the gear selector. i feel so good now !
    going to the track right now ;)
     
  7. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    He shoots, he scores :D

    It's a bit of a relief - I was worried I'd map the data incorrectly and motion rigs would see huge acceleration and throw you out of the window or something :)

    If anyone uses this little hack and need specific extra data adding give me a yell.

    The app adds about 10ms of latency to the data. I can improve this if needed by increasing the sample rate
     
    • Like Like x 2
    • Winner Winner x 1
  8. M4IRC1IE

    M4IRC1IE Well-Known Member

    Joined:
    Aug 23, 2015
    Ratings:
    +68 / 0
    thx Mr Belowski, was very frustrated after the patch SimHub get´s no data from r3e. I hope this will get it working. Need to test it later... But thx anyway
     
  9. Andy Blade

    Andy Blade Well-Known Member Beta tester

    Joined:
    Feb 21, 2016
    Ratings:
    +299 / 0
    Dont forget he has donate button boys !!! ;)
     
    • Like Like x 1
  10. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    @mr_belowski
    Well i just did 10 min driving and so far everything seems fine, i dindt notice the 10ms lag but after some time i can tell you more.
    and no i wasent throwed out the window :D
    Nice work indeed, you just saved R3E for a few of us,
    a big thank you Mr B :)
     
  11. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    I didnt forgot that ;)
     
  12. Andi Goodwin

    Andi Goodwin Moderator Beta tester

    Joined:
    Jan 16, 2015
    Ratings:
    +435 / 0
    dont forget guys to email/cotact your hardware suppliers so that they also do it ...

    Andi
     
  13. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    Now it's confirmed that it works, I'll add the timing data tomorrow, and some other bits and bobs and upload it all to github, time permitting. Andi - I know this is just a temporary hack that really shouldn't be necessary. It's annoying and very disappointing that some of these premium hardware vendors seem reluctant to support their expensive hardware in a timely fashion.
     
    • Agree Agree x 3
    • Like Like x 2
  14. Gopher04

    Gopher04 Well-Known Member

    Joined:
    Mar 6, 2015
    Ratings:
    +211 / 0
    Any screens of the App please?
     
  15. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    Screens of what? My little workaround app? It's just a black command window
     
  16. Gopher04

    Gopher04 Well-Known Member

    Joined:
    Mar 6, 2015
    Ratings:
    +211 / 0
    Ok.
     
  17. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    OK, uploaded my baaad code ti Github here:

    https://github.com/mrbelowski/R3EMemoryTranslator

    There's a Builds folder with the latest build - I added mappings for "LapTimePreviousSelf", "LapTimeCurrentSelf", "LapTimeBestSelf", "TimeDeltaFront", "TimeDeltaBehind" and "CutTrackWarnings"
     
    • Like Like x 1
  18. Sascha Reynders

    Sascha Reynders Well-Known Member

    Joined:
    Feb 18, 2016
    Ratings:
    +98 / 0
    You almost make me want to get out of my comfy couch, leave my glass of red wine on the table and go try it out...but alas: it'll be for another day :D But seriously, thanks again for all the time and effort you put into all of this, it's much appreciated !
     
  19. silvanob2

    silvanob2 Member

    Joined:
    Nov 2, 2015
    Ratings:
    +10 / 0
    @mr_belowski
    great addition really, thanks for all this your doing.
    there is something strange tho, when i use your trick-app, i cant use crewchief V3 at same time, it doesent work and crash everytime.
    got any ideas why?
     
  20. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,287 / 0
    Yeah, the hack just populates part of the 'old' shared memory, so any apps expecting to find sensible values in, for example, the opponent-data area or track-name area are going to see nulls or garbage. Unless these apps are defensively coded to not barf when presented with broken / missing data, they'll just fall in a big heap. Which is exactly what CrewChief V3 is doing.

    Why are you using V3?