RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Wed Dec 24, 2025 6:48 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Real time tuning on Evo... progress so far
PostPosted: Mon Feb 12, 2007 5:02 pm 
I have read with interest the work on RAM tuning on the Subarus.

I have an Evo 9, and whilst this is not directly RomRaider related (I have used the software for a Subaru 05 STI - very nice BTW), I thought it would be nice to discuss progress with you guys.

The Evo 7-9 uses SH7052 or 7055 chip.

I am working with others on disassembly. I have already inserted my own code segments to map switch between the existing low and high octane fuel and timing maps in ROM, but like you guys I want to do real time mapping.

The problem is that the Evo MUT protocol we're all using that is high speed compared with OBD II only sends a byte request which is echoed and followed by a byte reply. I need a protocol that can read/write byte/word/long, and then I think locating maps in RAM and modifying them will be possible. Here is what I posted on evolutionm.net that may be of interest. I think you guys are well ahead of me on the Subaru but I think the comms are holding you up too? I'm really interested in your thoughts here or on evolutionm.net. http://forums.evolutionm.net/showthread.php?t=250922

"Having successfully inserted a jump in to the ECU code and inserted my own routine to change a single RAM variable in response to a requestID, the next step is to consider how to implement real time mapping.

The comms protocol is I suggest the place to start.

We need a method of reading and writing to RAM. To do this we need say:

One byte that is a command such as read or write
Four bytes to give the address (or maybe two if we are always in a 64 kilobyte range)
One, two or four bytes for the result of the read or the value to write

So really we need to send and receive packets. We need three write and three read commands to work on byte, word (2 bytes) or long (4 bytes). We need all of these lengths, because mapped values to change can be either byte or word. Addresses to relocated tables will be long.

A good protocol THAT IS SIMPLE, worked out now will pay dividends later.

This is I think the most difficult part of getting real time mapping going. It is fairly easy I think to relocate tables to other addresses by simply using a vector table in RAM that tells the ECU where to look - either the original ROM or in RAM.

Writing a protocol from scratch would be a pain and buggy! Hijacking something already there would be good. Bez's mods allowed the request ID to write out two bytes, hopefully we can modify it to do up to 8, and also receive up to 8.

I'm fairly happy to write the routines to process these packets I think. I'm using the Lauterbach monitor for assembling snippets, although I have to work out the offsets to read variables manually(!) and I then have to manually transfer the hex into the ROM using a hex editor."


Top
  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 5:25 pm 
Offline
Newbie

Joined: Mon Jul 31, 2006 9:10 am
Posts: 48
The trouble IMO right now is getting something that will properly read all of the RAM in a reasonable time. On top of that the protocol for the 16bit and 32bit ecu's are farily different. We have been able to read RAM from 16bit ecu's in the past with ecuexploer but not the 32bits. With that, the 16bit ecu's will soon have the ability to tune in realtime but far away from the 32bits. From what I understand, the code has already been written to implement realtime tuning for the 16bit ecu's. The only hold back now is writting this into the current RomRaider format which will require an overhaul of the programming.

_________________
2005 CGM STi


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 5:28 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 2079
Location: Palo, IA
Awesome news! This isn't at all unrelated, actually -- we're working on an overhaul right now which should fix a lot of the existing problems with the tuning interface, including allowing support for signed integers, which is the only holdup for Evo support.

jfitzpat is working on interfaces for the logger which will allow protocols to be added quite easily, and we're planning on adding MUT. From there it should be relatively easy to add the ability to read blocks of memory, and in fact we've been planning that as well for reading stored 3d learning tables.

Writing to RAM is something we haven't really tried yet. Tinywrex and ev8siv3 had some success doing it via SSM, but I haven't had a chance to look in to this for myself.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:13 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 2079
Location: Palo, IA
Reading the memory shouldn't be slow -- with SSM we're able to log 10 parameters (20 bytes) at 10hz. Reading the entire 32kb is of course slower, but we won't need to do that for realtime tuning -- a full 16x10 table on a 32 bit ecu would be under 1kb, and you'd be able to do whatever you want while it's reading.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 6:37 pm 
MUT protocol is a similar rate, about 200 per sec, although we have worked out how to increase the baud rate by making code changes in the ROM.

If we're economical then most of the time a modification should just be a simple human entry of a new value in a cell, or maybe a block inc/dec/scale.


Top
  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 5:35 am 
Offline
Newbie

Joined: Sun Feb 12, 2006 3:10 am
Posts: 90
John the SSP has built-in single write/blockwrite commands. In fact you need 1 command only, the blockwrite and you can use it for bytes, words,doublewords etc.
e.g.
<command byte><address><#data bytes><data>[data][data]

I havent looked into MUT protocol at all but i would suspect that is has a similar command. So either you dive into the disasm, or find out if a dealer tool has the ability to raise/lower idle or stuff like that (subaru does), that would imply that the command is there.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 14, 2007 12:36 pm 
Can't find a read/write already in the protocol.

So I think we'll be expanding the byte request, byte echo of request, byte result to words. We already have the result changed to output as a word, really just need to get the request to the ECU as a word in a buffer, then I can play with it.

http://www.aktivematrix.com/forum/viewtopic.php?t=158


Top
  
 
 Post subject: Now reading and writing
PostPosted: Wed Mar 07, 2007 2:47 pm 
http://forums.evolutionm.net/showthread ... ost4058810


Top
  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 1:45 pm 
Now got a block read routine running, and a block copy.

So I have a datalogger command I can use to copy fuel map from ROM to RAM. I changed the pointers to run the fuel map from RAM and it works, can be edited by stringing together requests in a window. Obviously needs a GUI like you guys!


Top
  
 
 Post subject:
PostPosted: Mon Apr 02, 2007 12:37 pm 
Offline
Experienced
User avatar

Joined: Mon Sep 18, 2006 10:55 am
Posts: 229
man, you evo guys are no joke.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 02, 2007 2:40 pm 
We've got a bit further... but have yet to get the GUI to display the fuel map that can be read from RAM and send appropriate editing commands back to the ECU.

http://forums.evolutionm.net/showthread.php?t=261072

Just some debate on where we go with the protocol since the standard protocol is byte request, byte reply, and I am sending multibyte requests and replies using buffers and counters in my own code.

One user wants to scrap the entire Mitsi/OBD logging protocol entirely to setup our own without needing any init procedures, but the US guys need OBD compatibility for inspections.


Top
  
 
 Post subject:
PostPosted: Mon Apr 02, 2007 11:18 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2565
Can you set aside a byte which, when set to a chosen value, causes the ECU start speaking your custom protocol? If you're ready to go to the trouble of creating a custom protocol, then adding some code to switch between protocols doesn't sound like much extra work.

(Says the guy who hasn't written asm since 1994.)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 3:48 am 
Yes I think we could do that.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


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

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl