Subaru ROM patching for logging

Subaru ROM patching for logging

Postby cboles » Wed Nov 04, 2009 12:52 pm

I'm starting another thread here for some work I am doing on creating patches for Subaru ROMs to improve logging speed and adding functionality. I already have some of the patches finished, but I am adding new patching functionality to EcuFlash so that people will be able to patch their ROMs safely without chance of error. Here are some of the patches I am working on:

--complete--
* RAM parameters for CAN ECUs
* multibyte reads from a single request (CAN ECUs)

--in progress--
* multibyte reads from a single request (K-line ECUs)

The completed patches are now part of EcuFlash that you can download here:

http://forums.openecu.org/viewtopic.php?f=57&t=4319

Using patches is pretty simple from a user perspective. If you have a ROM loaded that EcuFlash has supported patches for, you will see a "Patches" category listed in the ROM metadata window with available patches within it. Each patch has a checkbox showing if it is currently active or not. Simply check or uncheck the ones you want and reflash your ECU to get started using them.
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby ladams00 » Wed Nov 04, 2009 11:47 pm

Out of curiosity, Colby:

Would a logging/comms speed patch like the ones you're developing collide with other patches out there like TinyWRX's Launch Control + Flat Foot Shifting?
ladams00
 
Posts: 23
Joined: Wed Sep 30, 2009 10:41 am

Re: Subaru ROM patching for logging

Postby cboles » Thu Nov 05, 2009 10:08 am

ladams00 wrote:Out of curiosity, Colby:

Would a logging/comms speed patch like the ones you're developing collide with other patches out there like TinyWRX's Launch Control + Flat Foot Shifting?


Yes - it is a smart patching system, much like a linker for a compiler. It finds safe places to put code and doesn't overwrite any code that is already there. It also is not specific to a particular ROM, i.e. it identifies the relevant code in your ROM before patching it. The intial versions of these patches will be closed, but I hope to come up with a scripting language for patching that uses my patching API so that others can contribute patches as well.
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby cboles » Sun Nov 08, 2009 11:47 am

New beta of EcuFlash is up now at the top of this thread that patches Subaru CAN ROMs for better logging. Stay tuned for more!
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby mdedwar » Sun Nov 08, 2009 4:51 pm

cboles wrote:New beta of EcuFlash is up now at the top of this thread that patches Subaru CAN ROMs for better logging. Stay tuned for more!

Hi Colby,
Is this supposed to work with all Subaru CAN ROMS? I tried it with mine (A8DK100M ecu id 4E52584007) but could not see an extra patch tab.

Cheers,
Matt.
mdedwar
 
Posts: 24
Joined: Sun Oct 04, 2009 3:23 pm

Re: Subaru ROM patching for logging

Postby cboles » Sun Nov 08, 2009 7:21 pm

mdedwar wrote:
cboles wrote:New beta of EcuFlash is up now at the top of this thread that patches Subaru CAN ROMs for better logging. Stay tuned for more!

Hi Colby,
Is this supposed to work with all Subaru CAN ROMS? I tried it with mine (A8DK100M ecu id 4E52584007) but could not see an extra patch tab.

Cheers,
Matt.


I don't have your particular ROM, I do have A8DK100L though, which should be close, and it doesn't show up as patchable either. Are you actually able to log via CAN with this ROM version?
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby mdedwar » Sun Nov 08, 2009 9:29 pm

cboles wrote:
mdedwar wrote:
cboles wrote:New beta of EcuFlash is up now at the top of this thread that patches Subaru CAN ROMs for better logging. Stay tuned for more!

Hi Colby,
Is this supposed to work with all Subaru CAN ROMS? I tried it with mine (A8DK100M ecu id 4E52584007) but could not see an extra patch tab.

Cheers,
Matt.


I don't have your particular ROM, I do have A8DK100L though, which should be close, and it doesn't show up as patchable either. Are you actually able to log via CAN with this ROM version?


This was the first forester to come out with the canbus in Australia. CAN logging works fine.

Here is a link to the base ROM http://www.romraider.com/forum/download/file.php?id=5659
mdedwar
 
Posts: 24
Joined: Sun Oct 04, 2009 3:23 pm

Re: Subaru ROM patching for logging

