1. Do you need support for Assetto Corsa Competizione? Please use the proper forum below and ALWAYS zip and attach the WHOLE "Logs" folder in your c:\users\*youruser*\AppData\Local\AC2\Saved. The "AppData" folder is hidden by default, check "Hidden items" in your Windows view properties. If you report a crash, ALWAYS zip and attach the WHOLE "Crashes" folder in the same directory. Do not post "I have the same issue" in an existing thread with a game crash, always open your own thread. Do not PM developers and staff members for personal troubleshooting and support.
  2. As part of our continuous maintenance and improvements to Assetto Corsa Competizione we will be releasing small updates on a regular basis during the esports season which might not go through the usual announcement process detailing the changes until a later version update where these changes will be listed retrospectively.
  3. If ACC doesn't start with an error or the executable is missing, please add your entire Steam directory to the exceptions in your antivirus software, run a Steam integrity check or reinstall the game altogether. Make sure you add the User/Documents/Assetto Corsa Competizione folder to your antivirus/Defender exceptions and exclude it from any file sharing app (GDrive, OneDrive or Dropbox)! The Corsair iCue software is also known to conflict with Input Device initialization, if the game does not start up and you have such devices, please try disabling the iCue software and try again. [file:unknown] [line: 95] secure crt: invalid error is a sign of antivirus interference, while [Pak chunk signing mismatch on chunk] indicates a corrupted installation that requires game file verification.
  4. When reporting an issue with saved games, please always zip and attach your entire User/Documents/Assetto Corsa Competizione/Savegame folder, along with the logs and the crash folder (when reporting related to a crash).

DOCS ACC Shared Memory Documentation

