|
RomRaider
Documentation
Community
Developers
|
|
Page 1 of 1
|
[ 14 posts ] |
|
| Author |
Message |
|
bmw5002
|
Post subject: Disassembly of 16 Bit Roms Posted: Thu Jul 05, 2007 2:47 am |
|
 |
| Experienced |
Joined: Sat Feb 03, 2007 3:58 pm Posts: 166
|
|
Ive been interested lately in taking a look at the ecu code. I have a copy of IDA pro ready to go, but im unsure what file to open and what microporcessor profile to use to analyze it. I tried opening a the rom file that you tune in RomRaider via the Embedded Rom file profile, and the SH3 profile, but did not get any kind of useful disassembly from it. How do I get started with viewing the kind of code that is being reverse engineered for ramtune?
|
|
| Top |
|
 |
|
merchgod
|
Post subject: Posted: Thu Jul 05, 2007 10:06 am |
|
 |
| RomRaider Donator |
 |
Joined: Wed Mar 29, 2006 10:38 pm Posts: 5336
|
|
Use processor Motorola 6816. Entry point 0x220 (hit G, 0x220, hit C).
|
|
| Top |
|
 |
|
bmw5002
|
Post subject: Posted: Thu Jul 05, 2007 11:04 am |
|
 |
| Experienced |
Joined: Sat Feb 03, 2007 3:58 pm Posts: 166
|
|
thanks. how are you able to tell where anything is in there? theres no labels or anything to help lead to the fuel cut code, for instance.
|
|
| Top |
|
 |
|
Freon
|
Post subject: Posted: Thu Jul 05, 2007 11:52 am |
|
 |
| RomRaider Donator |
 |
Joined: Sun Apr 09, 2006 12:05 pm Posts: 867 Location: Indianapolis, IN
|
|
You can use the existing XML defs to help you, but largely you just gotta figure it out using logical deduction. It's not supposed to be easy, it is reverse engineering. Of course there are no labels on anything.
You might start by labeling (right click, rename) some commonly used subroutines, like the subroutines that are used to pull back data from the maps. Like you'll see the same subroutine (or maybe one of two or three) used every time a 2D map is looked up, or another one (or two) for pulling 3D maps, etc.
I suggest downloading an HC16 software manual so you know what all the opcodes are. Once you've fingered through the code for about 50 hours you'll start to understand some of the basic concepts of how the opcodes are used to get various things done, like bit switching, etc.
|
|
| Top |
|
 |
|
merchgod
|
Post subject: Posted: Thu Jul 05, 2007 11:53 am |
|
 |
| RomRaider Donator |
 |
