88590015 Evo Live Map - source
#1
Evolved Member
Thread Starter
88590015 Evo Live Map - source
I have been asked for the source. There are quite a few changes I warn you!
changesnew describes the locations that are changed and the other four files are the asm files that are patched in.
changesnew describes the locations that are changed and the other four files are the asm files that are patched in.
#3
Evolving Member
Join Date: Sep 2006
Location: Germany
Posts: 152
Likes: 0
Received 0 Likes
on
0 Posts
Short update.
I haven' t already implement Johns Code. It is quite hard for me, because I have not a tephra patched rom and so I must place the code at different locations.
In addition, I don't know the complete communication protocol.
I will try to develop a small/simple version of DMA logging first.
Activate with a switch it will poll a new Log table in the rom and will simply give out these bytes without any protocol. These bytes can be logged with every terminal program that can write a bin file.
I haven' t already implement Johns Code. It is quite hard for me, because I have not a tephra patched rom and so I must place the code at different locations.
In addition, I don't know the complete communication protocol.
I will try to develop a small/simple version of DMA logging first.
Activate with a switch it will poll a new Log table in the rom and will simply give out these bytes without any protocol. These bytes can be logged with every terminal program that can write a bin file.
#4
Evolved Member
Thread Starter
The only bit that really works with Tephra mods is the alt maps to RAM. You can still implement the DMA stuff no problem. If you rewrite it will be use lots of your time which I have already put in, so please ask what you want to know
#6
Evolved Member
Thread Starter
Init MUT as usual, then you have three extra MUT commands E0, E1, E2, here is E0 (in this example logging the first 64 (0x40) bytes of the MUT table on my Evo IX JDM):
Command, wait, 4 byte address, 2 byte length, data
E0 [wait >2ms for 38400 baud] 00 03 59 20 00 40 [reply is 0x0040 bytes from 0x035920]
NOTES:
The wait gives MUT time to respond to the E0 command - MUT is slow!
If you transfer long blocks of data using DMA you have to make sure the FTDI timeout is long enough - standard 500ms should get through about 781 bytes which is more than enough for logging, but not enough for my 2048 blocks for RAM read/write.
The way the ECU code works is that an Ex command triggers a DMA setup to transfer 6 bytes that has the 4 byte address and 2 byte length. Then when this first DMA transfer has finished, the second one is setup using the 4 byte address and 2 byte length we just read. The DMA mode (read/write, direct/indirect etc) is specified depending on whether the command is E0, E1 or E2. I use a couple of flags (one I chose to be 0x37 for no special reason except that it wasn't 0 or FF), the other helps direct the DMA interrupts to process the command/data correctly.
Command, wait, 4 byte address, 2 byte length, data
E0 [wait >2ms for 38400 baud] 00 03 59 20 00 40 [reply is 0x0040 bytes from 0x035920]
NOTES:
The wait gives MUT time to respond to the E0 command - MUT is slow!
If you transfer long blocks of data using DMA you have to make sure the FTDI timeout is long enough - standard 500ms should get through about 781 bytes which is more than enough for logging, but not enough for my 2048 blocks for RAM read/write.
The way the ECU code works is that an Ex command triggers a DMA setup to transfer 6 bytes that has the 4 byte address and 2 byte length. Then when this first DMA transfer has finished, the second one is setup using the 4 byte address and 2 byte length we just read. The DMA mode (read/write, direct/indirect etc) is specified depending on whether the command is E0, E1 or E2. I use a couple of flags (one I chose to be 0x37 for no special reason except that it wasn't 0 or FF), the other helps direct the DMA interrupts to process the command/data correctly.
#7
Evolving Member
Join Date: Sep 2006
Location: Germany
Posts: 152
Likes: 0
Received 0 Likes
on
0 Posts
Hi John.
Can you give me a brief description how the ram table feature work?
I have not completely understand the the ram-pointer conversion stuff?
Are the alt maps all fix in ram? Are the maps copied automatically, or must this be done with your front end program, before starting.
Can you give me a brief description how the ram table feature work?
I have not completely understand the the ram-pointer conversion stuff?
Are the alt maps all fix in ram? Are the maps copied automatically, or must this be done with your front end program, before starting.
Trending Topics
#8
Evolved Member
Thread Starter
Tephra's stuff has pointers to alt maps in ROM. I change his pointers to RAM.
The maps are copied automatically from the ROM alt maps to RAM - on the IX I do this by patching into the ECU's routine that resets the fuel trims after a cold reset or reflash. On the VII/VIII I think it would be best to check for valid header info or a flag.
The maps are copied automatically from the ROM alt maps to RAM - on the IX I do this by patching into the ECU's routine that resets the fuel trims after a cold reset or reflash. On the VII/VIII I think it would be best to check for valid header info or a flag.
#11
Evolving Member
Join Date: Sep 2006
Location: Germany
Posts: 152
Likes: 0
Received 0 Likes
on
0 Posts
Yea, I found it this morning (no Inet access so I can't tell it here). Yesterday I was a little blind. I have just search for the first ram address and have not done a closer look to your txt. Code is in newest4.txt.
#12
Evolving Member
iTrader: (4)
Join Date: Dec 2003
Location: Ventura County, CA
Posts: 357
Likes: 0
Received 0 Likes
on
0 Posts
I have a thought for the Evo Live Map program...
How about we code in a way to automatically detect what ROM family the user is using so then it can look up a specific xml for that ROM and get the ROM, RAM, and MUT addresses from the xml.
It can work something like ecuflash. Ecuflash has a subdirectory with all the ROM xmls in it.
I am not sure how to autodetect what ROM is opened though. Maybe others know.
Or we can just add in a combobox into the program which populates all its values from the list of xmls in the subdirectory?
edit: Actually a subdirectory with a bunch of xml files isn't really needed I think. All the ROMs and their addresses can be put in blockaddress.xml, just restruct the xml in there. Then the combobox can be populated from all the children (ROMs) in blockaddress.xml
How about we code in a way to automatically detect what ROM family the user is using so then it can look up a specific xml for that ROM and get the ROM, RAM, and MUT addresses from the xml.
It can work something like ecuflash. Ecuflash has a subdirectory with all the ROM xmls in it.
I am not sure how to autodetect what ROM is opened though. Maybe others know.
Or we can just add in a combobox into the program which populates all its values from the list of xmls in the subdirectory?
edit: Actually a subdirectory with a bunch of xml files isn't really needed I think. All the ROMs and their addresses can be put in blockaddress.xml, just restruct the xml in there. Then the combobox can be populated from all the children (ROMs) in blockaddress.xml
Last edited by roger smith; Jul 24, 2009 at 01:19 PM.
Thread
Thread Starter
Forum
Replies
Last Post
88590015, code, connecting, dma, download, ecu, evo, identifier, ix, live, livemapping, map, patch, rom, source