elias
Full Member
![*](http://nefariousmotorsports.com/forum/Themes/nefmoto/images/star.gif) ![*](http://nefariousmotorsports.com/forum/Themes/nefmoto/images/star.gif)
Karma: +19/-3
Offline
Posts: 62
|
![](http://nefariousmotorsports.com/forum/Themes/nefmoto/images/post/xx.gif) |
« on: May 19, 2024, 03:31:28 PM »
|
|
|
I wanted to start a conversation regarding making that patch available. There are some people who did it already, however this information stays closed source and nobody is willing to share informations.
So i do share at least my research on that topic, which may or may not help someone to develop that patch. Maybe someone else will share some more informations.
All the informations which i cover apply to the 1K8907115F_0040 binary.
Lets start: Generally speaking the Wastegate Duty Cycle is driven using a PID System. It takes certain parameters(refer to FR) and produces the duty cycle out of it. In Bosch Terms its called LDRPID.
If you inspect the A2L, you will notice that most variables related to the LDRPID like ps_w are scaling only to 2.5 bar.
One of the exceptions which you can find is the variable pvd_w which is scaling to 5 bar. Its explicitely written in the description("Wertebereich von 0...5120hPa" = values from 0-5120hpa").
pvd_w is "Pressure before throttle valve".
However this value is never used in LDRPID. LDRPID uses pvdkds_w. pvd_w is converted to pvdkds_w at some point in time. pvdkds_w is scaling only to 2.5 bar. Both pvd_w and pvdkds_w are uint16 datatypes.
So how does this scaling work? Lets make a example: pvd_w(in RAM): 0xFFFF pvd_w(as human readable value): 5 bar
pvdkds_w (in RAM): 0xFFFF pvdkds_w (as human readable value): 2.5 bar
So after closer inspection of the code, i found the point where its getting converted. You can find that code in 0xca1a4: "rlwinm r6 ,r3 ,0x1 ,0xf ,0x1e" what it basically does is: pvdkds_w = (pvd_w & 0xffff) << 1; "Easier" said its: pvdkds_w = 2*pvd_w
So the first step to making that 5120 patch, is to remove the "multiply * 2" in the conversion to let it go up to 5 bar instead of 2.5 bar. However this is only the first step of the journey, as you will have to adjust all the maps in the LDRPID to make sure its working correctly. Some maps will need multiplying by 2, some will need dividing by two. I assume some other vars needs patches as well. One example is maybe fpvd_w, which has similar logic.
To remove the conversion you can use: add r6 ,r3 ,r0 instead the rlwim.
Hope it will help someone one day. For now its too big as a task for me alone. Will report back if i get new informations.
|
|
|
Logged
|
|