Discussion in 'ACC Blog' started by Fernando Barbarossa, Aug 28, 2019.

  1. Sparten

    Sparten Racer

    Please make this thread a sticky one, and please update docs to v1.1
     
    Rolz likes this.
  2. kro

    kro Simracer

    So I have a shared mem program called dash-pi , I have 2 pads I use with it and it works with rf2, AC and a few others ...Tonight I left the pads on after racing AC and when I fired up ACC its all working !! ??o_O:rolleyes::D lol tire ware, tac ,gas, break, clutch ,wheel movement ..its all there ! what a pleasant surprise ! I did not load anything for it ..it must use the same that AC uses >?? IDK ..... I hope it still works again tomorrow ! lol
     
    Neilski likes this.
  3. WesCoraX

    WesCoraX Rookie

    Has some example about how to use this with C#? or is not possible? only with c++?
     
  4. Ensi Ferrum

    Ensi Ferrum Racer

    It is possible with C#, use it with C# as well.
    Was thinking of releasing a standalone Shared Mem reader in C# for quite a time but have no time found.
    The code I use currently is a mess to read, no comments.


    Gesendet von meinem HMA-L29 mit Tapatalk
     
    NeutroNi likes this.
  5. WesCoraX

    WesCoraX Rookie

    Could you give me just the tip about how to use in C#? I'm noob and learning C# yet.
     
  6. Berno

    Berno Racer

  7. Zeraxx

    Zeraxx Racer

    The RST software is in C# as well, RacingSimTools.com, like @Berno mentioned you want to look into marshaling. You can define a struct, and it will handle the parsing of the binary stream for you. Much handier than other languages where you need to parse the binary yourself!
     
  8. Iko Rein

    Iko Rein Racer

    First, big thank you for making the Shared Memory example + documentation available.

    I have been adapting my Telemetry tool for ACC.

    As many of my users are using the Telemetry tool on a spare Mac/Win/Linux laptop , I needed something which sends the data over network. I took the shared memory example and made it to send the different packets over UDP, so the data can be received over the network.

    I seems to work quite well in normal use, but I found one issue in my testing.

    I don't know if the issue is in the Shared Memory implementation or in ACC. This happens with the latest new 1.2 version, didn't test this with the previous version(s).

    When doing a custom race with 2 qualifications and/or 2 races, the graphics package (or memory) gets messed up, when the 1st quali/race ends.

    You can test this easily with the provided Shared Memory example like this:
    1) Select custom race, enable 2nd quali,
    1.1.) You can press keys 1, 2 or 3 in the SharedMemoryExample, you get the data
    2) Start driving in the first quali
    2.1.) If you press they keys 1, 2 or 3 in the SharedMemoryExample, it all works
    3) Drive the first quali to the end, press exit
    --> Now if you press in the SharedMemoryExample key 2, the example hangs.
    Even if you close the "handing SharedMemoryExample" and restart it, the app still hangs, when you press key 2 in the SharedMemoryExample.

    Should this be reported as a bug or what is the right way to solve this?

    Cheers.
     
  9. Ensi Ferrum

    Ensi Ferrum Racer

    @Iko Rein
    Did a quick test and I can confirm your findings.
     
  10. Iko Rein

    Iko Rein Racer

    And it is now fixed in 1.2.2. Great stuff.

    Cheers.
     
    f.e.negroni and Ensi Ferrum like this.
  11. f.e.negroni

    f.e.negroni Racer

    I am writing my own integration between ACC's Shared Memory and an Arduino board with my own dot-matrix display for TC, ABS, and several LEDs for TC, ABS and redline rpms.
    How often should I poll the shared memory for rpm changes?
    Is it updated at the rate of the Physics and Graphics engine?
     
  12. Ensi Ferrum

    Ensi Ferrum Racer

    I poll 'em with 100 Hz
     
    f.e.negroni likes this.
  13. Iko Rein

    Iko Rein Racer

    There are more physics updates than graphic updates in shared memory.

    I wrote a simple wrapper, which takes the shared memory packets and sends them via UDP to an ip address. I only send the packets, if the packetId has changed. I actually have 2 different options, either sending all packets (i.e. many physics per one graphics) or only send the latest packets, when graphics packetId has changed. My need was in creating the distance/time based telemetry graphs + race history data, so for me it was sufficient to take the data per one graphics packet as there are plenty of those too. But for a real-time RPM etc, your need is bit different, so getting the data, when physics packetId has changed is most likely the best option.

    I haven't done very detailed analysis on the rate the packetId changes, but in the loop by default the tool sleeps 5ms per loop to keep the tool behaving nicely.

    Cheers.
     
    f.e.negroni likes this.
  14. f.e.negroni

    f.e.negroni Racer

    Thank you. Yes my needs are slightly different. I am more interested in a real-time response to data changes, but luckily the device is only for output.
    I have experience with serial master-slave protocols: in my youth I played with broadcast frame accurate equipment and controlled devices using the Louth (VDCP) protocol over RS-422.
    What I will do is measure how fast the my Arduino UNO and the dot-matrix display library are.
    Like you, I am not interested in packet loss, and I don't need acks from the Arduino.
    But I do know that despite what it says, the serial buffer can fill up quite quickly, and when that happens things go a bit wrong, so I will need to establish a way to re-sync the packets.
    I also want to see how much processing I can push out to the Arduino: knowing the car, the Arduino could do BrakeBalance adjustment, and RPM redline % calculations.
    It's early days, it's a pet project, and I will learn a thing or two. Will keep you posted on developments.

    To make matters even more complicated, I currently don't have access to my simrig while developing this, so I have to come up with my own test bench:
    - run the game and capture changes to the shared memory at a poll rate of 5ms.
    - dump it in a file (playbook)
    - when at the dev station, replay the shared memory playbook as if I were at the simrig
    - test!

    The Arduino UNO will be the master, and request data at the rate that it can handle; I can even put some logic then to ensure the buffer is not filling up too quickly.
     
    Last edited: Jan 16, 2020
  15. f.e.negroni

    f.e.negroni Racer

    SHAMELESS PLUG ALERT

    I have finally got most of the functionality working in my project and I am currently running everything at the slowest update speed (testing the lower limit of what’s reasonable such as serial communication speed and display update speed) and I’m happy to say updating everything at 25 updates per second seems very acceptable to me. I could process data much faster (above 100 updates per second) but i would need to test if it’s actually noticeable.

    this is a video I took today.
    https://1drv.ms/v/s!AvkRpNN0V2R-gukMHee24brDN9wwTw
     
    ignission likes this.
  16. Neilski

    Neilski Alien

    Nice!
    It may be my brain messing with me, but it looks as though your rev lights respond more rapidly than the on-screen HUD :)
     
    f.e.negroni likes this.
  17. f.e.negroni

    f.e.negroni Racer

    Thanks!

    that is unfortunately only a matter of configuration. In the code if you look for optrpm and shiftrpm. Those are arbitrary numbers that must be entered for each car. I chose numbers for the Bentley based on what I see when capturing a live video from the game, but they might need to be fine tuned!
    For reference the numbers I currently have are 6000 for the optimum rpm, and 7250 for the shift rpm. The only number I can see in the shared memory is the max rpm which for the Bentley is fixed at 7500.
    I will populate those numbers for all the cars but if you can share those numbers with me please go ahead I’ll add you to the CREDITS file in GitHub!

    Annotation 2020-02-26 191641.png
     
    Last edited: Feb 26, 2020
    Neilski likes this.
  18. Berno

    Berno Racer

    With the news about ACC coming to console can we ask if UDP telemetry will be coming to consoles and if this time it could be a closer match to the shared memory?
    Was a great shame how limited the UDP was for AC console users.
     
    vthinsel and StryderIT like this.
  19. Tom Shane

    Tom Shane Racer

    @Fernando Barbarossa, @Lord Kunos, @Aristotelis

    Is it possible to do something with these inconsistencies in the shared memory output?

    Lap: 3 | Last Sector Time: 59157 | Sector Index: 2 | Last Lap Time: 98406 | Current Lap Time: 101346
    Lap: 3 | Last Sector Time: 59157 | Sector Index: 2 | Last Lap Time: 98406 | Current Lap Time: 101361
    Lap: 3 | Last Sector Time: 0 | Sector Index: 0 | Last Lap Time: 98406 | Current Lap Time: 3
    Lap: 3 | Last Sector Time: 0 | Sector Index: 0 | Last Lap Time: 98406 | Current Lap Time: 18
    Lap: 4 | Last Sector Time: 0 | Sector Index: 0 | Last Lap Time: 101394 | Current Lap Time: 36
    Lap: 4 | Last Sector Time: 0 | Sector Index: 0 | Last Lap Time: 101394 | Current Lap Time: 51

    The transition between laps produces inconsistent data. For some samples the lap number is not incremented (3 -> 4), but sector index is already reset to starting sector (2 -> 0). Also current lap time timer and last sector time is already reset while still reporting same (current) lap (3). With these inconsistencies it is very hard to detect and generate some crucial events.

    Also after crossing S/F line Last Sector time is reset to 0, instead of providing time for the last sector of the previous lap. Is it intended and are we supposed to calculate last sector times ourselves?

    One more thing. Would it be possible to generate for each session a GUID? It would make detecting a new session trivial.

    Thank you!
     
    Last edited: Mar 15, 2020
    Jim Britton and Neilski like this.
  20. Jim Britton

    Jim Britton Hardcore Simmer

    the spline position is also reset back to zero some time before or after the lap counter increments (can be either, IIRC). It's the same for each opponent too. I think this unsynchronized data might just be the way the game works and I don't think it's likely to change
     
