Shared memory documentation?

Discussion in 'Automobilista 2 - Help & Support' started by EverlastingApex, Jul 2, 2023.

  1. EverlastingApex

    EverlastingApex Procedural Career dev

    Joined:
    Apr 28, 2023
    Messages:
    20
    Likes Received:
    20
    I can't find any info on how to read the shared memory, is there any documentation for it available?
     
  2. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    630
    Likes Received:
    201
    CREST2-AMS2 App by Viper
    and
    DRIVE:\Steam\steamapps\common\Automobilista 2\Support\SharedMemory\AMS2_SharedMemoryExampleApp\

    Don't know about others
     
  3. EverlastingApex

    EverlastingApex Procedural Career dev

    Joined:
    Apr 28, 2023
    Messages:
    20
    Likes Received:
    20
    I managed to get my app to read the UDP, but it always returns nonsense like this:

    V L � ! q : � ъ�=��6A�
    �0 �b %�bD�( =�� @�0<�ə:�F�<~�6�k������>��AJ�m��$ι�U���t=!m����>ĦT>�.}� �� �Q�Q%?���� ��a<��S<�:x<4'�<\���(���J���
    ��IIJJ�r����i��%ɻ�!� | |   ZZ[[PQPQ\\\\[[[[\\\\I I J J I I J J I I J J f{�=���=@l�=ퟶ=��<=��1=VN-=�<I��<���<�<-a)�F K��Yr<��< � � � � &�C��p@�� Soft Slick Soft Slick Soft Slick Soft Slick �|~F��Ö$�A�eDp%


    What kind of encoding does this use? I tried UTF8, Unicode and ASCII, they all come up with similar gibberish.
     
  4. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    630
    Likes Received:
    201
    Sorry if I can't help you, it's not my expertise
     
  5. Seven Smiles

    Seven Smiles New Member

    Joined:
    Jun 1, 2020
    Messages:
    12
    Likes Received:
    4
    It's binary, see "c:\Program Files (x86)\Steam\steamapps\common\Automobilista 2\Support\SharedMemory\AMS2_SharedMemoryExampleApp\SharedMemory.h" for example the tyre compounds here:


    Code:
        int        mEnforcedPitStopLap;                          // [ UNITS = in which lap there will be a mandatory pitstop] [ RANGE = 0.0f->... ] [ UNSET = -1 ]
        char    mTranslatedTrackLocation[STRING_LENGTH_MAX];  // [ string ]
        char    mTranslatedTrackVariation[STRING_LENGTH_MAX]; // [ string ]
        float    mBrakeBias;                                                                        // [ RANGE = 0.0f->1.0f... ]   [ UNSET = -1.0f ]
        float mTurboBoostPressure;
                            //    RANGE = 0.0f->1.0f... ]   [ UNSET = -1.0f ]
        char    mTyreCompound[TYRE_MAX][TYRE_COMPOUND_NAME_LENGTH_MAX];// [ strings  ]
                                
     

Share This Page