|
RomRaider
Documentation
Community
Developers
|
| Author |
Message |
|
dschultz
|
Post subject: Another way to find SSM base from the ECU ID Posted: Sat Jun 19, 2010 10:50 am |
|
 |
| RomRaider Developer |
Joined: Wed May 20, 2009 9:49 pm Posts: 7314 Location: Canada eh!
|
Search for the byte sequence A210. Following that sequence you'll find a byte matching the list at the end of this post (depending on engine type and size) then the five byte ECU ID, possibly a 00 or the start of the SSM init sequence indicating what the ECU supports. Then just follow the cross references to the routines. Can anyone else confirm this? --- EDIT: An example, search for A210 (as I know this is from a 2.5L Turbo car)... At the line which is the first byte of the ECU ID (0x6E in my example) follow the DATA XREF to the location that points to the ECU ID byte 1. Code: ROM:000D619D A2 byte_D619D: .data.b h'A2 ; DATA XREF: ROM:off_5F374 ROM:000D619D ; ROM:off_5F514 ROM:000D619E 10 byte_D619E: .data.b h'10 ; DATA XREF: ROM:0005F378 ROM:000D619E ; ROM:0005F518 ROM:000D619F 11 byte_D619F: .data.b h'11 ; DATA XREF: ROM:0005F37C ROM:000D619F ; ROM:0005F51C ROM:000D61A0 6E ECU_ID_B1: .data.b h'6E ; DATA XREF: ROM:off_56C34 ROM:000D61A0 ; ROM:0005F380 ROM:000D61A1 12 ECU_ID_B2: .data.b h'12 ; DATA XREF: ROM:off_56C38 ROM:000D61A1 ; ROM:0005F384 ROM:000D61A2 78 ECU_ID_B3: .data.b h'78 ; DATA XREF: ROM:off_56C3C ROM:000D61A2 ; ROM:0005F388 ROM:000D61A3 60 ECU_ID_B4: .data.b h'60 ; DATA XREF: ROM:off_56C40 ROM:000D61A3 ; ROM:0005F38C ROM:000D61A4 07 ECU_ID_B5: .data.b 7 ; DATA XREF: ROM:off_56C44 ROM:000D61A4 ; ROM:0005F390 At the line which is the address of the first byte of the ECU ID follow the DATA XREF to the subroutine that fetches the ECU ID address. Code: ROM:00056C34 00 0D 61 A0 off_56C34: .data.l ECU_ID_B1 ; DATA XREF: ROM:loc_56B20 ROM:00056C38 00 0D 61 A1 off_56C38: .data.l ECU_ID_B2 ; DATA XREF: ROM:loc_56B26 ROM:00056C3C 00 0D 61 A2 off_56C3C: .data.l ECU_ID_B3 ; DATA XREF: ROM:loc_56B2C ROM:00056C40 00 0D 61 A3 off_56C40: .data.l ECU_ID_B4 ; DATA XREF: ROM:loc_56B32 ROM:00056C44 00 0D 61 A4 off_56C44: .data.l ECU_ID_B5 ; DATA XREF: ROM:loc_56B38 Now you'll see a DATA XREF for the ECU ID byte 1 subroutine which points to a location in ROM which is a table of SSM subroutine addresses. Code: ROM:00056B20 loc_56B20: ; DATA XREF: ROM:0005D718 ROM:00056B20 D2 44 mov.l @(h'110,pc), r2 ; [00056C34] = ECU_ID_B1 ROM:00056B22 00 0B rts ROM:00056B24 60 20 mov.b @r2, r0 The ROM address right above the address that points to the subroutine that fetches the ECU ID byte 1 is the base of the SSM table. Code: ROM:0005D714 00 05 6B 1A SsmBase: .data.l loc_56B1A ; DATA XREF: ROM:off_59000 ROM:0005D718 00 05 6B 20 .data.l loc_56B20 ; Get ECU_ID byte 1 ROM:0005D71C 00 05 6B 26 .data.l loc_56B26 ROM:0005D720 00 05 6B 2C .data.l loc_56B2C ROM:0005D724 00 05 6B 32 .data.l loc_56B32 ROM:0005D728 00 05 6B 38 .data.l loc_56B38 ROM:0005D72C 00 05 6B 0E .data.l SsmGetZero
EDIT: adding info about the third byte *, the one after A210. It should be one of these codes, such as 11 for 2.5L Turbo engine. Code: Engine SSM init string 3rd byte System Name 01 2.5L SOHC 02 2.5L SOHC 03 2.2L SOHC 04 2.2L SOHC 05 1.5L SOHC 06 1.6L SOHC 07 1.8L SOHC 08 2.0L SOHC 09 2.0L DOHC 0A 2.5L DOHC 0B 2.0L DOHC Turbo 0C 2.0L DOHC Turbo 0D 2.0L DOHC Turbo 0E 3.0L DOHC 0F 2.0L DOHC Turbo 10 2.5L DOHC 11 2.5L DOHC Turbo 12 3.0L DOHC 13 1.5L DOHC 14 2.0L DOHC Turbo Diesel 15 3.6L DOHC
Transmission SSM init string 3rd byte System Name 01 E-4AT 02 E-4AT 03 E-4AT 04 E-4AT 05 E-4AT 06 E-4AT 07 E-4AT 08 E-4AT 09 E-4AT 10 E-4AT 11 E-4AT 12 E-4AT 13 E-4AT 20 E-4AT 21 E-4AT 22 E-5AT 23 E-4AT 24 E-4AT 25 E-4AT 30 Center Differential 40 Lineartronic (CVT) * Source. Sometimes the ECU ID can be found after searching for A110. But the ROM layout is different than described above.
Last edited by dschultz on Thu Dec 02, 2010 10:29 am, edited 6 times in total.
|
|
| Top |
|
 |
