Jump to content


Oovee will not accept mods/code etc ripped from other games or made from models with illegal/unsuitable copyright or not in accordance with licenses and/or forum rules. Any Mods will be removed and the user may be banned.
Only statements relating to Spintires that are posted here by Oovee staff are official statements from Oovee limited and Spin Tires

Photo

Spintires Plus


391 replies to this topic

#381 woodingot

woodingot

    Member

  • Experienced Member
  • PipPip
  • 265 posts
  • LocationEstonia

Posted 14 September 2016 - 07:04 PM

Ah thank you SupportAdditionalConstraints was the one i was missing also i noticed my gearbox was too fast so i poked around and seems UnclampedXML is also going to be essential.

 

Another question i might aswell ask is the skid steering suppose to be sticky and not automatically return to center? That is not really issue i can center it with enabling difflock but i was just wondering if i missed something maybe.

 

Edit: I have not gotten to setting up my levers yet but i wonder if they sync with steering.


Edited by woodingot, 14 September 2016 - 07:08 PM.


#382 Localhost

Localhost

    Member

  • Community Contributor
  • PipPip
  • 255 posts

Posted 14 September 2016 - 07:30 PM

Another question i might aswell ask is the skid steering suppose to be sticky and not automatically return to center? That is not really issue i can center it with enabling difflock but i was just wondering if i missed something maybe.

The skid steering system does not automatically recenters, and personally I also reset it by tapping difflock, but someone else also complained about it and it turns out you can trick the game into using backsteering by giving a very tiny steering angle instead of pure 0. SteeringAngle="1e-42" (that's one 1[insert 42 zeroes here]th of a degree) gives almost the smallest possible steering angle.

 

Edit: I have not gotten to setting up my levers yet but i wonder if they sync with steering.

If the constraints of the levers use IsLinkedSteering="true" , then yes they will sync.


  • woodingot likes this

#383 Axonn

Axonn

    "MAK3'EM BL33D"

  • Experienced Member
  • PipPip
  • 122 posts

Posted 16 September 2016 - 10:08 AM

In this ST+ v8 version, how can I change the log file to any number amount I want to set/use? I use to set each log location to 50 logs but now in this v8 version, I don't see that option available anymore compare to the ST+ v7 I can set any amount as I want.  :(


Edited by Axonn, 16 September 2016 - 10:09 AM.


#384 Localhost

Localhost

    Member

  • Community Contributor
  • PipPip
  • 255 posts

Posted 16 September 2016 - 10:19 AM

It's still Config->Gameplay->LoadPointsPerObjective, like in v7.



#385 Axonn

Axonn

    "MAK3'EM BL33D"

  • Experienced Member
  • PipPip
  • 122 posts

Posted 17 September 2016 - 08:30 AM

It's still Config->Gameplay->LoadPointsPerObjective, like in v7.

 

Oh wow, didn't knew it actually does that. I typically thought it was only for taking logs TO those OBJECTIVES to gain points, for exp: just use a carrage and gain 2 points out of 8 for the objective, but if that set to 50, I thought it would've made it set instead of 2 points into 50 points and objective in that log area completed....but I was wrong and never changed that option (Which I should've from the start but didn't. -facepalms really hard-).

 

 

But again, MANY THANKS!  ;)  Now I can get logs for hrs and hrs of running time.  B)



#386 Jkmilte Stream

Jkmilte Stream

    Newbie

  • Experienced Member
  • Pip
  • 1 posts

Posted 03 October 2016 - 03:30 AM

I'm not a huge fan of the new menus to select vehicles and maps. Is there a way to disable them?

Thanks.

#387 Localhost

Localhost

    Member

  • Community Contributor
  • PipPip
  • 255 posts

Posted 03 October 2016 - 10:19 AM

Features:

Each feature can be individually (de)activated in SpintiresPlus_config.xml.
This file is also the mod's documentation.

 



#388 Sandmansa

Sandmansa

    Member

  • Experienced Member
  • PipPip
  • 410 posts
  • LocationPhiladelphia PA

Posted 03 October 2016 - 11:47 PM

I'm not a huge fan of the new menus to select vehicles and maps. Is there a way to disable them?

Thanks.

 

Look at lines 87 and 88 in the SpintiresPlus_config.xml.  Change both values to false.



#389 Olsen

Olsen

    Member

  • Experienced Member
  • PipPip
  • 12 posts
  • LocationDenmark

Posted 15 October 2016 - 10:58 AM

I really hope that SP+ will be compatible for a loooooong time.

 

I have turned off most of the SP+ mods, but I like two things a lot:

 

Battery operated winch. In real life, I am the happy owner of a 50 years old Land-Rover and I have a Warn 9000 electrical winch on that. I have used my winch several times to move my Land-Rover even though I could not start the engine for one reason or the other. Okay ... there are PTO driven winches around - but they are mostly antique and hard to get.

 