Joined: Wed Mar 29, 2006 10:38 pm Posts: 5336
|
It takes a lot of time of messing with it and it is not generally easy. As far as fuel cut, we know the rev limiter uses fuel cut and the rev limit values are already defined. If you are just starting out, best thing to do is to work with known tables/processes to get an understanding of how a simple system works such as boost control. Obviously you need to have some sort of programming background and you need to have a good grasp of assembly language especially specific to the Motorola HC16 (go to http://www.freescale.com and download the software manual).
|
|
| Top |
|
 |
|
tinywrex
|
Post subject: Posted: Fri Jul 06, 2007 7:19 am |
|
 |
| Newbie |
Joined: Sun Feb 12, 2006 3:10 am Posts: 90
|
bmw5002 wrote: thanks. how are you able to tell where anything is in there? theres no labels or anything to help lead to the fuel cut code, for instance.
damn, no labels? 
|
|
| Top |
|
 |
|
ride5000
|
Post subject: Posted: Fri Jul 06, 2007 11:00 am |
|
 |
| Senior Member |
Joined: Thu Aug 03, 2006 10:40 am Posts: 1934
|
tinywrex wrote: bmw5002 wrote: thanks. how are you able to tell where anything is in there? theres no labels or anything to help lead to the fuel cut code, for instance. damn, no labels? 
how inconsiderate!
|
|
| Top |
|
 |
|
bmw5002
|
Post subject: Posted: Fri Jul 06, 2007 6:51 pm |
|
 |
| Experienced |
Joined: Sat Feb 03, 2007 3:58 pm Posts: 166
|
|
HAHA guys... im used to doing it the easy way when i used to disassemble win32 apps ... named subs, named api calls, gosh it was a walk in the park... what do i know about microcontrollers anyway damn
|
|
| Top |
|
 |
|
hmanxx
|
Post subject: Posted: Sun Jul 08, 2007 12:58 pm |
|
 |
| RomRaider Donator |
Joined: Wed Jul 12, 2006 11:01 am Posts: 154
|
|
i am keen to read /digest the codes then share with the community however I dont have IDA with me, Any kind soul willing to help me disassemble the MY05 wrx 16bits ROM and generate the assembly listing ?
|
|
| Top |
|
 |
|
jasonzemos
|
Post subject: Posted: Wed Jul 11, 2007 7:04 pm |
|
 |
| Newbie |
Joined: Tue Sep 12, 2006 9:14 pm Posts: 16
|
merchgod wrote: Use processor Motorola 6816. Entry point 0x220 (hit G, 0x220, hit C).
Do you have this information for the 32 bit systems?
|
|
| Top |
|
 |
|
merchgod
|
Post subject: Posted: Wed Jul 11, 2007 8:08 pm |
|
 |
| RomRaider Donator |
 |
Joined: Wed Mar 29, 2006 10:38 pm Posts: 5336
|
|
Use Hitachi SH4B for the 32bit ecus.
|
|
| Top |
|
 |
|
Tgui
|
Post subject: Posted: Mon Jul 23, 2007 5:17 pm |
|
 |
| RomRaider Developer |
Joined: Tue Jul 11, 2006 9:25 pm Posts: 1025
|
merchgod wrote: Use Hitachi SH4B for the 32bit ecus.
Might as well ask this for others to find. On the 04 STi roms (of any particular version you care to reference in your reply), I realize that the entry points are listed through the first bit of the rom, but could you give me an example of an entry point to start disassembling from? Something to *boostrap* my efforts... ok, that was a lame joke.
I'm not sure this question is clear as I've only been playing with IDA Pro 5 for a short while. Let me know.
Also, as an exercise to get more acquainted with the tool, I'm attempting to pull map data (like boost map B) based on the address listed in the ecu_defs.xml. I can see where data might be, but how within the code frame of IDA would I change the number representation to something more readable. I'd actually like to see the '15' in 15psi.
Thanks!
|
|
| Top |
|
 |
|
merchgod
|
Post subject: Posted: Mon Jul 23, 2007 5:48 pm |
|
 |
| RomRaider Donator |
 |
Joined: Wed Mar 29, 2006 10:38 pm Posts: 5336
|
Tgui wrote: Might as well ask this for others to find. On the 04 STi roms (of any particular version you care to reference in your reply), I realize that the entry points are listed through the first bit of the rom, but could you give me an example of an entry point to start disassembling from? There's a series of jump instructions, one after another, that begin somewhere between 0xF000 to 0x13000 (varies by rom). I just look for the 0x430B opcode (highlight it in IDA's hex view) and look in that range and find where they are aligned. Then start there and mark it as code and go to the next unexplored block (ctrl-U) skipping over the alignment bytes. Keep doing that as long as it is fruitful. Basically this unfolds a decent portion of the rom with the least amount of effort. Quote: Also, as an exercise to get more acquainted with the tool, I'm attempting to pull map data (like boost map B) based on the address listed in the ecu_defs.xml. I can see where data might be, but how within the code frame of IDA would I change the number representation to something more readable. I'd actually like to see the '15' in 15psi. 
Not sure if you can do that in IDA or not (apply some conversion formula to data). Besides, that is what RomRaider is for! Boost is represented in mmHg absolute in the 32bit rom.
|
|
| Top |
|
 |
|
Tgui
|
Post subject: Posted: Mon Jul 23, 2007 10:17 pm |
|
 |
| RomRaider Developer |
Joined: Tue Jul 11, 2006 9:25 pm Posts: 1025
|
^^ Thanks for the primer  Its appreciated. You might be getting a ton of stupid questions in the future from me.
lol, I know I know, I was just shooting for something familiar to look at as I learn the tool.
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 14 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 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
|
|