|
nsfw
|
Post subject: Re: Another way to find SSM base? Posted: Sat Jun 19, 2010 6:03 pm |
|
 |
| Moderator |
Joined: Wed Nov 22, 2006 10:23 pm Posts: 2565
|
|
Nice. That works for my LGT's ROM, A2WC522N...
( [code] section removed, copy-paste from IDA just produced unreadable garbage)
The XREF from the first byte of the ECU id goes to the SSM handler for 'get ECU id.' From that address, the XREF goes to the 0x4EDE0, and the SSM base is the previous dword, 0x4EDDC.
_________________ 2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!
|
|
| Top |
|
 |
|
Fiend
|
Post subject: Re: Another way to find SSM base? Posted: Sun Jun 20, 2010 12:25 am |
|
 |
| RomRaider Donator |
Joined: Tue Apr 24, 2007 6:49 pm Posts: 243
|
Works for my 2008 STI ROM, AZ1G201I (yes I know about the 202I reflash boost cut fix  ) Address at 0xD62CC. There were two other occurrences of the byte sequence A210 further up in the ROM, the ECU ID was the third. Out of curiosity, how do you do a crossreference check/search? I tried highlighting the address and selecting, "Jump to crossreference", from the "Jump" menu, but no crossreferences were found. I was able to do a byte sequence search for D62CC, which turned up two references. The first reference contained D62CC, D62CD, ..., D62D0, which seems to be an array of address pointers pointing to each byte of the ECU ID. The second reference was contained in what appears to be an array of address pointers starting at D62 C9 to D63 30, followed by D62C9 to D62CB. This seems too sequential to be a random occurrence. What are these addresses pointing to?
|
|
| Top |
|
 |
|
nsfw
|
Post subject: Re: Another way to find SSM base? Posted: Sun Jun 20, 2010 3:49 am |
|
 |
| Moderator |
Joined: Wed Nov 22, 2006 10:23 pm Posts: 2565
|
It sounds like you have not run the analysis pass on your ROM, or when you did, IDA didn't have enough information to start from. There's some more info about that in this thread: viewtopic.php?f=25&t=2864I've just started working on a how-to that should put the important steps in one place.
_________________ 2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, BC 272, LC, FFS, OMG Please don't send questions via PM. Post a thread and send me a link to it instead. Thanks!
|
|
| Top |
|
 |
|
Fiend
|
Post subject: Re: Another way to find SSM base? Posted: Sun Jun 20, 2010 4:27 am |
|
 |
| RomRaider Donator |
Joined: Tue Apr 24, 2007 6:49 pm Posts: 243
|
NSFW wrote: It sounds like you have not run the analysis pass on your ROM, or when you did, IDA didn't have enough information to start from. There's some more info about that in this thread: viewtopic.php?f=25&t=2864I've just started working on a how-to that should put the important steps in one place. Can't wait to read it. 
|
|
| Top |
|
 |
|
Sasha_A80
|
Post subject: Re: Another way to find SSM base? Posted: Sun Jun 20, 2010 11:57 am |
|
 |