The free camera movements. Often it was quite difficult to get a good camera angel for an operation. It is much easier to get a view of the whole picture with SP+. Critics might call that cheating, but in real life the driver (or co-driver) will get out of the car to check out the terrain on foot.

Thanks a lot for making SpinTires a bit better!

 

Best regards

Per


  • woodingot, Axonn and >Forces< like this

#390 Fredrik_Eriksson

Fredrik_Eriksson

    Newbie

  • Experienced Member
  • Pip
  • 8 posts

Posted 24 October 2016 - 07:27 PM

Awesome @Localhost !  :)  I just tried the new version of ST+, and i like it :)  All that's left to do now is to regroup all the vehicles. Too bad that you're giving up on ST+. Regardless of what some d*******s thinks, it's great :)


  • Axonn likes this

#391 Miaou

Miaou

    Newbie

  • Experienced Member
  • Pip
  • 1 posts

Posted 06 January 2017 - 03:55 PM

Hi,
 
 
First I would like to thank you for your work, it is awesome.

I found your post about stopping ST+ dev. In particular, I agree with:

now I'm thinking it would take a change of physics engine to make this game realistic

I agree more and more with you about that.
 
However, these two following situations lead me to mods (and to your mod):

  • Fuel consumption. When you are with a C-4320 on a main road, almost at the highest speed, you burn 25L/min, but at highest speed, you burn like 12L/min...
  • Auto gearbox. It's aggressively downshifting. Examples: on a road, you go through a mud splash while in gear 5, and sometimes the gearbox shifts down to gear 3 or 2; in the mud, you're in 2, it suddenly upshift to 3, but then the truck stalls in the mud, and the gearbox downshifts back to 1, if you are lucky and don't stop...

I think this game is overall balanced, and I wish to try and change these annoying things. I understand you stopped the dev, but can you help me do it?
 
I see the ST+ SkidSteering, and I think it is possible and interesting to put a better torque model, as you did:

-STP uses the an engine map inspired by a Caterpillar C15, that means:
        50% to full torque from 0 to 1000 RPM
        full torque from 1000 to 1500RPM
        full to 0 torque from 1500 to 3500RPM.

I think 50% torque @ 0 RPM should not be ok, but with realistic no torque @ 0 RPM, you need to model a clutch, so it's a clever way to not model a clutch!
 
I understand your dll injection and the hotpatching of the game functions through the assembly identification of the game functions. I see that your torque model plugins in at UniqueSignatures[CalculateTorqueToApplyOnWheel].
What do you think is the best solution?
- modify the proxy dll source and plug my future function there, in place of CalculateTorqueToApplyOnWheel, and modify the function to retrieve a GlobalSettings and decide whether its my torque patch or the SkidSteering addon,
- use the plugin system and make a new dll, but in this case, do you use the UniqueSignatures to patch the same assembly functions? Could you guide me through this process?
 
 
For the fuel consumption, I think you know where the code is, as you stated "and fuel calcualtion forumal is FUBAR (not even homogenous)", could you please help me make a signature for this function?
 
I think a first model, where consumption is roughly proportional to RPM*available_torque*Truck->ThrottleRatio (if I understand ThrottleRatio correctly). More complex model could be deduced from such diagrams.

 

Do you have any idea on where I could find the auto gearbox function, and what variables I would need to make a sequential one?

 

 

Many thanks.



#392 Localhost

Localhost

    Member

  • Community Contributor
  • PipPip
  • 255 posts

Posted 10 January 2017 - 08:15 PM

I understand your dll injection and the hotpatching of the game functions through the assembly identification of the game functions. I see that your torque model plugins in at UniqueSignatures[CalculateTorqueToApplyOnWheel].
What do you think is the best solution?
- modify the proxy dll source and plug my future function there, in place of CalculateTorqueToApplyOnWheel, and modify the function to retrieve a GlobalSettings and decide whether its my torque patch or the SkidSteering addon,

Better:
-create a new global setting, to allow user to use your torque algo or not.
-find the calls to ApplyTorqueOnWheels_Real, and call your torque function here instead of the game's according to user setting.
 

Or you can investigate the DoEngineMap mentionned below, but I'm not sure it does what I think it does.

- use the plugin system and make a new dll, but in this case, do you use the UniqueSignatures to patch the same assembly functions? Could you guide me through this process?

If you use the same signature from plugin and patch the same bytes then the main dll wont find the signatures anymore, so to preserve functionality you'll have to re-implement all the features you disable in your dll, or call the main dll's function from your plugin, which would need them to be exported.
 
TBH plugin support is extremely basic and I expected to expand it based on requests/problems encountered... but seems like nobody used it (save for SweetFX users) so feel free to adapt it to your needs. For example you could create a bool TorqueMap(const char* TruckName) interface called from ApplyTorqueOnWheels for all plugins that export such function.
TruckName would be used to determine if a specific engine maps applies to this truck or not.
 
 

For the fuel consumption, I think you know where the code is, as you stated "and fuel calcualtion forumal is FUBAR (not even homogenous)", could you please help me make a signature for this function?

