Pages: [1] 2
Author Topic: Learning ME language  (Read 10530 times)
MoparFreak69
Full Member
***

Karma: +5/-2
Offline Offline

Posts: 55



« on: March 06, 2017, 07:09:48 PM »

In the interest brought on by the "mafless" topic, I have decided to attack the situation for myself through 2 different venues. One dealing with some sort of standalone MAP to MAF signal converter (could be hack/fail/waste of time/etc.) the other dealing with learning dissasembly and reassembly of the ME code.

The reason for this thread is to ask for information as to where to begin my quest for learning the coding as it relates specifically to the Bosch Motronic ME lineup as a beginning.

Firstly; what language is used in the Motronic?
Secondly; any suggested resources to begin discovering how the language works and how to properly manipulate it?

What I'm hoping for with this thread is to not only learn myself how to perform the advanced manipulation of the ECU and its coding, but also hopefully a respectful thread where others can offer input and suggestions based on my subsequent attempts.

What I do not want; code thrown at me saying 'just use this'. I don't learn that way and I'm not keen on just taking other's work without knowing what it takes to get to the same end point.

Any of the more experienced and knowledgeable members here want to offer any solid starting grounds?
Logged
vwaudiguy
Hero Member
*****

Karma: +53/-37
Offline Offline

Posts: 2024



« Reply #1 on: March 06, 2017, 08:40:07 PM »

I think this is a great idea for a topic. I feel like lots of folks on here are interested in disassembly. It's a steep learning curve for sure. Stumbling around IDA isn't the most efficient way to go about it.
Logged

"If you have a chinese turbo, that you are worried is going to blow up when you floor it, then LOL."
nyet
Administrator
Hero Member
*****

Karma: +605/-168
Online Online

Posts: 12242


WWW
« Reply #2 on: March 06, 2017, 08:48:04 PM »

The source code to ME7 is not available.

Likely it is a variant of C mixed with custom ASM library functions optimized for performance.