Postby cboles » Tue Nov 10, 2009 8:04 am

I'll take a look at that ROM. There must be something different in the parameter read code...

mdedwar wrote:This was the first forester to come out with the canbus in Australia. CAN logging works fine.

Here is a link to the base ROM http://www.romraider.com/forum/download/file.php?id=5659
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby Mart » Thu Nov 12, 2009 7:26 am

Hi Colby,

I am a bit confused.

so far with this patch, is there or will be any speed gains for READ MEMORY COMMAND with K-LINE?

Such as:

USDM 06 STI
ECUID: 4312594006
ROMID: A2ZJE11J
PARAM: LOAD
Address: FF4F58

thanx

Mart
Mart
 
Posts: 29
Joined: Wed May 14, 2008 5:51 pm

Re: Subaru ROM patching for logging

Postby Merp » Thu Nov 12, 2009 5:01 pm

Great!

Please post some details of the patching method, I'm working on some upgrades to launch control patches as well as speed density stuff. It sounds like this integration would make things much easier for the user. Would it be possible to have a separate definition enabled with a patch? eg speed density maps, and compensations?
Merp
 
Posts: 22
Joined: Mon Mar 02, 2009 4:23 pm

Re: Subaru ROM patching for logging

Postby cboles » Thu Nov 12, 2009 5:46 pm

No. It is a patch for CAN. I'm working on other patches for K-line (that will work in the same way).

Mart wrote:Hi Colby,

I am a bit confused.

so far with this patch, is there or will be any speed gains for READ MEMORY COMMAND with K-LINE?

Such as:

USDM 06 STI
ECUID: 4312594006
ROMID: A2ZJE11J
PARAM: LOAD
Address: FF4F58

thanx

Mart
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby cboles » Thu Nov 12, 2009 5:55 pm

No details to post yet - my current patching is coded in C++ inside of EcuFlash. The plan is to host a scripting engine with EcuFlash patching API functions. Basically the script author would have to implement methods that would query the current patch state of a ROM (or if it is patchable at all), and method to do the patching. EcuFlash will help make that easy by providing functions to read binary or text encoded hex patch and mask data, functions to find all instances of masked patterns, functions to replace patterns, functions to find free memory areas to place extra code, etc.

In the case of my CAN patch, this is pretty trivial as the patch is the same size as the original code, and designed to be position independent, so it is just a search-and-replace operation. For more advanced patches with extra code, there is some search-and-replace along with placing new code in free ROM space, and updating function addresses in the inserted code.

Merp wrote:Great!

Please post some details of the patching method, I'm working on some upgrades to launch control patches as well as speed density stuff. It sounds like this integration would make things much easier for the user. Would it be possible to have a separate definition enabled with a patch? eg speed density maps, and compensations?
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby cboles » Thu Nov 12, 2009 5:59 pm

Yes - that sounds like a good idea. The definition XMLs for those might actually be provided by the patching module because where those maps are placed might only be known by the patch itself.

Merp wrote:Would it be possible to have a separate definition enabled with a patch? eg speed density maps, and compensations?
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Re: Subaru ROM patching for logging

Postby Merp » Thu Nov 12, 2009 6:09 pm

Awesome, sounds pretty robust, and should make porting existing patches to different roms much easier. Keep us posted.

Also, its OT, but what is the likelyhood of a linux build of ECUflash in the future?
Merp
 
Posts: 22
Joined: Mon Mar 02, 2009 4:23 pm

Re: Subaru ROM patching for logging

Postby Digitalfiend » Sun Nov 22, 2009 6:51 pm

What sort of speed improvements are we talking about here? Would it be realistic to get 5-6 samples per second with 6-8 parameters?

I assume this patch will obviously not work with any of Cobb's maps, right? I'm using an AccessTUNER Race right now on my '08 STI and use my Tactrix 2.0 cable to log, but if the speed improvements are significant, I might consider porting everything to ECUFlash/RomRaider and going from there. I find the current resolution of 300-450ms for 6-8 parameters a bit too coarse for my liking.
Digitalfiend
 
Posts: 11
Joined: Tue Aug 30, 2005 4:23 pm

Next

Return to Openport Stand-Alone Logging Beta

Who is online

Users browsing this forum: No registered users and 9 guests

cron