Grab cheat engine, and read tutorials about "AOBscan", that's how they usually call signatures. Once you have one, post it there and I'll tell you if it looks good.

To speed up the process, let's skip the part where you have to study the code to locate the function you're looking for. if my notes are correct this is the function that calculates fuel consumption:

00AC4520 >/$ 55             PUSH EBP                                 ;  CalculateFuelConsumption
00AC4521  |. 8BEC           MOV EBP,ESP
00AC4523  |. 83E4 F8        AND ESP,FFFFFFF8
00AC4526  |. 83EC 18        SUB ESP,18
00AC4529  |. 53             PUSH EBX
00AC452A  |. 57             PUSH EDI
00AC452B  |. 8B7E 0C        MOV EDI,DWORD PTR [ESI+C]
00AC452E  |. 8B5F 54        MOV EBX,DWORD PTR [EDI+54]
00AC4531  |. 85DB           TEST EBX,EBX
00AC4533  |. 7D 1A          JGE SHORT SpinTire.00AC454F
00AC4535  |. 8B47 4C        MOV EAX,DWORD PTR [EDI+4C]
00AC4538  |. 2B47 48        SUB EAX,DWORD PTR [EDI+48]
00AC453B  |. C1F8 02        SAR EAX,2
00AC453E  |. 85C0           TEST EAX,EAX
00AC4540  |. 77 06          JA SHORT SpinTire.00AC4548
00AC4542  |. FF15 A8D5BC00  CALL DWORD PTR [<&MSVCR90._invalid_param>;  MSVCR90._invalid_parameter_noinfo
00AC4548  |> 8B4F 48        MOV ECX,DWORD PTR [EDI+48]
00AC454B  |. D901           FLD DWORD PTR [ECX]
00AC454D  |. EB 1F          JMP SHORT SpinTire.00AC456E
00AC454F  |> 0F8E A9010000  JLE SpinTire.00AC46FE
00AC4555  |. 8B57 4C        MOV EDX,DWORD PTR [EDI+4C]
00AC4558  |. 2B57 48        SUB EDX,DWORD PTR [EDI+48]
00AC455B  |. C1FA 02        SAR EDX,2
00AC455E  |. 3BDA           CMP EBX,EDX
00AC4560  |. 72 06          JB SHORT SpinTire.00AC4568
00AC4562  |. FF15 A8D5BC00  CALL DWORD PTR [<&MSVCR90._invalid_param>;  MSVCR90._invalid_parameter_noinfo
00AC4568  |> 8B47 48        MOV EAX,DWORD PTR [EDI+48]
00AC456B  |. D90498         FLD DWORD PTR [EAX+EBX*4]
00AC456E  |> D95C24 10      FSTP DWORD PTR [ESP+10]
00AC4572  |. D9EE           FLDZ
00AC4574  |. D94424 10      FLD DWORD PTR [ESP+10]
00AC4578  |. D8D1           FCOM ST(1)
00AC457A  |. DFE0           FSTSW AX
00AC457C  |. DDD9           FSTP ST(1)
00AC457E  |. F6C4 05        TEST AH,5
00AC4581  |. 0F8B 75010000  JPO SpinTire.00AC46FC
00AC4587  |. 8B4E 0C        MOV ECX,DWORD PTR [ESI+C]
00AC458A  |. 8B51 4C        MOV EDX,DWORD PTR [ECX+4C]
00AC458D  |. 2B51 48        SUB EDX,DWORD PTR [ECX+48]
00AC4590  |. F7C2 FCFFFFFF  TEST EDX,FFFFFFFC
00AC4596  |. 75 04          JNZ SHORT SpinTire.00AC459C
00AC4598  |. 33C0           XOR EAX,EAX
00AC459A  |. EB 0C          JMP SHORT SpinTire.00AC45A8
00AC459C  |> 8B41 4C        MOV EAX,DWORD PTR [ECX+4C]
00AC459F  |. 2B41 48        SUB EAX,DWORD PTR [ECX+48]
00AC45A2  |. C1F8 02        SAR EAX,2
00AC45A5  |. 83E8 02        SUB EAX,2
00AC45A8  |> 40             INC EAX
00AC45A9  |. 3BD8           CMP EBX,EAX
00AC45AB  |. 0F85 09010000  JNZ SpinTire.00AC46BA
00AC45B1  |. DDD8           FSTP ST(0)
00AC45B3  |. D941 38        FLD DWORD PTR [ECX+38]
00AC45B6  |. DC0D B080C300  FMUL QWORD PTR [C380B0]
00AC45BC  |> 8B86 48010000  MOV EAX,DWORD PTR [ESI+148]
00AC45C2  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00AC45C6  |. 2B86 44010000  SUB EAX,DWORD PTR [ESI+144]
00AC45CC  |. D9EE           FLDZ
00AC45CE  |. 33FF           XOR EDI,EDI
00AC45D0  |. D95C24 0C      FSTP DWORD PTR [ESP+C]
00AC45D4  |. C1F8 02        SAR EAX,2
00AC45D7  |. 85C0           TEST EAX,EAX
00AC45D9  |. 0F86 80000000  JBE SpinTire.00AC465F
00AC45DF  |> 8B8E 48010000  /MOV ECX,DWORD PTR [ESI+148]
00AC45E5  |. 2B8E 44010000  |SUB ECX,DWORD PTR [ESI+144]
00AC45EB  |. C1F9 02        |SAR ECX,2
00AC45EE  |. 3BF9           |CMP EDI,ECX
00AC45F0  |. 72 06          |JB SHORT SpinTire.00AC45F8
00AC45F2  |. FF15 A8D5BC00  |CALL DWORD PTR [<&MSVCR90._invalid_para>;  MSVCR90._invalid_parameter_noinfo
00AC45F8  |> 8B96 44010000  |MOV EDX,DWORD PTR [ESI+144]             ;  esi=&TruckChassis
00AC45FE  |. 8B04BA         |MOV EAX,DWORD PTR [EDX+EDI*4]
00AC4601  |. 8B98 38010000  |MOV EBX,DWORD PTR [EAX+138]             ;  eax=&MountedWheel
00AC4607  |. 837B 7C 01     |CMP DWORD PTR [EBX+7C],1                ;  ebx=&Wheelparams
00AC460B  |. 75 3E          |JNZ SHORT SpinTire.00AC464B
00AC460D  |. D983 E0000000  |FLD DWORD PTR [EBX+E0]                  ;  wheelspeed
00AC4613  |. 51             |PUSH ECX                                ; /Arg1
00AC4614  |. D91C24         |FSTP DWORD PTR [ESP]                    ; |
00AC4617  |. E8 94FB93FF    |CALL <SpinTire.FloatAbs>                ; \FloatAbs
00AC461C  |. D95C24 1C      |FSTP DWORD PTR [ESP+1C]
00AC4620  |. 83C4 04        |ADD ESP,4
00AC4623  |. D943 74        |FLD DWORD PTR [EBX+74]                  ;  substance friction
00AC4626  |. DD05 D080C300  |FLD QWORD PTR [C380D0]
00AC462C  |. E8 DBC5DEFF    |CALL <JMP.&MSVCR90._CIpow>              ;  returns substancefriction^4
00AC4631  |. D95C24 14      |FSTP DWORD PTR [ESP+14]
00AC4635  |. D94424 14      |FLD DWORD PTR [ESP+14]
00AC4639  |. D84C24 18      |FMUL DWORD PTR [ESP+18]
00AC463D  |. DC0D F082C300  |FMUL QWORD PTR [C382F0]                 ;  0.002*abs(angvel)*substance friction^4
00AC4643  |. D84424 0C      |FADD DWORD PTR [ESP+C]
00AC4647  |. D95C24 0C      |FSTP DWORD PTR [ESP+C]
00AC464B  |> 8B8E 48010000  |MOV ECX,DWORD PTR [ESI+148]
00AC4651  |. 2B8E 44010000  |SUB ECX,DWORD PTR [ESI+144]
00AC4657  |. 47             |INC EDI
00AC4658  |. C1F9 02        |SAR ECX,2
00AC465B  |. 3BF9           |CMP EDI,ECX
00AC465D  |.^72 80          \JB SHORT SpinTire.00AC45DF
00AC465F  |> 837E 64 02     CMP DWORD PTR [ESI+64],2
00AC4663  |. 75 0E          JNZ SHORT SpinTire.00AC4673
00AC4665  |. D94424 0C      FLD DWORD PTR [ESP+C]
00AC4669  |. DC0D B882C300  FMUL QWORD PTR [C382B8]
00AC466F  |. D95C24 0C      FSTP DWORD PTR [ESP+C]
00AC4673  |> D94424 10      FLD DWORD PTR [ESP+10]                   ;  load max torque
00AC4677  |. 8B56 0C        MOV EDX,DWORD PTR [ESI+C]
00AC467A  |. 807A 2A 00     CMP BYTE PTR [EDX+2A],0
00AC467E  |. DC0D E882C300  FMUL QWORD PTR [C382E8]                  ;  max torque*2e-6
00AC4684  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00AC4688  |. 74 0E          JE SHORT SpinTire.00AC4698
00AC468A  |. D94424 10      FLD DWORD PTR [ESP+10]
00AC468E  |. DC0D E082C300  FMUL QWORD PTR [C382E0]
00AC4694  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00AC4698  |> 6A 01          PUSH 1                                   ; /Arg3 = 00000001
00AC469A  |. 6A 00          PUSH 0                                   ; |Arg2 = 00000000
00AC469C  |. 56             PUSH ESI                                 ; |Arg1
00AC469D  |. E8 EEFCFFFF    CALL SpinTire.00AC4390                   ; \SpinTire.00AC4390
00AC46A2  |. D94424 10      FLD DWORD PTR [ESP+10]
00AC46A6  |. D84424 0C      FADD DWORD PTR [ESP+C]
00AC46AA  |. DEC9           FMULP ST(1),ST(0)
00AC46AC  |. D95C24 18      FSTP DWORD PTR [ESP+18]
00AC46B0  |. D94424 18      FLD DWORD PTR [ESP+18]
00AC46B4  |. 5F             POP EDI
00AC46B5  |. 5B             POP EBX
00AC46B6  |. 8BE5           MOV ESP,EBP
00AC46B8  |. 5D             POP EBP
00AC46B9  |. C3             RETN
00AC46BA  |> DD05 507FC300  FLD QWORD PTR [C37F50]
00AC46C0  |. DCC9           FMUL ST(1),ST(0)
00AC46C2  |. D9E8           FLD1
00AC46C4  |. D8D2           FCOM ST(2)
00AC46C6  |. DFE0           FSTSW AX
00AC46C8  |. F6C4 05        TEST AH,5
00AC46CB  |. 7A 04          JPE SHORT SpinTire.00AC46D1
00AC46CD  |. DDD8           FSTP ST(0)
00AC46CF  |. EB 02          JMP SHORT SpinTire.00AC46D3
00AC46D1  |> DDDA           FSTP ST(2)
00AC46D3  |> D941 38        FLD DWORD PTR [ECX+38]                   ;  load max torque
00AC46D6  |. DD5C24 18      FSTP QWORD PTR [ESP+18]
00AC46DA  |. D9C9           FXCH ST(1)
00AC46DC  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00AC46E0  |. D94424 10      FLD DWORD PTR [ESP+10]
00AC46E4  |. D9C9           FXCH ST(1)                               ;  basically calculates max torque/sqrt(1)
00AC46E6  |. E8 21C5DEFF    CALL <JMP.&MSVCR90._CIpow>
00AC46EB  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00AC46EF  |. D94424 10      FLD DWORD PTR [ESP+10]
00AC46F3  |. DC7C24 18      FDIVR QWORD PTR [ESP+18]
00AC46F7  |.^E9 C0FEFFFF    JMP SpinTire.00AC45BC
00AC46FC  |> DDD8           FSTP ST(0)
00AC46FE  |> D9EE           FLDZ
00AC4700  |. 5F             POP EDI
00AC4701  |. 5B             POP EBX
00AC4702  |. 8BE5           MOV ESP,EBP
00AC4704  |. 5D             POP EBP
00AC4705  \. C3             RETN
I think a first model, where consumption is roughly proportional to RPM*available_torque*Truck->ThrottleRatio (if I understand ThrottleRatio correctly). More complex model could be deduced from such diagrams.

IIRC ThrottleRatio is just how far you are engaged on the 1st/reverse gears.

 

But yeah,  a first approximation model can be linear:

fuel consumption in litter per second = SumOf(wheel torque * wheel speed in rad/s) / ( 1 [transmission efficiency] * 0.3 [typical engine efficiency] * 35.8e6 [diesel energy per litter] )

 

Then you have human time to game time conversion...

 

 

Do you have any idea on where I could find the auto gearbox function, and what variables I would need to make a sequential one?

It might be there, if not investigate what this code calls or what calls it:

00A952C0  /$ 83EC 18        SUB ESP,18
00A952C3  |. 53             PUSH EBX
00A952C4  |. 8B5C24 20      MOV EBX,DWORD PTR [ESP+20]
00A952C8  |. D983 88000000  FLD DWORD PTR [EBX+88]
00A952CE  |. 55             PUSH EBP
00A952CF  |. D86424 2C      FSUB DWORD PTR [ESP+2C]
00A952D3  |. 56             PUSH ESI
00A952D4  |. D9EE           FLDZ
00A952D6  |. 57             PUSH EDI
00A952D7  |. D8D1           FCOM ST(1)
00A952D9  |. DFE0           FSTSW AX
00A952DB  |. F6C4 41        TEST AH,41
00A952DE  |. 75 04          JNZ SHORT SpinTire.00A952E4
00A952E0  |. DDD9           FSTP ST(1)
00A952E2  |. EB 02          JMP SHORT SpinTire.00A952E6
00A952E4  |> DDD8           FSTP ST(0)
00A952E6  |> 8B4B 18        MOV ECX,DWORD PTR [EBX+18]
00A952E9  |. D99B 88000000  FSTP DWORD PTR [EBX+88]
00A952EF  |. 8B41 0C        MOV EAX,DWORD PTR [ECX+C]
00A952F2  |. 8B50 4C        MOV EDX,DWORD PTR [EAX+4C]
00A952F5  |. 2B50 48        SUB EDX,DWORD PTR [EAX+48]
00A952F8  |. F7C2 FCFFFFFF  TEST EDX,FFFFFFFC
00A952FE  |. 0F84 62020000  JE SpinTire.00A95566
00A95304  |. 8B50 4C        MOV EDX,DWORD PTR [EAX+4C]
00A95307  |. 2B50 48        SUB EDX,DWORD PTR [EAX+48]
00A9530A  |. C1FA 02        SAR EDX,2
00A9530D  |. 83EA 02        SUB EDX,2
00A95310  |. 0F84 50020000  JE SpinTire.00A95566
00A95316  |. 8078 2B 00     CMP BYTE PTR [EAX+2B],0
00A9531A  |. 0F84 46020000  JE SpinTire.00A95566
00A95320  |. 8378 54 00     CMP DWORD PTR [EAX+54],0
00A95324  |. 75 07          JNZ SHORT SpinTire.00A9532D
00A95326  |. C740 54 010000>MOV DWORD PTR [EAX+54],1
00A9532D  |> 8B73 18        MOV ESI,DWORD PTR [EBX+18]
00A95330  |. 6A 00          PUSH 0
00A95332  |. 6A 00          PUSH 0
00A95334  |. E8 E7EE0200    CALL SpinTire.00AC4220
00A95339  |. D95C24 10      FSTP DWORD PTR [ESP+10]
00A9533D  |. 8B7B 18        MOV EDI,DWORD PTR [EBX+18]
00A95340  |. D9EE           FLDZ
00A95342  |. 8B47 08        MOV EAX,DWORD PTR [EDI+8]
00A95345  |. D95C24 2C      FSTP DWORD PTR [ESP+2C]
00A95349  |. 8B80 50010000  MOV EAX,DWORD PTR [EAX+150]
00A9534F  |. 8D88 F0000000  LEA ECX,DWORD PTR [EAX+F0]
00A95355  |. 05 B0010000    ADD EAX,1B0
00A9535A  |. BA 03000000    MOV EDX,3
00A9535F  |. 90             NOP
00A95360  |> D900           /FLD DWORD PTR [EAX]
00A95362  |. 83C0 04        |ADD EAX,4
00A95365  |. D809           |FMUL DWORD PTR [ECX]
00A95367  |. 83C1 04        |ADD ECX,4
00A9536A  |. 83EA 01        |SUB EDX,1
00A9536D  |. D84424 2C      |FADD DWORD PTR [ESP+2C]
00A95371  |. D95C24 2C      |FSTP DWORD PTR [ESP+2C]
00A95375  |.^75 E9          \JNZ SHORT SpinTire.00A95360
00A95377  |. 8D4C24 14      LEA ECX,DWORD PTR [ESP+14]
00A9537B  |. 51             PUSH ECX                                 ; /Arg6
00A9537C  |. 8D5424 1C      LEA EDX,DWORD PTR [ESP+1C]               ; |
00A95380  |. 52             PUSH EDX                                 ; |Arg5
00A95381  |. 8D4424 24      LEA EAX,DWORD PTR [ESP+24]               ; |
00A95385  |. 50             PUSH EAX                                 ; |Arg4
00A95386  |. 8B43 54        MOV EAX,DWORD PTR [EBX+54]               ; |
00A95389  |. 8D4C24 2C      LEA ECX,DWORD PTR [ESP+2C]               ; |
00A9538D  |. 51             PUSH ECX                                 ; |Arg3
00A9538E  |. 8D5424 34      LEA EDX,DWORD PTR [ESP+34]               ; |
00A95392  |. 52             PUSH EDX                                 ; |Arg2
00A95393  |. 50             PUSH EAX                                 ; |Arg1
00A95394  |. E8 97EB0200    CALL <SpinTire.DoEngineMap>              ; \DoEngineMap
00A95399  |. 84C0           TEST AL,AL
00A9539B  |. 0F84 C5010000  JE SpinTire.00A95566
00A953A1  |. 8B7B 54        MOV EDI,DWORD PTR [EBX+54]               ;  load selected gear
00A953A4  |. D905 C044C300  FLD DWORD PTR [C344C0]
00A953AA  |. 897C24 18      MOV DWORD PTR [ESP+18],EDI
00A953AE  |. 8BF7           MOV ESI,EDI
00A953B0  |. 85FF           TEST EDI,EDI
00A953B2  |. 7D 45          JGE SHORT SpinTire.00A953F9
00A953B4  |. D905 8083C300  FLD DWORD PTR [C38380]
00A953BA  |. D85C24 2C      FCOMP DWORD PTR [ESP+2C]
00A953BE  |. DFE0           FSTSW AX
00A953C0  |. F6C4 05        TEST AH,5
00A953C3  |. 0F8A EA000000  JPE SpinTire.00A954B3
00A953C9  |. D905 340EC300  FLD DWORD PTR [C30E34]
00A953CF  |. D85C24 30      FCOMP DWORD PTR [ESP+30]
00A953D3  |. DFE0           FSTSW AX
00A953D5  |. F6C4 05        TEST AH,5
00A953D8  |. 0F8A D5000000  JPE SpinTire.00A954B3
00A953DE  |. D9E8           FLD1
00A953E0  |. D85C24 10      FCOMP DWORD PTR [ESP+10]
00A953E4  |. DFE0           FSTSW AX
00A953E6  |. F6C4 41        TEST AH,41
00A953E9  |. 0F85 C4000000  JNZ SpinTire.00A954B3
00A953EF  |. BE 01000000    MOV ESI,1
00A953F4  |. E9 BA000000    JMP SpinTire.00A954B3
00A953F9  |> D94424 14      FLD DWORD PTR [ESP+14]
00A953FD  |. DC15 7080C300  FCOM QWORD PTR [C38070]
00A95403  |. DFE0           FSTSW AX
00A95405  |. D94424 2C      FLD DWORD PTR [ESP+2C]
00A95409  |. F6C4 41        TEST AH,41
00A9540C  |. 75 27          JNZ SHORT SpinTire.00A95435
00A9540E  |. D8D1           FCOM ST(1)
00A95410  |. DFE0           FSTSW AX
00A95412  |. DDD9           FSTP ST(1)
00A95414  |. F6C4 41        TEST AH,41
00A95417  |. 75 1E          JNZ SHORT SpinTire.00A95437
00A95419  |. 8B6B 18        MOV EBP,DWORD PTR [EBX+18]
00A9541C  |. 8BC5           MOV EAX,EBP
00A9541E  |. 8D77 01        LEA ESI,DWORD PTR [EDI+1]
00A95421  |. E8 9AE70200    CALL <SpinTire.GetMaxGear>
00A95426  |. 3BC6           CMP EAX,ESI
00A95428  |. 73 5F          JNB SHORT SpinTire.00A95489
00A9542A  |. 8BC5           MOV EAX,EBP
00A9542C  |. E8 8FE70200    CALL <SpinTire.GetMaxGear>
00A95431  |. 8BF0           MOV ESI,EAX
00A95433  |. EB 54          JMP SHORT SpinTire.00A95489
00A95435  |> DDD9           FSTP ST(1)
00A95437  |> 83FF 01        CMP EDI,1
00A9543A  |. 7E 4D          JLE SHORT SpinTire.00A95489
00A9543C  |. DDD8           FSTP ST(0)
00A9543E  |> 8B7B 18        /MOV EDI,DWORD PTR [EBX+18]
00A95441  |. DDD8           |FSTP ST(0)
00A95443  |. 8D4C24 14      |LEA ECX,DWORD PTR [ESP+14]
00A95447  |. 51             |PUSH ECX                                ; /Arg6
00A95448  |. 6A 00          |PUSH 0                                  ; |Arg5 = 00000000
00A9544A  |. 6A 00          |PUSH 0                                  ; |Arg4 = 00000000
00A9544C  |. 6A 00          |PUSH 0                                  ; |Arg3 = 00000000
00A9544E  |. 6A 00          |PUSH 0                                  ; |Arg2 = 00000000
00A95450  |. 8D6E FF        |LEA EBP,DWORD PTR [ESI-1]               ; |
00A95453  |. 55             |PUSH EBP                                ; |Arg1
00A95454  |. E8 D7EA0200    |CALL <SpinTire.DoEngineMap>             ; \DoEngineMap
00A95459  |. D94424 2C      |FLD DWORD PTR [ESP+2C]
00A9545D  |. D94424 14      |FLD DWORD PTR [ESP+14]
00A95461  |. DC0D E881C300  |FMUL QWORD PTR [C381E8]
00A95467  |. DC25 9080C300  |FSUB QWORD PTR [C38090]
00A9546D  |. D8D9           |FCOMP ST(1)
00A9546F  |. DFE0           |FSTSW AX
00A95471  |. F6C4 05        |TEST AH,5
00A95474  |. 7B 07          |JPO SHORT SpinTire.00A9547D
00A95476  |. 8BF5           |MOV ESI,EBP
00A95478  |. 83FE 01        |CMP ESI,1
00A9547B  |.^7F C1          \JG SHORT SpinTire.00A9543E
00A9547D  |> D905 C044C300  FLD DWORD PTR [C344C0]
00A95483  |. 8B7C24 18      MOV EDI,DWORD PTR [ESP+18]
00A95487  |. D9C9           FXCH ST(1)
00A95489  |> D8D9           FCOMP ST(1)
00A9548B  |. DFE0           FSTSW AX
00A9548D  |. F6C4 05        TEST AH,5
00A95490  |. 7A 21          JPE SHORT SpinTire.00A954B3
00A95492  |. D905 340EC300  FLD DWORD PTR [C30E34]
00A95498  |. D85C24 30      FCOMP DWORD PTR [ESP+30]
00A9549C  |. DFE0           FSTSW AX
00A9549E  |. F6C4 05        TEST AH,5
00A954A1  |. 7A 10          JPE SHORT SpinTire.00A954B3
00A954A3  |. D9E8           FLD1
00A954A5  |. D85C24 10      FCOMP DWORD PTR [ESP+10]
00A954A9  |. DFE0           FSTSW AX
00A954AB  |. F6C4 41        TEST AH,41
00A954AE  |. 75 03          JNZ SHORT SpinTire.00A954B3
00A954B0  |. 83CE FF        OR ESI,FFFFFFFF
00A954B3  |> 39B3 90000000  CMP DWORD PTR [EBX+90],ESI
00A954B9  |. 74 46          JE SHORT SpinTire.00A95501
00A954BB  |. 83FE FF        CMP ESI,-1
00A954BE  |. 74 33          JE SHORT SpinTire.00A954F3
00A954C0  |. 85F6           TEST ESI,ESI
00A954C2  |. 74 2F          JE SHORT SpinTire.00A954F3
00A954C4  |. 3BF7           CMP ESI,EDI
00A954C6  |. 7E 23          JLE SHORT SpinTire.00A954EB              ;  jump if shifting down
00A954C8  |. 83FE 01        CMP ESI,1
00A954CB  |. 74 08          JE SHORT SpinTire.00A954D5
00A954CD  |. DDD8           FSTP ST(0)
00A954CF  |. D905 B422C300  FLD DWORD PTR [C322B4]
00A954D5  |> D95C24 30      FSTP DWORD PTR [ESP+30]
00A954D9  |. 89B3 90000000  MOV DWORD PTR [EBX+90],ESI               ;  write desired gear?
00A954DF  |. D94424 30      FLD DWORD PTR [ESP+30]
00A954E3  |. D99B 8C000000  FSTP DWORD PTR [EBX+8C]
00A954E9  |. EB 18          JMP SHORT SpinTire.00A95503
00A954EB  |> DDD8           FSTP ST(0)
00A954ED  |. D905 4C38C300  FLD DWORD PTR [C3384C]
00A954F3  |> D99B 8C000000  FSTP DWORD PTR [EBX+8C]
00A954F9  |. 89B3 90000000  MOV DWORD PTR [EBX+90],ESI
00A954FF  |. EB 02          JMP SHORT SpinTire.00A95503
00A95501  |> DDD8           FSTP ST(0)
00A95503  |> 8B93 90000000  MOV EDX,DWORD PTR [EBX+90]
00A95509  |. 3BFA           CMP EDI,EDX
00A9550B  |. 74 59          JE SHORT SpinTire.00A95566
00A9550D  |. D9EE           FLDZ                                     ;  ebx=&truck controls
00A9550F  |. D89B 8C000000  FCOMP DWORD PTR [EBX+8C]                 ;  compare with TruckControls.ShiftTimer
00A95515  |. DFE0           FSTSW AX
00A95517  |. F6C4 01        TEST AH,1
00A9551A  |. 75 3A          JNZ SHORT SpinTire.00A95556
00A9551C  |. D905 7006C300  FLD DWORD PTR [C30670]                   ;  here if ebx+8c <= 0
00A95522  |. D99B 88000000  FSTP DWORD PTR [EBX+88]
00A95528  |. 8B5B 18        MOV EBX,DWORD PTR [EBX+18]
00A9552B  |. 85D2           TEST EDX,EDX
00A9552D  |. 7D 14          JGE SHORT SpinTire.00A95543
00A9552F  |. 8B53 0C        MOV EDX,DWORD PTR [EBX+C]
00A95532  |. C742 54 FFFFFF>MOV DWORD PTR [EDX+54],-1
00A95539  |. 5F             POP EDI
00A9553A  |. 5E             POP ESI
00A9553B  |. 5D             POP EBP
00A9553C  |. 5B             POP EBX
00A9553D  |. 83C4 18        ADD ESP,18
00A95540  |. C2 0C00        RETN 0C
00A95543  |> 8BC2           MOV EAX,EDX
00A95545  |. 8BCB           MOV ECX,EBX
00A95547  |. E8 94E40200    CALL <SpinTire.SetSelectedGear>
00A9554C  |. 5F             POP EDI
00A9554D  |. 5E             POP ESI
00A9554E  |. 5D             POP EBP
00A9554F  |. 5B             POP EBX
00A95550  |. 83C4 18        ADD ESP,18
00A95553  |. C2 0C00        RETN 0C
00A95556  |> D983 8C000000  FLD DWORD PTR [EBX+8C]
00A9555C  |. D86424 34      FSUB DWORD PTR [ESP+34]                  ;  subtract frame time?
00A95560  |. D99B 8C000000  FSTP DWORD PTR [EBX+8C]
00A95566  |> 5F             POP EDI
00A95567  |. 5E             POP ESI
00A95568  |. 5D             POP EBP
00A95569  |. 5B             POP EBX
00A9556A  |. 83C4 18        ADD ESP,18
00A9556D  \. C2 0C00        RETN 0C

Keep in mind that I did not investiagte the auto gearbox carefully back then, so I did not take time to make sure my notes where accurate. What I wrote might be downright wrong.

 

Do you have any idea on [...] what variables I would need to make a sequential one?

A pair of user defined virtual keys on the ST+ side for the shift up/down commands is what comes in mind first. Then just completely replace the auto gearbox function, but that's not a variable.


  • Miaou likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users