Notices
Series I Aftermarket Performance Modifications Discussion of power adding modifications

cracking the ecu....

Thread Tools
 
Search this Thread
 
Rate Thread
 
Old 06-13-2006, 03:29 PM
  #241  
Registered User
 
Aseras's Avatar
 
Join Date: Mar 2005
Posts: 1,587
Likes: 0
Received 1 Like on 1 Post
Hmm entry points...

ok well there's plenty of denso tags in hex.

05800

36 30 45 30 46 37 30 30-20 20 20 20 20 20 20 20 "60E0F700 "
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 " "
05 01 25 43 6F 70 72 2E-44 45 4E 53 4F 32 30 30 "%Copr.DENSO200"
07320

v` v8Copyrigh"
74 20 31 39 39 39 20 48-69 74 61 63 68 69 2C 4C "t 1999 Hitachi,L"
74 64 2E 48 69 74 61 63-68 69 20 56 65 68 69 63 "td.Hitachi Vehic"
6C 65 20 4F 70 65 72 61-74 69 6E 67 20 53 79 73 "le Operating Sys"
74 65 6D 20 66 6F 72 20-53 48 2D 32 20 4F 70 65 "tem for SH-2 Ope"
72 61 74 69 6E 67 20 53-79 73 74 65 6D 2C 20 50 "rating System, P"
72 6F 64 75 63 74 20 56-65 72 73 69 6F 6E 20 56 "roduct Version V"
32 2E 31 41 20 31 39 39-39 48 69 74 61 63 68 69 "2.1A 1999Hitachi"
20 56 65 68 69 63 6C 65-20 4F 70 65 72 61 74 69 " Vehicle Operati"
6E 67 20 53 79 73 74 65-6D 20 66 6F 72 20 53 48 "ng System for SH"
2D 32 20 4F 70 65 72 61-74 69 6E 67 20 53 79 73 "-2 Operating Sys"
74 65 6D 2C 20 50 72 69-76 61 74 65 20 56 65 72 "tem, Private Ver"
73 69 6F 6E 20 56 32 2E-31 41 2E 30 30 20 31 39 "sion V2.1A.00 19"
39 39 FF FF 2F 56 4F 22-7F FC 2F 86 2F 96 2F A6 "99 /VO"n/å/û/ª"

070670

4E 33 5A 32 45 42 49 57-2E 5A 30 35 00 00 00 00 "N3Z2EBIW.Z05...."
0C 36 30 45 30 46 37 30-30 20 20 20 20 20 20 20 " 60E0F700 "
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20 " "
20 05 01 25 43 6F 70 72-2E 44 45 4E 53 4F 32 30 " %Copr.DENSO20"
30 30 53 53 57 2D 4E 33-5A 32 45 50 30 30 30 2E "00SSW-N3Z2EP000."
48 45 58 00 00 00 00 00-00 00 00 30 46 37 30 30 "HEX........0F700"
willing to bet it's near one of them.

honestly i know jack about sh. I'm assuming all the jumps for r1,r2 etc.. are for it.
Aseras is offline  
Old 06-14-2006, 12:54 PM
  #242  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
Originally Posted by Aseras
Hmm entry points...

ok well there's plenty of denso tags in hex.

05800


07320




070670



willing to bet it's near one of them.

honestly i know jack about sh. I'm assuming all the jumps for r1,r2 etc.. are for it.
You're getting there, since we do not have access to the PC & SP vector, so the alternative route is to identify and mark the data segment first as we know they are fact and can be identify easiy. This way, we are eliminating possible invalid codes generated by the data segment.

With IDA, you will need to manually go through those and mark the identified text as data; in this case, string. It will nicely auto detect and define the string variable and lock the segment down so that it will not treat it as codes. The other data are the map location which I've identified in some previous posts, mark those as either individual data or define them as array, etc. Once you have all that, you are eliminating invalid codes. This will take time, but it will be fun to play around.

The nice thing about IDA is it will automatic analyze and nicely display the result from your manual analyzing point. Just have to identify one segment at a time... once you found the segment that doesn't make sense (such as code collision with data) you can eliminate that. Its also have a very nice UI where you can navigate your codes and tracing the flow of codes execution.

I have a chance to play around with the Demo version of IDA pro, so I know its potential. Thus figuring the rest of the ROM image will be time consuming and requires lots of patience.
seikx8 is offline  
Old 06-16-2006, 11:40 AM
  #243  
Administrator
 
zoom44's Avatar
 
Join Date: Jul 2002
Location: portland oregon
Posts: 21,958
Received 115 Likes on 88 Posts
could the flash file name- sw-N3Z(1 or 2)E(R or S etc)000 be the code or check sum in some way?
zoom44 is offline  
Old 06-17-2006, 01:48 AM
  #244  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
Originally Posted by zoom44
could the flash file name- sw-N3Z(1 or 2)E(R or S etc)000 be the code or check sum in some way?
It's shouldn't be. One of the checksum is a 32bit value located at 0x837F4 for sure, and the other is at 0x83388. I have a hunt that the checksum only apply to a few segments and not the entire image.

Last edited by seikx8; 06-17-2006 at 02:05 AM.
seikx8 is offline  
Old 06-17-2006, 02:05 AM
  #245  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
To give some update, the following are a few subroutines I found in these range of addresses:

0x25D0C:0x25FD4
0x25FDC:0x26114
0x26114:0x2633c
and so on..

Most of these code have floating point operation and call to address in the 0x2000 - 0x3000 range outside of the flash image range starting from 0x4000.

Some hints to analyze the assembly code is to look for any valid subroutine call. All subroutines call should use a register to load a full 32bit data. eg.

mov.l @(PC,xx), Rn
jsr @Rn
nop

And the follow codes should be mark as invalid:
mov.w (@PC,xx),Rn
jsr @Rn

All subroutine should have a begin and end code signatures with some variant of the follow format:

;begin routine
mov.l r14, @-r15
mov.l r13, @-r15
...
sts.l pr,@-r15
...
...
lds.l @r15+,pr
...
mov.l r15+,@r13
rts
mov.l r15+,@r14 ; code place here for delay return, sometime you may see nop instruction
; some data definition if any
; end subroutine
seikx8 is offline  
Old 06-17-2006, 03:06 AM
  #246  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
I hit gold in subroutine in range: 0x22060:0x2211A, there are codes referencing data access to the data map I've previous identified.

I'm tired now, got to catch some shut eye.
seikx8 is offline  
Old 06-17-2006, 10:53 AM
  #247  
Registered User
 
SomeGuy_sg's Avatar
 
Join Date: Feb 2004
Posts: 163
Likes: 0
Received 0 Likes on 0 Posts
Big Up to all the guys working on this
Your work does not go un-appreciated :shakeboobs:
SomeGuy_sg is offline  
Old 08-04-2006, 06:55 AM
  #248  
Registered User
 
juanjux's Avatar
 
Join Date: May 2005
Location: Madrid, Spain
Posts: 213
Likes: 0
Received 0 Likes on 0 Posts
Did this *wonderful* thread dies because of RB reflash? Please don't!
juanjux is offline  
Old 08-04-2006, 09:59 AM
  #249  
Administrator
 
zoom44's Avatar
 
Join Date: Jul 2002
Location: portland oregon
Posts: 21,958
Received 115 Likes on 88 Posts
no seik and aeseras are both still working. seik has some new findings and they both have copies of the newest US and Canadian flash levels to look at
zoom44 is offline  
Old 08-04-2006, 10:28 AM
  #250  
Registered User
 
Aseras's Avatar
 
Join Date: Mar 2005
Posts: 1,587
Likes: 0
Received 1 Like on 1 Post
i've been swamped for the last month and a half with work. I lost my tech and picked up a new gf so I've not had much time. I'll have the next week and a half or so all to myself so hopefully I'll be able to go through some of the new things I've got ( thanks zoom ) and see what I can do.
Aseras is offline  
Old 08-04-2006, 11:51 AM
  #251  
Registered User
 
juanjux's Avatar
 
Join Date: May 2005
Location: Madrid, Spain
Posts: 213
Likes: 0
Received 0 Likes on 0 Posts
I'm interested in the Europe Vs USA AFR tables in the ECU, could someone post them there (both)?
juanjux is offline  
Old 08-04-2006, 09:44 PM
  #252  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
There is progress, but slow. Currently I'm waiting to purchase the J2534 device as I am tight in budget at the moment. Otherwise, I have learned a lot about how the module is programed and such.

To lets you in some details, the Mazda Module Programming software seem to have a function for you to read the Flash from the PCM and check to see if the PCM is empty by validating if all data is Zero/FF (depending on the EEPROM each PCM use). In the application there are .DLL files which have functions interfacing with the Vehicle and reading/writing Flash images, etc. By default, it will auto check the HW and look in DB then connect to internet to get the latest info, if found you will be prompt whether you want to download & reflash with the new version.

However, there is option that would allow you to manually select a module flash File to upload to the PCM. There are options that set to prevent user from uploading the wrong flash file to the PCM but they can be turn off and bypass. Since I do not have the J2534, I cannot verify how that will work in the UI yet.

Regarding the flash image itself, I still have not figure out the checksum yet because there are missing data and I'm trying to locate and study the SBL (Secondary BootLoader) segment of the codes; these codes are upload/load from a protected region on he ROM to the RAM then run so that the reading/write process may occurs via communication with the a remote application such as the Mazda Module Programming Software.

As for the disassembly, I have about 350+ functions/subroutines identified and some jump/branch to address below 0x4000 which I currently have no access to so I can't verify the codes purpose.

And I was sick today, so I took a day off to rest. Still having a light headache at the moment
seikx8 is offline  
Old 08-04-2006, 09:48 PM
  #253  
RX8 newbie!
 
theboy's Avatar
 
Join Date: Jan 2006
Posts: 2,362
Likes: 0
Received 0 Likes on 0 Posts
RE is visiting singapore and they say they can by pass the speed-cut. well?
theboy is offline  
Old 08-06-2006, 01:33 PM
  #254  
Registered User
 
Aseras's Avatar
 
Join Date: Mar 2005
Posts: 1,587
Likes: 0
Received 1 Like on 1 Post
zoom talked to drewtech and they are going to offer a mongoose with a powersupply for flashing soon. that's the perfect tool. I'm waiting for it.
Aseras is offline  
Old 08-29-2006, 07:41 PM
  #255  
Is this title ok?
 
seikx8's Avatar
 
Join Date: Jan 2003
Location: El Monte, CA
Posts: 300
Likes: 0
Received 2 Likes on 2 Posts
To continue the saga,

if anyone want to pursue other alternative is to use the SCI port (Serial Communication Interface), there are source in japan that have those board to allow you to flash the ECU and here is the link for example if you understand Japanese (or to babefish translated): http://60.43.208.97/1/CPU-SH.htm

I've also read through many document from Renesas, the board can be reprogram directly via the SCI port (now I have understood how it works). The site also have the Flash Development Kit that you can download. Problem is, I have no spare ECU to play around with; because if you put the ECU into the wrong mode (boot mode) the entire flash will auto erase. This is the cheapest option you will find by making a very simple circuit to interface with the SCI that probably cost in the 2 digit figure.

And the cheapest J2534 device I found is McS1 from EEPod costing $475.
seikx8 is offline  


You have already rated this thread Rating: Thread Rating: 0 votes,  average.

Quick Reply: cracking the ecu....



All times are GMT -5. The time now is 07:19 AM.