All you have are the binaries, which are in the native CPU/uC machine language (which isn't even ASM).

Depending on the target, even that varies.

in the case of ME7.1.x, the target cpu is the Infineon B59233-FA (aka SAK-C167CR-4RM) uC which uses the C166/C167 instruction set

https://en.wikipedia.org/wiki/C166_family
https://s4wiki.com/wiki/Bosch_ME7.1

The only real way to disassemble the binary is using IDA pro

http://nefariousmotorsports.com/forum/index.php?topic=2431.0title=

All of this assumes you know the difference between source code, ASM, and machine language.
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
MoparFreak69
Full Member
***

Karma: +5/-2
Offline Offline

Posts: 55



« Reply #3 on: March 06, 2017, 08:57:41 PM »

Ok.
Just trying to process.

So at this point, without original source code we have no idea exactly what the language is saying? Any coding changes/modifications have only been successful using a decompiler to 'reverse engineer' the coding and apply any changes that are to be made?

I suppose since versions of the Motronic are still in current production, acquisition of the source code is a pipe dream.

Thank you for the information. At least I have a direction to head towards.

Logged
nyet
Administrator
Hero Member
*****

Karma: +605/-168
Online Online

Posts: 12242


WWW
« Reply #4 on: March 06, 2017, 09:01:22 PM »

Yes. All of the above, you have it right.
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
TijnCU
Hero Member
*****

Karma: +60/-4
Offline Offline

Posts: 690


flying brick


« Reply #5 on: March 07, 2017, 07:28:22 AM »

When you found your way around IDA, and have a basic understanding about how the ecu works it is possible to learn a lot from a disassembled file combined with the Funktionsrahmen. You learn how to identify routines and variables. When you understand how these are used, you can write your own functions or edit existing functions. I have learned this from scratch in about 2 years time, and still I something mess things up when writing simple code changes (because the changed routine was not as simple as expected for example). In my opinion the only way to learn is to dive in, and if you are set on learning asm you will eventually succeed. But, as vwaudiguy said, it is a steep learning curve that can get you demotivated at times...
But I agree that the only good way to do a speed density file, is to write new code/adapt existing code. If you want to hack it, maybe you can get away with calibrating a load signal from a post throttle map sensor, but it will take a lot of testing for sure!
Logged

MoparFreak69
Full Member
***

Karma: +5/-2
Offline Offline

Posts: 55



« Reply #6 on: March 07, 2017, 01:05:22 PM »

Awesome info! Thanks!
I'm definitely going to dip my feet in the water, so to speak.

Anyone get proficient enough to consider just rewriting everything and starting fresh?
Logged
nyet
Administrator
Hero Member
*****

Karma: +605/-168
Online Online

Posts: 12242


WWW
« Reply #7 on: March 07, 2017, 04:03:28 PM »

Anyone get proficient enough to consider just rewriting everything and starting fresh?

Unpossible, IMO.

Just the RTOS alone would be impossible to rewrite unless you already have a decade of OS design experience.
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
Khendal
Full Member
***

Karma: +9/-8
Offline Offline

Posts: 226


« Reply #8 on: March 07, 2017, 04:15:21 PM »

This is an interesting topic.
But first of all, the most important thing is to know how to disassemble ME7.x.
There are a lot of arguments, a lot of automated scripts, but there are limits ... automated scripts that work and do not work, some with faster times that do not finish the job, a bit 'for the old or new version of Ida .. ..
I think we need a basic tutorial, a guide from the point 0 to the last step with the precise way to set the different addresses of memory and the size of .... type of processor, eeprom and flash.
When we have a correct disassembled code we can start to understand and study the code and the language used.
Logged
nyet
Administrator
Hero Member
*****

Karma: +605/-168
Online Online

Posts: 12242


WWW
« Reply #9 on: March 07, 2017, 04:23:57 PM »

Anyone get proficient enough to consider just rewriting everything and starting fresh?

You mean like a standalone Tongue

This one is at least open source, but nobody has done anything like motronic yet

http://www.vems.us/

Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
MoparFreak69
Full Member
***

Karma: +5/-2
Offline Offline

Posts: 55



« Reply #10 on: March 07, 2017, 05:38:52 PM »

I was kinda drifting toward just writing entirely new scripting that will run on the stock ME hardware. Obviously I don't have the knowledge or skills at this time to even fathom that happening but it could be possible?
Logged
nyet
Administrator
Hero Member
*****

Karma: +605/-168
Online Online

Posts: 12242


WWW
« Reply #11 on: March 07, 2017, 06:11:31 PM »

I was kinda drifting toward just writing entirely new scripting that will run on the stock ME hardware.

I have no idea what you mean by "new scripting"
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
TijnCU
Hero Member
*****

Karma: +60/-4
Offline Offline

Posts: 690


flying brick


« Reply #12 on: March 08, 2017, 05:39:54 AM »

I think we need a basic tutorial, a guide from the point 0 to the last step with the precise way to set the different addresses of memory and the size of .... type of processor, eeprom and flash.
When we have a correct disassembled code we can start to understand and study the code and the language used.
All this information is already on the forum. There is even a topic called "first disassemble - questions"
The question you need to ask yourself is: Can you learn how to drive a car by reading about it on the internet?
Logged

prj
Hero Member
*****

Karma: +1059/-465
Offline Offline

Posts: 5957


« Reply #13 on: March 08, 2017, 07:42:25 AM »

You mean like a standalone Tongue

This one is at least open source, but nobody has done anything like motronic yet

http://www.vems.us/

How is it open source???
Logged

PM's will not be answered, so don't even try.
Log your car properly.
MoparFreak69
Full Member
***

Karma: +5/-2
Offline Offline

Posts: 55



« Reply #14 on: March 08, 2017, 10:02:52 AM »

I have no idea what you mean by "new scripting"

Complete rewrite of the code to run on the ecu.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 2.808 seconds with 17 queries. (Pretty URLs adds 0.02s, 0q)