| Senior Member |
Joined: Mon Jan 19, 2009 2:31 pm Posts: 1615 Location: Moscow, Russia
|
dschultz wrote: I'm not sure if this is the case for every ROM but it has worked from me a few times. Search for the byte sequence A210. Following that sequence you'll find a byte of 0F or 11 or 12 (depending on ROM year and size) then the five byte ECU ID, possibly a 00 or the start of the SSM init sequence indicating what the ECU supports. Then just follow the cross references to the routines.
Can anyone else confirm this? 32 bit DBW JDM ECUID 2A 04 44 63 05 ROM:0002B3FC ; --------------------------------------------------------------------------- ROM:0002B3FC ROM:0002B3FC SSM_READ_@000: ; DATA XREF: ROM:SSM_LUT_READ ROM:0002B3FC mov.w @(h'16,pc), r3 ; [0002B416] = h'FFFFAF2A ROM:0002B3FE rts ROM:0002B400 mov.b @r3, r0 ROM:0002B402 ; --------------------------------------------------------------------------- ROM:0002B402 ROM:0002B402 SSM_READ_ID00: ; DATA XREF: ROM:00037CB4 ROM:0002B402 mov.l @(h'54,pc), r2 ; [0002B458] = unk_60114 ; / h'2A ROM:0002B404 rts ROM:0002B406 mov.b @r2, r0 ROM:0002B408 ; --------------------------------------------------------------------------- ROM:0002B408 ROM:0002B408 SSM_READ_ID01: ; DATA XREF: ROM:00037CB8 ROM:0002B408 mov.l @(h'50,pc), r3 ; [0002B45C] = unk_60115 ; / h'04 - first ECUID byte JDM ROM:0002B40A rts ROM:0002B40C mov.b @r3, r0 ------------------------------------------------------------ ROM:00060111 unk_60111: .data.b h'A2 ; â ; DATA XREF: ROM:off_3887C ROM:00060111 ; ROM:off_3895Co ROM:00060112 .data.b h'10 ROM:00060113 .data.b h'F ROM:00060114 unk_60114: .data.b h'2A ; * ; DATA XREF: ROM:off_2B458 ROM:00060115 unk_60115: .data.b 4 ; DATA XREF: ROM:off_2B45C ROM:00060116 unk_60116: .data.b h'44 ; D ; DATA XREF: ROM:off_2B6D0 ROM:00060117 unk_60117: .data.b h'63 ; c ; DATA XREF: ROM:off_2B6D4 ROM:00060118 unk_60118: .data.b 5 ; DATA XREF: ROM:off_2B6D8
|
|
| Top |
|
 |
|
aijii
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Dec 04, 2012 6:48 am |
|
 |
| Experienced |
Joined: Sun Oct 16, 2011 3:57 am Posts: 150
|
Hi guys, I'm stuck with this step now So I find the following: Code: ROM:000D479D byte_D479D: .data.b h'A2 ; DATA XREF: ROM:off_5AEDCo ROM:000D479D ; ROM:off_5B07Co ROM:000D479E byte_D479E: .data.b h'10 ; DATA XREF: ROM:0005AEE0o ROM:000D479E ; ROM:0005B080o ROM:000D479F byte_D479F: .data.b h'11 ; DATA XREF: ROM:0005AEE4o ROM:000D479F ; ROM:0005B084o ROM:000D47A0 ECU_ID_B1: .data.b h'74 ; DATA XREF: ROM:000527EAo ROM:000D47A0 ; ROM:off_528FCo ... ROM:000D47A1 ECU_ID_B2: .data.b h'52 ; DATA XREF: ROM:loc_527F0o ROM:000D47A1 ; ROM:off_52900o ... ROM:000D47A2 ECU_ID_B3: .data.b h'58 ; DATA XREF: ROM:loc_527F6o ROM:000D47A2 ; ROM:off_52904o ... ROM:000D47A3 ECU_ID_B4: .data.b h'40 ; DATA XREF: ROM:000527FCo ROM:000D47A3 ; ROM:off_52908o ... ROM:000D47A4 ECU_ID_B5: .data.b 7 ; DATA XREF: ROM:loc_52802o ROM:000D47A4 ; ROM:off_5290Co ... I right click on "DATA XREF: ROM:000527EA" and click jump to cross reference. I see three options - they each take me somewhere different. I click the first option, and I get this: Code: ROM:000527EA ; --------------------------------------------------------------------------- ROM:000527EA mov.l #ECU_ID_B1, r2 ROM:000527EC rts ROM:000527EE mov.b @r2, r0 ROM:000527F0 ; --------------------------------------------------------------------------- Thats different to what I see in your example above, dschultz ? Am I doing something wrong ?
|
|
| Top |
|
 |
|
td-d
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Dec 04, 2012 9:56 am |
|
 |
| Moderator |
Joined: Thu May 20, 2010 4:01 am Posts: 3117 Location: Johannesburg, South Africa
|
|
Now if you follow the xref from that subroutine, you will get to the SSM Table. One more step.
_________________ He who dies with the most gadgets wins.
Please do not PM me - use the email option.
|
|
| Top |
|
 |
|
Merp
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:34 pm |
|
 |
| Experienced |
 |
Joined: Thu Jul 23, 2009 1:46 pm Posts: 863
|
SharpTune (patching GUI/CLI app) now has a GUI interface for XmlToIdc with SSM base detection. It uses pattern searching and so far has found the correct addresses on several different markets/years/makes of cars. Please report a bug @ github if you find one that does not work! https://github.com/Merp/SharpTune
_________________ Please do not send me support questions via PM, use the forum instead!
|
|
| Top |
|
 |
|
td-d
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:44 pm |
|
 |
| Moderator |
Joined: Thu May 20, 2010 4:01 am Posts: 3117 Location: Johannesburg, South Africa
|
Merp wrote: SharpTune (patching GUI/CLI app) now has a GUI interface for XmlToIdc with SSM base detection. It uses pattern searching and so far has found the correct addresses on several different markets/years/makes of cars. Please report a bug @ github if you find one that does not work! https://github.com/Merp/SharpTuneI can already give you some candidates - the odd early 32 bit roms with the truncated knock control logic. SSM pattern will not match A210. Here's one: FileName: 2004 Legacy(2).hex xmlid: E6PF101A internalidaddress: 2000 internalidstring: E6PF101A ecuid: 3722047206 year: 04 market: USDM And the reason: Code: ROM:000747E0 byte_747E0: .data.b 0 ; DATA XREF: ROM:0003F7E0o ROM:000747E0 ; ROM:0003F8C0o ROM:000747E1 byte_747E1: .data.b 0 ; DATA XREF: ROM:0003F8C4o ROM:000747E2 byte_747E2: .data.b 0 ; DATA XREF: ROM:0003F8C8o ROM:000747E3 byte_747E3: .data.b h'F0 ; DATA XREF: ROM:0003F8CCo ROM:000747E4 Ecu_Byte_1: .data.b h'37 ; DATA XREF: ROM:SSMGet_Ecu_Byte_1o ROM:000747E4 ; ROM:off_22418o ... ROM:000747E5 Ecu_Byte_2: .data.b h'22 ; DATA XREF: ROM:SSMGet_Ecu_Byte_2o ROM:000747E5 ; ROM:off_2241Co ... ROM:000747E6 Ecu_Byte_3: .data.b 4 ; DATA XREF: ROM:SSMGet_Ecu_Byte_3o ROM:000747E6 ; ROM:off_22420o ... ROM:000747E7 Ecu_Byte_4: .data.b h'72 ; DATA XREF: ROM:SSMGet_Ecu_Byte_4o ROM:000747E7 ; ROM:off_22424o ... ROM:000747E8 Ecu_Byte_5: .data.b 6 ; DATA XREF: ROM:SSMGet_Ecu_Byte_5o ROM:000747E8 ; ROM:off_22428
_________________ He who dies with the most gadgets wins.
Please do not PM me - use the email option.
|
|
| Top |
|
 |
|
Merp
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:51 pm |
|
 |
| Experienced |
 |
Joined: Thu Jul 23, 2009 1:46 pm Posts: 863
|
|
I've used it on some early roms, but I believe they all had the A210 tag.
This routine uses the unique patterns involved in the routines that fetch the ecuid and their arrangement after the SSM base, so unless that is altered as well it should work.
_________________ Please do not send me support questions via PM, use the forum instead!
|
|
| Top |
|
 |
|
td-d
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:53 pm |
|
 |
| Moderator |
Joined: Thu May 20, 2010 4:01 am Posts: 3117 Location: Johannesburg, South Africa
|
|
Nothing would surprise me with these roms - they're a pain in the arse to disassemble, quite different in a number of ways.
It definitely did not work on the one above - that's the output from Sharptune - did not automatically find the SSM Base.
_________________ He who dies with the most gadgets wins.
Please do not PM me - use the email option.
|
|
| Top |
|
 |
|
td-d
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:56 pm |
|
 |
| Moderator |
Joined: Thu May 20, 2010 4:01 am Posts: 3117 Location: Johannesburg, South Africa
|
|
I expect you will find the same with E2VG211E.
_________________ He who dies with the most gadgets wins.
Please do not PM me - use the email option.
|
|
| Top |
|
 |
|
td-d
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 4:58 pm |
|
 |
| Moderator |
Joined: Thu May 20, 2010 4:01 am Posts: 3117 Location: Johannesburg, South Africa
|
|
And this one: E2WD200C
These three are the only oddities I've come across to date.
_________________ He who dies with the most gadgets wins.
Please do not PM me - use the email option.
|
|
| Top |
|
 |
|
Merp
|
Post subject: Re: Another way to find SSM base from the ECU ID Posted: Tue Mar 12, 2013 5:03 pm |
|
 |
| Experienced |
 |
Joined: Thu Jul 23, 2009 1:46 pm Posts: 863
|
|
Thanks, I'll have a look
_________________ Please do not send me support questions via PM, use the forum instead!
|
|
| Top |
|
 |
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|