Similar Threads
Forum Title Date
ACC Physics Differentiate AC and ACC Shared Memory With Different Naming. Jan 3, 2024
ACC Troubleshooting ACC Shared Memory: AC version still reports 1.7 Apr 19, 2023
ACC Troubleshooting ACC Shared Memory Example Apr 23, 2020
Programming Language - Apps - GUI Themes Shared Memory or UDP Reference for ACC ? Sep 13, 2018
ACC Multiplayer ACC dedicated server race start hangs, but only on Nordshleife Saturday at 6:06 PM
ACC Troubleshooting Access violation on game startup . The UE4-AC2 game has crashed Apr 11, 2024
ACC Multiplayer ACC Server Setting Apr 7, 2024
ACC Troubleshooting RealtimeCarUpdate.Heading/Yaw removed from ACC Broadcast UDP in favor of WorldPosZ/Elevation? Apr 4, 2024
ACC Multiplayer Missing information in ACC Server Admin Handbook Version 1.10.0 Apr 3, 2024
ACC Physics ACC inconsistensies should be addressed for the future of the game. (Ex: Braking mechanics & tracks) Apr 3, 2024
ACC PS4/PS5/XB1/XBX/S General Discussions ACC chrashed started Race in carriere modus Apr 2, 2024
Bug reports acc fov bug Apr 2, 2024
ACC Troubleshooting ACC 1.10.0 crash Nurb Nordschleife Apr 1, 2024
ACC PS4/PS5/XB1/XBX/S General Discussions ACC Will it get cross party not just cross play on consoles? Mar 23, 2024
ACC Physics Does ACC not implement real life braking mechanics?(Need some insights on this recent youtube video) Mar 16, 2024

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice