NefMoto

Technical => Reverse Engineering => Topic started by: rajivc666 on February 20, 2012, 02:43:06 AM



Title: Multi map selection using cruz control
Post by: rajivc666 on February 20, 2012, 02:43:06 AM
Hi, this is a work in progress as of now. you can select multiple maps by switching on the cruise control keeping the clutch pressed,after that switch it back off and then on for the next map, can be switched when the car is being driven. There are 5 maps 4th and 5th is the same. 1) valet mode load 93% till 3000 rpm then 0%. 2) 150 bhp 3) 180 bhp 4&5 is a little higher than 180. Both ldrxn and LDRXNzk is switched. Can be made to access any number of maps.

Problem--
Their is no way of knowing which map is running unless you log memory space 0x3870fa.
Timing does not change but plan to include timing switch in future.

Would like to know from the experts how to flash the CEL light as to indicate which map is running.
Please put in your suggestions for improving the code
Thanks.


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on February 20, 2012, 11:38:10 AM
Nice work!  But what ECU is this for specifically?

I know nothing about programming so I will not be of much help here, but I'm assuming people wanting to help will need to see the actual "code" no?


Title: Re: Multi map selection using cruz control
Post by: phila_dot on February 20, 2012, 11:50:26 AM
Definitely interested in seeing how you implemented this.

Setting the MIL should be the easy part. IIRC there are condition bytes for MIL on and flashing.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 20, 2012, 11:51:56 AM
hi, its a 1.8t 06A906032hj ecu, though can be coded for any ecu. Its running fine on my car.
Here is the code at 0x8ffd40
 
extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_1
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_1
cc_isset:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_1:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset
     JB   0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit
CC_notset:
     jnb  0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I
     mov r4,#14h
     jmpr CC_uc,set_boost
  I:
     cmp  r4,#14H
     jmpr CC_nz,II
     mov r4,#3ch
     jmpr CC_uc,set_boost
 II:
     cmp  r4,#3cH
     jmpr CC_nz,III
     mov r4,#64h
     jmpr CC_uc,set_boost
 III:
     cmp  r4,#64H
     jmpr CC_nz,Iv
     mov r4, #0C8h
     jmpr CC_uc,set_boost
Iv:    
     mov r4,#0ah
set_boost:    
     extp #0e1h,#1
     mov 30fah,r4
exit:
    mov r12, #0e400h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
ldrxnzk:    
     extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_11
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_11
cc_isset1:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_11:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset1
     JB   0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit1
CC_notset1:
     jnb  0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit1
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I1
     mov r4,#14h
     jmpr CC_uc,set_boost1
  I1:
     cmp  r4,#14H
     jmpr CC_nz,II1
     mov r4,#3ch
     jmpr CC_uc,set_boost1
 II1:
     cmp  r4,#3cH
     jmpr CC_nz,III1
     mov r4,#64h
     jmpr CC_uc,set_boost1
 III1:
     cmp  r4,#64H
     jmpr CC_nz,Iv1
     mov r4, #0C8h
     jmpr CC_uc,set_boost1
Iv1:    
     mov r4,#0ah
set_boost1:    
     extp #0e1h,#1
     mov 30fah,r4
exit1:
    mov r12, #0e4d0h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
 


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 20, 2012, 11:53:34 AM
For simplicity sake i have repeated codes for ldrxnzk, think can be made shorter if coded smartly.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 20, 2012, 12:00:24 PM
Definitely interested in seeing how you implemented this.

Setting the MIL should be the easy part. IIRC there are condition bytes for MIL on and flashing.
Can you please give the details, ideally i would like the CEL to flash number of times the map number  selected.


Title: Re: Multi map selection using cruz control
Post by: rob.mwpropane on February 20, 2012, 08:04:44 PM
This is great work, I wish I could be more help besides a pat on the back. You'll have to excuse my novice question, but could this be potentially used to switch between E85 and 93?


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 20, 2012, 11:33:45 PM
Hi, can you tell me the maps that has to be switched for switching between e85 and e93, I can give it a try.


Title: Re: Multi map selection using cruz control
Post by: masterj on February 21, 2012, 02:20:38 AM
This is great work, I wish I could be more help besides a pat on the back. You'll have to excuse my novice question, but could this be potentially used to switch between E85 and 93?

I think it would be these maps: KRTKE, KFZW/2..


Title: Re: Multi map selection using cruz control
Post by: rob.mwpropane on February 21, 2012, 05:52:18 AM
I should have been more precise. For a pretty basic E85/93 oct switch, you would need 2 versions of KRKTE to switch back and forth, along with 2 versions of KFZW/KFZW2. I'm not a programmer either, so I'm unsure of the logic that goes into your "switching" and how far you can take it. No matter what, still great work.


Title: Re: Multi map selection using cruz control
Post by: modzila on February 21, 2012, 07:16:31 AM
I will not be able to add value to this, but I can express my amazement at what you did for the community there!!

Credit where credit is due


Title: Re: Multi map selection using cruz control
Post by: phila_dot on February 21, 2012, 04:41:10 PM
Can you please give the details, ideally i would like the CEL to flash number of times the map number  selected.

It looks like B_mil at 0x00FD22 (M box) should do it.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 21, 2012, 11:47:16 PM
Thank you everybody, 99% of whatever I know about ecu tuning is from this forum. The progress is I have completed the code required for switching kfzw/kfzw2 and krkte. But the most important testing is yet to be done as I am out of station for two days. I had made one ldrxn/lrxnzk map switch with accelerator/brake combination for those of you who does not have cruise control but it didnt work while testing but still believe with some help might be able to make it work.
My plan is to switch ldrxn/ldrxnzk as before with cruise on switch and clutch. And kfzw/kfzw2 and krkte with cruise reset/dec button and clutch. So you can have different boost levels for different timings/krkte.
Thanks
 


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 22, 2012, 12:15:38 AM
oH .. thanks phila_dot  ;D, I had not seen your reply. I will try and make the visual indication part work as soon as the code is working as desired.


Title: Re: Multi map selection using cruz control
Post by: jacog on February 22, 2012, 05:11:59 AM
For simplicity sake i have repeated codes for ldrxnzk, think can be made shorter if coded smartly.
Thanks for you effort to provide us this nice feature in ME7.5. But am I right that you have to use different variable for holding previous state of TCS switch? I'm talking about variable 0x387000. In code you showed (maybe in binary it is fixed), one event (clutch depressed, tcs off->on) will switch only one map (depends which subroutine is currently active).


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 22, 2012, 07:06:58 AM
The file I posted is a working file so the code is ok. Memory space 387000 is what holds the previous state of the cruze control button. First it is checked whether there is any change in state of cruise control if there is then it is saved in 387000 and
then is it checked switch on or off ,
if off then exit ,
if on check clutch -- if pressed then change map if not exit.

here the lrdxn and lrdxnzk maps have been converted into 3d maps with y axis numbers being 0a,14,3c,64,c8 ,so depending on the value of 3870fa maps are switched. The lrdxn and lrdxnzk in default location is ignored.


Title: Re: Multi map selection using cruz control
Post by: jacog on February 22, 2012, 10:55:43 AM
Thanks for reply. So if we assume that lrdxn function is called first from original code and then after return from lrdxn(), function lrdxnzk() is called so will be enough to call only exit1() because checking for map switch event will be served in lrdxn(). Anyway, great job and I will try to test your code soon.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 23, 2012, 03:16:45 AM
If you have  HJ box its flash and play :)


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 23, 2012, 09:15:11 AM
hi, completed and tested the code for switching kfzw,kfzw2, krkte ,ldrxn & ldrxnzk. working fine. Still no visual indication. Timing and krkte can be switched together , total of three thou any number can be added, switched  using the set/dec cruise control stock. ldrxn& ldrxnzk can be switched with cruise on/off button. I am attaching the code and hj bin file which is ready to go, but is not tested extensively so try it at your own risk  ;D. Please leave your suggestions.
Thanks


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 23, 2012, 09:30:42 AM
Forgot to add you have to press the clutch for switching.


Title: Re: Multi map selection using cruz control
Post by: sn00k on February 23, 2012, 10:35:12 AM
Definitely following this, this would be a very nice addition to add to my own HN-tune, for the capability of using e85 as an alternate fuel, since its available everywhere around here.
(HN and HJ boxes are compatible between cars, alltho the maps are located differently inside the flash, HJ representing the 150hk box and HN the 180hk)

i would basically need only TWO setups to switch between, and the maps i would want to be switched is KRKTE, LDRXN, KFZW and KFZW2, is this possible to do with ONE flip on the cruisecontrol?
also, if the light could be made to blink 1 time for "normal" operation and 2 times for "alternate fuel" this would be awesome, can this be done? =)


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 23, 2012, 11:06:48 AM
yes i have plans to add visual indication as soon as i know how to  ;D.  Yes  its switching at the press of button I mentioned above + clutch. For timing and krkte remember to keep cruise control switch in on position without pressing the clutch and then press the clutch and the set/dec button. It can be done even when your driving the vehicle. For switching between boxes a certain amount of work has to be done for starts you have to call this code from 9 different places. I plan to explain it later. I am not a programmer so the code is written all over the place and also repeated several times which can be done more elegantly which will make it easier to understand for beginers who wants to put it to a diffrent box ,  may be somebody can help.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 24, 2012, 09:51:56 AM

(HN and HJ boxes are compatible between cars, alltho the maps are located differently inside the flash, HJ representing the 150hk box and HN the 180hk)
[/quote]
 I tried flashing HN tune in my box,  its not working buddy. Anybody know of a 180bhp tune which will work in HJ box.


Title: Re: Multi map selection using cruz control
Post by: sn00k on February 24, 2012, 05:35:02 PM
hmm, that is weird.. alltho running a HN box on a HJ car is no problem as ive done this myself.

perhaps the HJ box is not compatible with the HN flash.
(i have yet to find a box that wont accept this HN file.. running it on 5 different cars atm.. 2 golfs, audi a3, passat, audi a6)

this is the original file from my HN box that ive used for base in my tunes.
i have seen a few different ones on here earlier.

wont start at all?

it is 2002> and needs checksums to be calculated as per the me7-2002 standard when making changes to it.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 29, 2012, 01:26:19 PM
Managed to put visual indication by flashing MIL. For different LDRXN and LDRXNZK maps will flash from 1 to 5 times depending on the map. For different KRKTE , KFZW, KFZW2 MAPS  will flash 1 to 3 times. When the car is started the light flashes faster and double the number of time as I think ECU clears the MIL before the code clears it. Will try and post a HN box soon. Also attaching definitions of the new map locations.



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on February 29, 2012, 01:41:05 PM
I have changed LALIUS by 10% to run lean and all 3  krkte to match it. Other maps changed are kfzwop,kfzwop2. Max lambda limit rich to actual 11 AFR after correction for LALIUS, changed LAMFA etc. Logged the tune was running fine.

Edit: Looks like the maps did get exported. Here.


Title: Re: Multi map selection using cruz control
Post by: sn00k on March 01, 2012, 05:26:29 AM
Looking good!  :)

is it possible to make this function swap kfzw, kfzw2, ldrxn and krkte with just ONE flip on the CC?

..and have three different setups, where the mil-light flashes:
1 time for set 1
2 times for set 2
3 for set 3

these would be the maps to change when using alternative fuels..
so if ive fueld the car with 93oct from previously 91, i would just get in the car and flip the switch ONE time to activate the 93oct mode.. located as the 2:nd set, NOT having to go thru different ldrxn maps to match the kfzw, kfzw2, krkte etc, as this would result in major engine damage if the wrong one were to be chosen.

..having 3 different "sets" would be safer, easier and more manageble imo..  :)


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 02, 2012, 02:49:49 AM
I will try that snook, meanwhile can you try this. I have no way to test it so be ready to go bootmode.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 02, 2012, 03:43:36 AM
Sorry there was a mistake in the code will post the correct one shortly.

Edit:


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 02, 2012, 10:06:44 AM
Guys please leave a feedback if you are testing it as I cant test it myself. Your suggestions for improvement are  welcome, Thanks.


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on March 02, 2012, 10:17:02 AM
I'd love to start testing this for you on the S4 platform.. but I have really no idea what I am doing when working with assembly code.

But if someone want's to work on a port for put up a detailed description of how this could be ported into say the M-box code I would be more then happy to try it for you.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 02, 2012, 10:22:36 AM
I hate writing explanations and stuff because I am very bad at it, But let me try and make one for the M-box, I simply have lot of time at hand  ;D




Title: Re: Multi map selection using cruz control
Post by: createddeleted on March 02, 2012, 10:30:53 AM
I would test the file, but at the point I can't do boot mode and am using the car daily. Once I rework my bench setup and get my spare ecu in this week I'll give it a go.  ;D


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on March 02, 2012, 11:21:59 AM
I hate writing explanations and stuff because I am very bad at it, But let me try and make one for the M-box, I simply have lot of time at hand  ;D

hehe... alright.. well let me know if you do and I would be willing to test for sure.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 02, 2012, 11:28:49 PM
Does the S4 have a cruise control, If not what will be the best way to switch maps, is switching maps with a tap on the brake and accelerator  pedal > than zero a good idea.


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on March 03, 2012, 07:46:36 AM
yes it has cruise, but either way will work fine IMO


Title: Re: Multi map selection using cruz control
Post by: rob.mwpropane on March 03, 2012, 08:39:10 AM
I hate writing explanations and stuff because I am very bad at it, But let me try and make one for the M-box, I simply have lot of time at hand  ;D

I think it goes without saying there are a ton of people that are watching this, or at least there will be. I hope you can write a generic "how to" for ME7 in general. Seems like S4 gets all the love first :'( User Sn00k made a pretty good generic write up, maybe he can help?

At any rate, I think its awesome work, looking forward to seeing this move along, can't wait to give it a go.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 05, 2012, 10:17:39 PM
Rob thanks I will try and make one, I have posted hj and hn boxes. If you compare it to stock boxes you can see where the changes have been made. You will need winols, idapro , setzi's me7 logger and an assembler for  c167. I tried   it on my brothers SG box , the switching was working perfectly but the visual indication part was behaving very differently from the HJ box. Can I have some feedback for the HN box, has anybody tried it yet.


Title: Re: Multi map selection using cruz control
Post by: sn00k on March 06, 2012, 04:56:29 AM
sorry i havent had time to test the HN-file as i forgot to hook up the 4 cables needed for cruise control in this audi, i will try to add them soon and help you test this.

id be happy to help you write a tutorial/explanations for adapting this to other boxes when this function is working in a safe and reliable manner =)
(which imo would be working with 3 different "sets" as described earlier, including those maps, and having an indicator showing which "set" is selected, for i.e "1.normal driving", "2.alternate fuel", "3.track-mode")


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 06, 2012, 10:38:57 AM
Hi here is the m-box map switch. Not tested. Could not find the cruise control bit so maps switch by acclr pedal > zero and brake tap. Switches maps ldrxn,ldrxnzk,krkte,kfzw & kfzw2. ldrxn and ldrxnzk in stock location is ignored. 3  sets are available. Attaching new map definitions for the extra maps,  all set to stock.  Lots had to be changed so there is a good chance of a bug , so please test extensively before you hit the road.
Also please let me know how the visual indication is working , how many times its flashing when ignition on and after starting, the speed of flashing etc.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 06, 2012, 10:50:08 AM
Snook IMO if you leave most of the protections as stock I dont think there is much of a problem , I guess :). I have been testing some crazy kfzw, krkte and ldrxn values and logging it , no problem so for. Anyways I will be writing one based on your idea as its much simpler I guess but its fun to change different maps on the fly.


Title: Re: Multi map selection using cruz control
Post by: jibberjive on March 07, 2012, 01:45:28 AM
Excellent work!  I'm not sure when I'll be able to test this, but I will try soon (m-box).


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 07, 2012, 02:17:07 PM
Notorious have you tried the file yet, as promised.. ;D


Title: Re: Multi map selection using cruz control
Post by: createddeleted on March 07, 2012, 02:38:47 PM
I just got a spare ecu so I'll be able to try the HN file soon :D


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 10, 2012, 10:29:48 AM
Some kind of feedback would be nice if anybody tried it, will keep me encouraged.. :(


Title: Re: Multi map selection using cruz control
Post by: sn00k on March 11, 2012, 05:41:22 AM
sorry on my part, i havent managed to find the time to install these 4 wires for the CC yet.. i will do is asap and help you work with this =/

glad to see you are now working with sets! ;D

you can still change maps on the fly with this method, if you setup set 1 as normal driving.. and set 2 as track mode with i.e higher boost and timing.. and perhaps leave set 3 for i.e E85 fuel.. so nothings has really changed on that part.. switching from set 1 to set 2 can be still done on the fly to change boost and timing.. =)


regarding leaving protection as standard and only change certain maps.. well, most of us are tuning here.. and in this process we are changing some of the "limiting factors" of the ecu.. while still trying to maintain the safety features of the factory tune, it is enevitable so that you end up a bit further away from this.

that said, a k03 turbo can boost about 1.2bar on normal 91oct fuel and LOW timing.. while the same turbo on E85 can boost ~1.5bar at 10-12 deg more advanced timing.. mixing these two and running 1.5bar, +12 deg timing on normal 91oct would literally destroy the engine in seconds.. even tho the ecu would try to pull 15-20degs of timing and enriching the mixture till no end, the damage would allready have been done to pistons etc.
working with "sets" is a safe way to eliminate this, imo :)
youre the one working with the code atm, im not at all trying to tell you what to do, just expressing my opinions to make this a safe and reallt neat feature for people to impliment into their tunes.
keep up the good work, this will be one awesome feature to have when working 100%!  ;D




Title: Re: Multi map selection using cruz control
Post by: rajivc666 on March 12, 2012, 02:48:43 AM

that said, a k03 turbo can boost about 1.2bar on normal 91oct fuel and LOW timing.. while the same turbo on E85 can boost ~1.5bar at 10-12 deg more advanced timing.. mixing these two and running 1.5bar, +12 deg timing on normal 91oct would literally destroy the engine in seconds.. even tho the ecu would try to pull 15-20degs of timing and enriching the mixture till no end, the damage would allready have been done to pistons etc.
working with "sets" is a safe way to eliminate this, imo :)


I understand now.


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on April 03, 2012, 09:09:29 AM
Some kind of feedback would be nice if anybody tried it, will keep me encouraged.. :(

Soon, very soon man... I'm just trying to get some basics fixed in my tune first... then I will gladly try your map switching and let you know what I find.

Thanks again for your hard work so far!


Title: Re: Multi map selection using cruz control
Post by: RaraK on April 04, 2012, 06:27:29 PM
Hmm i wonder if you write nmot_w while key is in on position not started, can you increase the RPM on cluster this way? BMW jb3 does something like this, hold brake, then gas to floor, needle jumps to 1,2,3k rpm spots so you know where you are.  Another way to do things.....


Title: Re: Multi map selection using cruz control
Post by: jibberjive on April 04, 2012, 08:53:51 PM
I hate to ask to be spoonfed regarding this, but I've got so many other things I'm dealing with right now that I probably can't take on the learning curve of dealing with winOLS right now.  Any way you can post the locations/definitions for me to add the multi map stuff to my existing XDF for tunerpro?  If I had that, I could probably test this pretty soon for you (for an m-box S4).


Title: Re: Multi map selection using cruz control
Post by: DonSupreme on April 05, 2012, 10:53:08 AM
Raji,

Which c167 dis assembler are you using?


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on April 14, 2012, 01:56:29 AM
Hmm i wonder if you write nmot_w while key is in on position not started, can you increase the RPM on cluster this way? BMW jb3 does something like this, hold brake, then gas to floor, needle jumps to 1,2,3k rpm spots so you know where you are.  Another way to do things.....
Nice I will give this a try.

I hate to ask to be spoonfed regarding this, but I've got so many other things I'm dealing with right now that I probably can't take on the learning curve of dealing with winOLS right now.  Any way you can post the locations/definitions for me to add the multi map stuff to my existing XDF for tunerpro?  If I had that, I could probably test this pretty soon for you (for an m-box S4).
I am posting the kp file again as I think kfzw, rpm axis was not correct.

Rajiv,
Which c167 dis assembler are you using?

Idapro for dis assembling and reads166 for assembling.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on April 14, 2012, 02:08:21 AM
Regarding the xdf file I am not very familiar with tunerpro. The xdf I have posted is ok except you have to change the address step in row and column of each parameter from -4 to 0 as i am not able to save that, very strange. :o . If anybody can correct that please post the corrected file.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on April 18, 2012, 12:43:02 PM
Found a bug in s4 bin ff03f hex should be 00 instead of 01 or the mil light wont work. Posting the corrected file. Anybody test it yet??


Title: Re: Multi map selection using cruz control
Post by: matchew on June 10, 2012, 10:15:52 PM
https://www.facebook.com/gonzotuning/posts/428323403864153

Surprise surprise.


Title: Re: Multi map selection using cruz control
Post by: Gonzo on June 11, 2012, 04:19:06 PM
https://www.facebook.com/gonzotuning/posts/428323403864153

Surprise surprise.
If you are going to going to promote my products, you might as well link the videos here:
http://www.youtube.com/watch?v=vXJ6TqpG_Vo
http://www.youtube.com/watch?v=kpua4WNAByU
http://www.youtube.com/watch?v=gmMlJ24Hycg

Should I tease you and show you how modular/complete the code is, too?

Please refrain from making assumptions and hijacking the thread. If you have something against me, you can PM me.


Title: Re: Multi map selection using cruz control
Post by: matchew on June 11, 2012, 04:24:25 PM
Should I tease you and show you how modular/complete the code is, too?

Sure, post it in this thread for everyone to see and use, then others can use it just like you have done with the code on this and other threads.

You show how complete the code is to APR's lawyers when they call you.


Title: Re: Multi map selection using cruz control
Post by: Arin on June 11, 2012, 06:11:18 PM
So are you saying that I used the code in this thread or that I used APR's???
If you are going to make an accusation, the least you could do is be clear in what the accusation is.

In the end, it doesn't matter what you think. Believe whatever makes you feel better.

It doesn't matter if you used our code or not. We hold a patent on the technology. I'd advise you to cease sales of cruise control program switching. The last company that didn't was hit pretty hard.


Title: Re: Multi map selection using cruz control
Post by: Gonzo on June 11, 2012, 07:30:48 PM
You should information regarding the patents so we can all steer clear of infringement.
I can edit the code as needed as to not infringe any patents, given that the patents are valid, and that the products in question do in fact infringe them. There is many ways to do one thing, and just because you have a patent on one method, doesn't mean you have a patent on all the methods to do something.

Please contact me privately as to not derail the thread.


Title: Re: Multi map selection using cruz control
Post by: Jefnes on June 11, 2012, 08:55:51 PM
My code does not allow you to switch programs on the fly. Only with the car off.

I can't comment on APR's implementation because I don't know how they do their tune switching, and I honestly don't care as long as I am able to steer away from patent infringement. I don't see them developing any new products for the 1.8T/2.7T.

None of that matters.

Correct me if I am wrong:
You are changing the performance characteristics of an automobile by using the cruise control.
You are selling (or trying to sell) this as a product (or product feature).

Creating anything covered or maybe covered by some patent is not 'wrong'. Heck even copying code
from a 'tuner' file that you paid for, and messing with it is ok. So long as you keep it to yourself.

Its when you convert that knowledge into a sale of any kind is where the line is crossed.
Your problem is, you tend to cross this line without hesitation.
You are not the only 'tuner' doing this, you're just high profile.







Title: Re: Multi map selection using cruz control
Post by: littco on June 12, 2012, 12:53:16 AM
Getting back a little on track, Nice work.

I have a question and please excuse me if ive missed something. So using the original HN winols file you posted where abouts do I find the new LDRXN that changes as you select the mode you want?

I understand that is now, with the new coding a 3 axis map with the 5 selections being the new Z axis but is it possible to view and change those maps or are they the original LDRXN but with a multipler added to them to increase the load values?

I use tunerpro pretty much for all the stuff I do as it's easier for me, but obviously as far as i know it can't display 3 axis maps.

I have recently done a stage 2 tune on an HN and would love to try this on it as it has CC but would ideally like to put the LDRXN/k maps I have on there.



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on June 12, 2012, 01:26:35 AM
Each time a map is selected a counter in the ecu RAM goes 1,2,3,4,5 and back to 1. That forms the Z axis, so depending on the counter the particular ldrxn 2D map is selected. You can clearly see it in winols. Also I have posted a tunerpro definition for I think the s4, you can go through that.


Title: Re: Multi map selection using cruz control
Post by: littco on June 12, 2012, 01:50:14 AM
With regard the address step in the XDF you did for the S4 it needs to be set from -4 to 2 for all 16bit lohi entries and from -2 to 1 for all the 8bit enteries. then you can save it and it will stay saved.


I've attached a copy.

So with the s4 one if I changed the valves in each line, getting progressively larger, ie more load, then when I select 1,2,3,4,5 I will get the LDRXN for that line which then becomes my new LDRXN?


And with regards the HN, I have a XDF for the HN if I where just to add the 4 extra lines to the LDRXN and LDRXNK in my XDF that would then become my new multimap..

I'm very impressed I have to say, I will definately be implementing this into my s3




Title: Re: Multi map selection using cruz control
Post by: rajivc666 on June 12, 2012, 02:04:42 AM
The ldrxn and ldrxnzk in default location is ignored. Another 3d map is created somewhere towards the end of the file , you can compare the stock file towards the end and you will find the 3d, ldrxn & ldrxnzk


Title: Re: Multi map selection using cruz control
Post by: littco on June 12, 2012, 02:08:55 AM
Got it.





Title: Re: Multi map selection using cruz control
Post by: rajivc666 on June 14, 2012, 08:18:02 PM
Hi, for sometime  I have been thinking about a passover( overtaking) switch, when acc= 100% and we press cruise button the ecu gives max available power for say 30 seconds, since its only limited time ( it can be deactivated for say other 30 secs) we dont have to think of component protection  and may be open-loop boost ( this i am not sure). Think would be very fancy like NOS  :P. The custom code will track the modeled temperature and deactivate this mode if it exceeds certain safe values. Any takers.


Title: Re: Multi map selection using cruz control
Post by: vwaudiguy on June 18, 2012, 01:22:35 PM
That sounds like it could have some potential


Title: Re: Multi map selection using cruz control
Post by: littco on June 29, 2012, 03:10:34 AM
Could some check over this XDF for the 06a906032HN please.

I'm not sure the LDRXN is correct as I seems to have 5 maps




Title: Re: Multi map selection using cruz control
Post by: Nottingham on June 29, 2012, 01:22:04 PM
Hi, for sometime  I have been thinking about a passover( overtaking) switch, when acc= 100% and we press cruise button the ecu gives max available power for say 30 seconds, since its only limited time ( it can be deactivated for say other 30 secs) we dont have to think of component protection  and may be open-loop boost ( this i am not sure). Think would be very fancy like NOS  :P. The custom code will track the modeled temperature and deactivate this mode if it exceeds certain safe values. Any takers.

The ME7.5 seems to have some kind of overboost function by default.
KFLDRXO map specifies the air charge delta (added to LDRXN) and the sample points (rpm).
There is also a value which specify the time the overboost is active, etc.

By default the delta is set to:

~0,0825bar (8,25%) @ 3000rpm
~0,1275bar (12,75%) @ 3520rpm
~0,1350bar (13,50%) @ 4000rpm
~0,1125bar (11,25%) @ 4520rpm
~0,0675bar (6,75%) @ 5000rpm

Only if someone would find a way to enable it  :o


Title: Re: Multi map selection using cruz control
Post by: infinkc on July 02, 2012, 02:50:12 PM
this one only uses the accelerator pedal , no cruise http://www.youtube.com/watch?v=8ujTizaVmws&feature=youtu.be


Title: Re: Multi map selection using cruz control
Post by: prj on July 03, 2012, 02:42:32 AM
this one only uses the accelerator pedal , no cruise http://www.youtube.com/watch?v=8ujTizaVmws&feature=youtu.be


Maybe Rick can comment what he uses for moving the tacho needle.
RaraK mentioned, that writing nmot_w might be enough. I guess I can test, but asking never hurts.
It would be nice to have that feature for setting the launch control limiter.

For manual tune switching it's not that useful IMO, as are 5 different settings...
Manual tune switching is also only useful for valet mode or different fuel IMO, I am much more interested in using one of the rear O2 inputs to create a failsafe for meth injection.


Title: Re: Multi map selection using cruz control
Post by: trichard3000 on July 24, 2012, 12:20:56 AM
I'd like to breathe a bit of life back into this thread.  I live in a city where premium is 93 but I frequently drive to another city that’s 250 miles away where 91 is the typical premium.  I’d love to build a three-way tune with stock, 91 and 93 tunes.

I’ll be in a position to test the map switching capabilities in a couple of weeks (as I’m traveling with my car now) but in the meantime, I’m going to use TunerPro to start building some test bin’s that patch in some of the base stage 1/2 maps that are available in other base files. 

I’m starting with the following files:
rajivc666’s WinOLS (Audi S4 (mboxmultimap) - 360857).bin - 4/18/2012 version
Littco’s s4.xdf – 6/12/2012 version

After digging through the thread, here’s how I think that this is supposed to work.  Please let me know if this is right or wrong:

  • - There are three groups of settings available, each group contains settings for LDRXN and LDRXNZK (Boost/Max load), KFZW and KFZW2 (Timing), and KRKTE (Fueling)

  • - For LDRXN and LDRXNZK, the original single row tables are ignored.  They’re each replaced by a table with three rows, one for each setting group.

  • - For KFZW, KFZW2, and KRKTE, the original locations are used for group 1 (Paired with the first line of the new LDRXN/LDRXNZK tables).  Settings for group 2 are found (as per the S4.xdf file) at 2KFZW, 2KFZW2, and 2KRKTE, likewise with group 3.

  • - The driver cycles through the groups by having the accelerator pedal pressed and tapping the brake at the same time.  The MIL light will flash the same number of times as the selected group.

One question:  Using the general M-box xdf (8D0907551M-20120516.xdf), TunerPro shows the original KFZW/KFZW2 with load on the horizontal axis and RPM on the vertical.  With the S4.xdf file, the original tables aren’t mapped but the group 2 and 3 versions show the axes reversed. 

This may be a noob question, but is this just a difference in the way the xdf displays the underlying data, or are the values actually stored in memory differently?  If so, does it matter?

Thanks!


Title: Re: Multi map selection using cruz control
Post by: littco on July 24, 2012, 03:51:59 AM
Underlying data is exactly the same, the axis in tuner pro can be changed round if you wish, just copy all the settings from x > y and vice versa and then switch the table from column to row and it will show it the other way round. Only reason this happens is that in the past I've just copied the values of the available winols file and these can change from file to file, so some have the RPM on the x axis and some on thè Y axis. Makes absolutely no difference to the .bin file though as it saves it all in the correct place, just your preference on how it reads.


Title: Re: Multi map selection using cruz control
Post by: jibberjive on July 24, 2012, 06:06:03 AM
Starting hopefully next week I'll be able to do some M-box testing as well.


Title: Re: Multi map selection using cruz control
Post by: trichard3000 on July 25, 2012, 12:07:47 AM
I went ahead and merged Littco's TunerPro XDF with the current, standard M-box one. (8D0907551M-20120516.xdf)  This should make it a bit easier to start playing with various tuning options. 

All of the normal M-box parameters are available with the following changes:

I created a new Parameter Category called "Multimap Specific."  There are three subcategories matching the categories of the original parameters: Boost rlmax, Fueling, and Timing.

I renamed the Multimap parameters with these names: 
Boost rlmax: LDRXN_GRPS1-3, LDRXNZK_GRPS1-3
Fueling: KRKTE-GRP1 (Orig. KRKTE), KRKTE-GRP2, KRKTE-GRP3
Timing:  KFZW-GRP1 (Orig. KFZW), KFZW-GRP2, KFZW-GRP3, KFZW2-GRP1 (Orig. KFZW2), KFZW2-GRP2, KFZW2-GRP3

I changed the orientation of the KFZW/KFZW2 tables to match the standard XDF and I also removed the entries for the original LDRXN and LDRXNZK, which should now be ignored.

This is my first shot at tweaking XDF's so please use at your own risk and feel free to point out any issues. 

Thanks!


Title: Re: Multi map selection using cruz control
Post by: nokiafix on July 26, 2012, 03:36:35 PM
whats the chance of just having the switch option for a 5 point TVLDMX?  For a lot of the projects I do this would be an awesome option for me. 

Nick


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on August 11, 2012, 07:06:22 AM
Almost any map can be switched , no problem.


Title: Re: Multi map selection using cruz control
Post by: scottmandu on August 14, 2012, 06:28:47 PM
It doesn't matter if you used our code or not. We hold a patent on the technology. I'd advise you to cease sales of cruise control program switching. The last company that didn't was hit pretty hard.

Arin,

Please provide patent number as searching the USPTO database yields no results.


Title: Re: Multi map selection using cruz control
Post by: Gonzo on August 17, 2012, 08:46:47 AM
Arin,

Please provide patent number as searching the USPTO database yields no results.
Don't bother. They only send threat letters and when you reply they don't bother to get back to you.
I never sold any cruise control program switching tunes (ever) but I got this from them:
(http://i.imgur.com/qbBWM.jpg)


Title: Re: Multi map selection using cruz control
Post by: sn00k on August 17, 2012, 09:56:07 AM
i find this hillarious, please DO present that patent and please DO try to sue someone with it.

interesting to see if some people will speak up regarding these threats, since there are atleast 2 people here on this forum whom are connected with the bosch folks. (who hold the patent on the complete engine management and all software therein.)

trying to patent a modification of <0.0001% change of the original copyrighted code.. yey.. be so VERY glad the bosch people dont really care enough about "little people" to take the time to stomp on you.. "repected" company or not.
(yeah, i know we are all in the same situation when modifying code, IF trying to make money from our modifications)

gonzo: i find it very funny an attorney actually took the time to write you this, and include chit-chat and comments from an internet forum user in the threat, hahaha  ;D


Title: Re: Multi map selection using cruz control
Post by: nyet on August 17, 2012, 10:03:38 AM
As far as I know, both Bosch and Audi are aware that APR has been asserting rights to this patent (often successfully).

I don't know of any disputes that have gone to court however. I am aware that there are more than one out of court settlements.

YMMV.


Title: Re: Multi map selection using cruz control
Post by: NOTORIOUS VR on August 17, 2012, 10:33:23 AM
I don't see how they can do anything to you if you're not selling it as a product


Title: Re: Multi map selection using cruz control
Post by: Gonzo on August 17, 2012, 11:30:25 AM
gonzo: i find it very funny an attorney actually took the time to write you this, and include chit-chat and comments from an internet forum user in the threat, hahaha  ;D
You must be new here...  ;D
As far as I know, both Bosch and Audi are aware that APR has been asserting rights to this patent (often successfully).

I don't know of any disputes that have gone to court however. I am aware that there are more than one out of court settlements.
The thing is that its unclear the scope of the patent. One would have to go to trial in order to see how wide or narrow the scope of the patent really is.
I have no desire to challenge it, though. I want to innovate, not litigate. I leave that up to huge corporations that have nothing better to do.


Title: Re: Multi map selection using cruz control
Post by: Gonzo on August 17, 2012, 11:35:14 AM
I don't see how they can do anything to you if you're not selling it as a product
http://en.wikipedia.org/wiki/Patent_infringement_under_United_States_law
Quote
35 U.S.C. § 271(b) covers situations where one actively induces the infringement of a patent by encouraging, aiding, or otherwise causing another person or entity to infringe a patent. A potential inducer must actually be aware of the patent and intend for their actions to result in a third party infringing that patent.[3]
APR insists that I was aiding people to infringe a patent when I never posted any code nor sold any infringing product.

Someone should explain this to us.


Title: Re: Multi map selection using cruz control
Post by: nyet on August 17, 2012, 11:43:30 AM
Someone should explain this to us.

It costs them nothing to demand $$ from you in return for not taking you to court.

Then, you get to do the math. How much would it cost to fight a lawsuit in court (regardless of its chances of success)?

By and large, that number is >0

The settlement $ tends to hover near that number.


Title: Re: Multi map selection using cruz control
Post by: Gonzo on August 17, 2012, 11:53:15 AM
Oh I understand that bit. That's very clear to me.

What is not clear is what is defined as patent infringement, direct or indirect, and what defines being an 'inducer' of patent infringement under US law.

I think knowing the law will help ALL users of this forum alike.


Title: Re: Multi map selection using cruz control
Post by: nyet on August 17, 2012, 12:01:38 PM
What is not clear is what is defined as patent infringement, direct or indirect, and what defines being an 'inducer' of patent infringement under US law

Unfortunately, I am not a lawyer.. and i wouldn't trust an answer from anybody who isn't a lawyer (and you shouldn't either!)

a real lawyer costs money... sooooo add that to the settlement cost if you don't want to pay a lawyer to give you an answer :)


Title: Re: Multi map selection using cruz control
Post by: Gonzo on August 17, 2012, 12:45:49 PM
Hahahahaha its all about the $


Its worth mentioning that US patents do not affect non-US entities. Just making that clear.


Title: Re: Multi map selection using cruz control
Post by: Snow Trooper on August 18, 2012, 09:53:25 PM
Whoa can't believe they sent that to you, thanks for the pm btw!  Helpful pointers to a safer system for sure, I haven't had any of the issues though.  Just the timing things and my flywheel cracks.


Title: Re: Multi map selection using cruz control
Post by: infinkc on October 22, 2012, 01:41:18 PM
more of a reason to post a DIY on how to do it, so everyone can use their feature


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 22, 2012, 09:33:09 PM
A DIY is going to be time consuming. I am attaching the ASM file which I have developed which I use as the basic file for switching between boxes. This one is for 8D0907551f and switches 10 maps, I have written comments where you need to change for different boxes. You can search for matching codes in other box files using winols or idapro. Also attaching a similar file for 8D0907551c (with less maps switched as I had developed it earlier) , so you can see what changes have to be made.


Title: Re: Multi map selection using cruz control
Post by: automan001 on October 23, 2012, 05:32:12 AM
Reding of code could have been much easier if you had used simpler instructions, such as bclear and bset instead of moving the value from bit register into intermediate register, then and-ing/or-ing the value and only then moving value back into bit register. There are direct asm instructions.
For example when you flash the light:

Instead of
       mov  r4,B_mil
        jb   r4.2,resisset               ;<-------------------------------------------------------- change B_mil
        or   r4, #0010h
        mov  B_mil,r4

I would write
   jb   12H.4, resisset   ; check if b_mil is set, 12H is word address, byte address is 12H*2=24H, bit 4
   bset   12H.4      ; set b_mil

Another example
resisset:
   and  r4,#0ffefh                 ;<-------------------------------------------------------- change B_mil   
   mov  b_mil,r4

I would write as 1 instruction
   bclr 12H.4


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 05:41:59 AM
Thanks I knew there was some instruction to set and clear bits , i was too lazy to lookup so did this instead  ;D.


Title: Re: Multi map selection using cruz control
Post by: automan001 on October 23, 2012, 05:52:26 AM
I've got another idea for improvement
Instead of code duplication for each new map, wouldn't it be better to just store array of offsets for each set of maps and then switch index of row within array and make  switching of the map within one function?
For example I would keep offsets of maps which need to be switched in multi-dimension array somewhere in free space. I would hard limit it for example to maximum 10 sets (to make things simpler, it would be enought for everybody) with maximum 3-5 different maps at once (for example LDRXN, LAMFA, KFZW, etc...). We could discus list of top maps which need to be switched, and fit them into matrix like 10x10:
set1: map11_offset, map12_offset, ..., map1N_offset
set2: map21_offset, map22_offset, ..., map2N_offset
setM: mapM1_offset, mapM2_offset, ..., mapMN_offset

When user presses switch map key/pedal combination you just rotate (increase/decrease) the index of current set within the matrix. Each intercepted map handler would read the index at first and then would take offset from respective cell. This might be easy configurable in WinOls or TunerPro.


Title: Re: Multi map selection using cruz control
Post by: littco on October 23, 2012, 11:17:29 AM
I've successfully managed to transfer over your multi map onto my ecu's. at the moment just running the ldrxn map switching and all works well via cruise however I get 2 blips of the mil for each switch . Ie map 4 gives 8 blips and 5 gives 10. Any ideas? It's not an issue but would be nice to get 1:1.



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 11:34:33 AM
somewhere in the code at two places there is  "shl    r4,#1H" replace it with nop or in the hex file replace it with cc 00 (hex code for nop).


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 11:44:38 AM
 Automan it is a nice idea but I guess you should limit your no. of map sets to 3 or max 5 as above that it is not fun. If you can improve the code and do a DIY it would be nice.   


Title: Re: Multi map selection using cruz control
Post by: phila_dot on October 23, 2012, 12:12:13 PM
What assembler are you using?

Where are you linking in your function (not address, logically)?



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 12:17:21 PM
What assembler are you using? ------------  Reads166   

Where are you linking in your function (not address, logically)?
I dont understand...




Title: Re: Multi map selection using cruz control
Post by: phila_dot on October 23, 2012, 12:31:17 PM


The comment in your code says calls from 0x87B31A and 0x87B362.

Why these locations? What leads to the call to your function?



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 01:19:05 PM
Well you Will have to reWrite the Code at the add mentioned and plaCe a Call instruCtion there. Why these locations? beause in stock file these locations call the subroutine which looksup the respective stock maps.
Edit: So the custom code gets control instead and we can decide which map to lookup.


Title: Re: Multi map selection using cruz control
Post by: littco on October 23, 2012, 01:43:45 PM
somewhere in the code at two places there is  "shl    r4,#1H" replace it with nop or in the hex file replace it with 00 cc (hex code for nop).

mmm ... can't find that "shl"....
I've attached the file that's currently running.. It's just running LDRXN and LDRXNZK on the Cruise set button to switch maps. Any clues please :-)



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 23, 2012, 02:10:12 PM
change
0xfeaac and 0xfeb8a to "cc"
0xfeaad and 0xfeb8b to "00"



Title: Re: Multi map selection using cruz control
Post by: littco on October 23, 2012, 02:26:05 PM
Thank you. I spent the best part of an hour looking for those! And couldn't see them for the life of me:-) but they where there!

Now done, will test and report back..



Title: Re: Multi map selection using cruz control
Post by: littco on October 24, 2012, 02:29:27 AM
change
0xfeaac and 0xfeb8a to "cc"
0xfeaad and 0xfeb8b to "00"



That worked perfectly thank you.

Sorry to ask more questions.

When using the Brake/acclerator instead of cruise/clutch I replace the Brake FD address for the cruise FD address but I noticed that when it comes to the acclerator can I just replace the jnb 0xfd4eh.3(clutch), Exit1 with jnb (wped_w in my case 0x381C18) address, exit 1.



Title: Re: Multi map selection using cruz control
Post by: rajivc666 on October 29, 2012, 04:00:58 PM
No you will have to replace "jnb 0xfd4eh.3(clutch), Exit1" with
     mov  r4,clutch
     cmp  r4,#0h
     jmpr cc_z , Exit1


Title: Re: Multi map selection using cruz control
Post by: littco on October 30, 2012, 08:10:57 AM
Thanks again. While nef was offline over the weekend I pinched the coding from the s4 brake/accel multi map you did and it works great. Like before just did LDRXN . Also it works while car engine is running, just have to make sure no left foot braking ;-)


Title: Re: Multi map selection using cruz control
Post by: Rick on October 31, 2012, 03:10:56 PM
ooh,pedals, good idea.....


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 08, 2012, 09:05:27 AM
Is there a way to use the "EPC" light for indication like the "MIL" light. Any information on it will be useful.
Thanks


Title: Re: Multi map selection using cruz control
Post by: phila_dot on November 08, 2012, 09:09:58 AM
Is there a way to use the "EPC" light for indication like the "MIL" light. Any information on it will be useful.
Thanks

Yes, B_epcl.

I can give you the M box location later, but IIRC it is the same RAM address as B_mil just bit 0 or 1.

I wrote my own routine and have been playing with different ways to communicate the current map to the driver. It seems we are rather limited.


Title: Re: Multi map selection using cruz control
Post by: masterj on November 08, 2012, 09:24:56 AM
Yes, B_epcl.

I can give you the M box location later, but IIRC it is the same RAM address as B_mil just bit 0 or 1.

I wrote my own routine and have been playing with different ways to communicate the current map to the driver. It seems we are rather limited.

Would it be possible to use ASR (ESP) button? IE when ESP disabled -> race maps/E85, when ESP enabled -> normal maps ?


Title: Re: Multi map selection using cruz control
Post by: phila_dot on November 08, 2012, 09:34:26 AM
Would it be possible to use ASR (ESP) button? IE when ESP disabled -> race maps/E85, when ESP enabled -> normal maps ?

No, the ESP button doesn't communicate to the ECU. The only thing the ECU sees from ESP is a torque request over CAN.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 08, 2012, 10:31:54 AM
Yes, B_epcl.

I can give you the M box location later, but IIRC it is the same RAM address as B_mil just bit 0 or 1.

I wrote my own routine and have been playing with different ways to communicate the current map to the driver. It seems we are rather limited.
well you can use the cruise dec or inc button to indicate which map is running without switching the maps.  Any idea how the cluster displays fuel consumption  etc and whether we can recode it  and thanks for the info above
, also can you give me the bit no.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 08, 2012, 10:46:44 AM
Would it be possible to use ASR (ESP) button? IE when ESP disabled -> race maps/E85, when ESP enabled -> normal maps ?
Any reason why you want to control  it with esp button and not brk/acc, cruise/clutch .


Title: Re: Multi map selection using cruz control
Post by: phila_dot on November 08, 2012, 10:48:20 AM
well you can use the cruise dec or inc button to indicate which map is running without switching the maps.  Any idea how the cluster displays fuel consumption  etc and whether we can recode it  and thanks for the info above
, also can you give me the bit no.

I am using the cruise stalk.

What I said was I am working on communicating the selected map TO the DRIVER.

Consumption is kvabi_w or something like that. I can give you that one when I get home as well.

These are actually the three that I have implemented right now, MIL, EPC, and consumption display. I'm will end up only using one once I decide which one I like better.

For the EPC light, on M box it is the same RAM address as B_mil and it is either bit 0 or bit 1. Whichever one B_mil isn't. I know my first post was kinda confusing, hopefully this one is more clear.

When I get to my computer I can actually give you specific answers.


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 08, 2012, 11:04:22 AM
Ok. Also a separate  button for indicating which map is running without actually switching can be useful.


Title: Re: Multi map selection using cruz control
Post by: phila_dot on November 08, 2012, 11:18:04 AM
Ok. Also a separate  button for indicating which map is running without actually switching can be useful.

Great idea. I might borrow this one.


Title: Re: Multi map selection using cruz control
Post by: phila_dot on November 08, 2012, 05:07:15 PM
M-box locations:

B_epcl - 0xFD22.1
kvakbi_w - 0x38EE0


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 08, 2012, 09:49:47 PM
Great.Thanks. :)


Title: Re: Multi map selection using cruz control
Post by: nokiafix on November 16, 2012, 10:42:25 AM
whats the chance of just having the switch option for a 5 point TVLDMX?  For a lot of the projects I do this would be an awesome option for me. 

Nick


I have a few up and coming winter projects where this TVLDMX multi map could be called for,  Is anyone willing to code a 5 map TVLDMX switch via pedal method into 2 maps for me? 032HJ & 018CB. I am willing to pay for the work to be carried out.   I just dont have the time to learn to do it my self as I am non stop 6 days a bloody week on the dyno.

I dont want LDR or timing swtich adding just TVLDMX.

Cheers
Nick


Title: Re: Multi map selection using cruz control
Post by: rajivc666 on November 16, 2012, 10:46:35 AM
I can do that for you, plenty time
 ;D


Title: Re: Multi map selection using cruz control
Post by: nokiafix on November 17, 2012, 06:04:34 AM
I can do that for you, plenty time
 ;D

PM sent cheers

Nick


Title: Re: Multi map selection using cruz control
Post by: mbwiejska12 on April 04, 2013, 06:35:25 AM
Is it possible to make multi map changing by pedals that will be changing beetwen normal map and with LC antilag/nls? Could someone share any pseudo code of function or write how to do it? Thanks in advance.


Title: Re: Multi map selection using cruz control
Post by: littco on April 05, 2013, 06:09:30 AM
Is it possible to make multi map changing by pedals that will be changing beetwen normal map and with LC antilag/nls? Could someone share any pseudo code of function or write how to do it? Thanks in advance.

Here's an interesting setup by APR

http://youtu.be/XOEiFbSHKqk


Title: Re: Multi map selection using cruz control
Post by: vagenwerk on April 19, 2013, 03:03:35 PM
I have the strange issue - after flashing hjmultimap.bin uploaded by rajivc666  i can no longer flash ecu by Mpps...
vcds reads ecu very well, also mpps detect ecu as it should , but i can't flash it and can't ready any more !
strange issue ? i loaded this file to the same ecu 032hj sw0002 same as uploaded by rajivc666  multimap bin switch...

i have to put ecu in boot mode and flash the previous flash , now is mpps flashable,
i try to load multimap bin by galletto in bootmode, but after ecu is still unflashable by mpps (clone) , it gives error after few seconds after click ok to ecu off on window.

what do you think ?



Title: Re: Multi map selection using cruz control
Post by: vagenwerk on April 21, 2013, 01:36:12 AM
any one ?


Title: Re: Multi map selection using cruz control
Post by: littco on April 21, 2013, 01:53:04 AM
any one ?
Have you tried flashing normally with galletto once the switch map is on the ECU? Maybe it's an mpps issue if galletto works .


Title: Re: Multi map selection using cruz control
Post by: vagenwerk on April 21, 2013, 06:07:56 AM
galetto boot mode work 100%, but to flash galletto i have to always bench flash in boot mode, with mpps is much easier without boot mode, but i prefer 'performance over fasion' so i will stay with this map switch flash :)  have spare ecu so will be ok.



Title: Re: Multi map selection using cruz control
Post by: lulu2003 on April 24, 2013, 03:04:44 AM
any ideas for this elegant way:

#18 at http://nefariousmotorsports.com/forum/index.php?topic=304.15


Title: Re: Multi map selection using cruz control
Post by: phila_dot on April 24, 2013, 06:25:41 AM
any ideas for this elegant way:

#18 at http://nefariousmotorsports.com/forum/index.php?topic=304.15

The ECU is never aware of the DIS toggle switch


Title: Re: AW: Multi map selection using cruz control
Post by: lulu2003 on April 24, 2013, 06:46:13 AM
Of course not with a stock mfa


Title: Re: Multi map selection using cruz control
Post by: automan001 on September 30, 2013, 07:08:45 AM
Has anybody tried to implement/configure boost limit depending of a gear? For example substitute different LDRXN [1..4] profiles depending of a gear calculated using vehicle speed & RPM? Multimap selection might be a good basis for this new function. Or there is another way to implement this?


Title: Re: Multi map selection using cruz control
Post by: ddillenger on September 30, 2013, 07:18:44 AM
Has anybody tried to implement/configure boost limit depending of a gear? For example substitute different LDRXN [1..4] profiles depending of a gear calculated using vehicle speed & RPM? Multimap selection might be a good basis for this new function. Or there is another way to implement this?

http://nefariousmotorsports.com/forum/index.php?topic=2897.0


Title: Re: Multi map selection using cruz control
Post by: stuklr on October 15, 2013, 09:02:53 PM
So this makes the switch on M box ecu's with the Gas pedal depressed and a touch of the brakes? What happens if you rev match down shift? Or does it only work when sitting still? I am unsure of the switching requirements. I really want to try this, but i don't want it changing at will. Thanks


Title: Re: Multi map selection using cruz control
Post by: stuklr on October 17, 2013, 01:10:10 AM
Couldn't help myself. Tried it using the base file posted earlier and just some very simple boost and timing changes for each of the three settings.

I corrected the checksums and check via me7sum and me7check respectively. Checked ok. Then I tried to flash the file via nefmoto. It failed at 100%. Never said file finished and bricked the ecu. I rescued it, but now im wondering why. Has anyone gotten the initial base file to work for the M box layout?


Title: Re: Multi map selection using cruz control
Post by: dream3R on October 17, 2013, 04:38:51 AM
We should patent "Change the performance characteristics of a motor vehicle by use of a pedal" then sue everyone  ::)


Title: Re: Multi map selection using cruz control
Post by: adam- on November 16, 2015, 06:05:45 AM
How is this looking?  I've just bought a spare ECU to immo off, but it's already the HJ 0002, so I'm gonna look at the file already posted here.

The problem is, I don't have cruise.  I'd like to change it for brake + throttle.  Feedback via rpm or MIL would be lovely.  I'm gonna get it loaded into IDA but I'm still pretty new as how to set it up. 

Once I can get it in IDA, I can probably make up my own, but I'm unsure how to load the file in IDA properly.  Offsets, etc.


Title: Re: Multi map selection using cruz control
Post by: gt-innovation on November 16, 2015, 06:31:22 AM
Hi adam,

There are some scripts here that are used for automated loading.

http://nefariousmotorsports.com/forum/index.php?topic=2431.30

use this script for start idaq_loadbin_6.1.au3 if you have ida 6.1 . You will find that on the above link.








Title: Re: Multi map selection using cruz control
Post by: adam- on November 16, 2015, 06:52:18 AM
I remember reading that thread but had forgotten.  Thanks very much!  Hopefully I can start to understand.

Assuming I would create my own module/subroutine in IDA, export it to a compiler, compile it and then inject it at the appropriate location?


Title: Re: Multi map selection using cruz control
Post by: gt-innovation on November 16, 2015, 08:30:05 AM
In ida you can only write this in hex and just check what you did..If you would like to wirte it and comiple it use keil for c167. Use the search on the forum while you are at the main forums.


Title: Re: Multi map selection using cruz control
Post by: dream3R on December 01, 2015, 04:40:47 PM
In ida you can only write this in hex and just check what you did..If you would like to wirte it and comiple it use keil for c167. Use the search on the forum while you are at the main forums.

You can use IDA to change things though like ram refs, new or expanded functions compile yes


Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 18, 2015, 12:41:58 PM
I want to implement this feature in my files too, when I get started on it I'll post my assembly and bins here too. Will be a bit (well actually 512kb) different since its narrowband, but I'm super motivated and have done a lot of reading on the topic so far. Is there any description on the function of RPM needle for showing the maps, or was this kept private?


Title: Re: Multi map selection using cruz control
Post by: cruuz on December 22, 2015, 01:16:49 PM
hi, is it possible to make selection persistent by storeing it in eeprom?


Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 23, 2015, 12:59:13 AM
Doublepost


Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 23, 2015, 01:03:51 AM
Yes, the routine stores the last map.
Here is explained how this works, example from MED9
http://nefariousmotorsports.com/forum/index.php?topic=6159.0title=


Title: Re: Multi map selection using cruz control
Post by: cruuz on December 23, 2015, 05:48:28 AM
Hi, thanks for response but I don't have ram logger. I allready found the few routines that read and write the EEPROM.
Now I search for places where them are called and the passed parameter will give me the answer where the RAM location is ;)
br - cruuz


Title: Re: Multi map selection using cruz control
Post by: nyet on December 23, 2015, 11:56:12 AM
Hi, thanks for response but I don't have ram logger

IMO serious assembly work is going to be impossible without one


Title: Re: Multi map selection using cruz control
Post by: dream3R on December 24, 2015, 10:46:54 AM
True that ^ well it makes it much easier anyway lol


Title: Re: Multi map selection using cruz control
Post by: cruuz on December 25, 2015, 08:54:45 AM
hi,

it took me a day but here you have it:
for 032HN-Box 363908 the mirror starts at 0x383B1E
this means :

EEPROM 0x010 := 0x383B1E in RAM

and e.g.
EEPROM 0x1b0 :=> 0x383C4E

don't have a car or an emulator if somebody could test something like:

mov     r14, #102h
extp    #0E0h, #1 ;
mov     0BC50h, r14 ; 383C50h

and read after EEPROM with KTAG or some othe tool would be nice ;)

br - cruuz


Title: Re: Multi map selection using cruz control
Post by: dream3R on December 25, 2015, 11:18:12 AM
seeing the ram mirror code would be cool well done btw


Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 08, 2016, 11:57:42 AM
Has anybody tried to implement/configure boost limit depending of a gear? For example substitute different LDRXN [1..4] profiles depending of a gear calculated using vehicle speed & RPM? Multimap selection might be a good basis for this new function. Or there is another way to implement this?
I have been working on this function for my own ecu today, and I substituted the new ldrxn code for KFMDBRGR (torque limit by gear and rpm). You can find it in Ida if you search for the adress of the axis size data. For now, I would be happy with just this limiter. Ultimately I want to switch my exhaust valve too, but I am still figuring out how to take final control of a 12v output (fan control/rear o2 heater/sai pump outputs are the options I am considering. rear o2 seems to be the smallest function to alter but still....)

The ecu boots fine, however I have not been able to test if the function works properly. I have no mil light in my dash, I tried to read b_mil over me7logger but it stays at 0. I cant see 3830FAh changing either... it gives out a raw value of 128. I'll report back once I fix it!
I am currently testing the ecu on the bench, could be the code is not running through torque control since the engine is off..
I am logging the adresses 383000h, 383002h, 383008h and 3830FAh. From my understanding once the code has ran at least once, there has to be 1234h in 383002h. I'll try some other location to call the function just to test :-)




Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 09, 2016, 03:55:52 PM
Did some in car testing this evening, and its still not working. The values in ram dont seem to stick. Could be my coding is flawed, but I tried to set ones and zeros in 2 unused adresses (0x00E0B0 and 0x383060) for a quick test and they both remain unchanged. Maybe I'm not using the right commands, but checked with Rajivc's code the function is really the same apart from the variables. Switching function is also not running because I don't get any response from b_mil. First task for the weekend: save a specific value in ram ::)


Title: Re: Multi map selection using cruz control
Post by: TijnCU on December 13, 2016, 03:31:35 AM
I found out my selected ram was not empty, there where no xrefs in Ida but with the logger I found data. Definitely worth it to doublecheck...
There was some parts of the code that I did not like (for example without activating the switch, it would select map 3 as default) and there where parts that could be coded more efficient. I have modified the code to my liking, consider it a hybrid between the Philadot mapswitching and the original from Rajivc666. Preset mapset is #1 (in this code below, the mapsets consist of only 1 "map". If you need more, you need to add more ram adresses and data that suit your needs).

It sometimes requires you to make a call before the lookup routine of your map of choice, depending on current DPP.
In my example I have used KFMDBGRG as a switchable torque limiter, the lookup of this map is in a section DPP0 so there is no space to put the dedicated ram adress in place of the 16bit data.
  
The call to the original function needs to come from somewhere in the code when the processor is on page #0E1h (DPP2).
In my example, it comes from the rear o2 section (ushk).
Code:
millight @ 0X8A5A00:
          mov  r5,word_3828F6
          sub  r5,#1H
          mov  word_3828F6,r5
          cmp r5,#0H  
          jmpr cc_nz , retmil
          mov  r5,#010h
          mov  word_3828F6,r5    
          mov  r5,word_3828D4
          cmp  r5,#0h
          jmpr cc_z,retmil
          sub  r5,#1h
          mov  word_3828D4,r5
          jb  b_mil, resisset
          bset b_mil
          jmpr cc_uc, retmil
resisset:
          bclr b_mil
retmil:                    
          rets  

Code:
kfmdbgrg sub @ 0x8A5A40:             ;call from 0x88AF24
extp #0E1h, #1
mov r12, word_3828F2
extp #0E1h, 1#
mov r13, word_3828E8
rets

Code:
Function @ 0x8A5A60  ;call  from 0x8050586	
     mov [-r0], r5
     mov [-r0], r7
     mov [-r0], r8
     mov [-r0], r9
     mov r5,word_3828CE
     cmp r5,#1234h
     jmpr cc_z, stage_1
     mov  word_3828D4,ZEROS
     mov r5,#010h
     mov  word_3828F6,r5
     mov r5,#1234h
     mov  word_3828CE,r5
     mov  r5,#1H
     mov  word_3828FA,r5
     jb s_fgrsv,cc_isset
     mov  word_3828CC, ZEROS
     jmpr cc_uc, stage_1
cc_isset:
     mov  word_3828CC, ONES
stage_1:
     mov  r5,word_3828CC
     cmp  r5, ZEROS
     jmpr cc_z, CC_notset
     jb   s_fgrsv, exit
     mov  word_3828CC, ZEROS
     jmpr  cc_uc,exit
CC_notset:
     jnb  s_fgrsv, exit
     mov  word_3828CC, ONES
     jnb B_kuppl.11, exit
     mov  r5,word_3828FA
     cmp  r5,#1H
     jmpr CC_nz,I
     mov r5,#2h
     jmpr CC_uc,set_boost
  I:
     cmp  r5,#2H
     jmpr CC_nz,II
     mov r5,#3h
     jmpr CC_uc,set_boost
II:    
     mov r5,#1h
set_boost:    
     mov word_3828FA,r5
     shl r5,#1h
     mov word_3828D4,r5
exit:
     calls 0x8A5A00h ;calls millight
     mov r5,word_3828FA
     cmp r5,#2h
     jmpr CC_z,mapset2
     cmp r5,#3h
     jmpr CC_z,mapset3
mapset1:
   mov     r9, #207h
   mov     word_3828E8, r9
   mov     r9, #39B8h
   mov     word_3828E4, r9
   rets  
mapset2:
   mov     r7, #229h
   mov     word_3828E8, r7
   mov     r7, #0DC6h
   mov     word_3828F2, r7
   rets  
mapset3:
   mov     r8, #229h
   mov     word_3828E8, r8
   mov     r8, #0E18h
   mov     word_3828F2, r8
   rets  


Title: Re: Multi map selection using cruz control
Post by: soldjah on July 14, 2017, 02:11:38 AM
hello,

Is it possible to create for S3 8l?


Title: Re: Multi map selection using cruz control
Post by: 4ringpieces on July 14, 2017, 02:16:53 PM

extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_1
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_1
cc_isset:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_1:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset
     JB   0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit
CC_notset:
     jnb  0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I
     mov r4,#14h
     jmpr CC_uc,set_boost
  I:
     cmp  r4,#14H
     jmpr CC_nz,II
     mov r4,#3ch
     jmpr CC_uc,set_boost
 II:
     cmp  r4,#3cH
     jmpr CC_nz,III
     mov r4,#64h
     jmpr CC_uc,set_boost
 III:
     cmp  r4,#64H
     jmpr CC_nz,Iv
     mov r4, #0C8h
     jmpr CC_uc,set_boost
Iv:    
     mov r4,#0ah
set_boost:    
     extp #0e1h,#1
     mov 30fah,r4
exit:
    mov r12, #0e400h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
ldrxnzk:    
     extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_11
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_11
cc_isset1:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_11:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset1
     JB   0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit1
CC_notset1:
     jnb  0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit1
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I1
     mov r4,#14h
     jmpr CC_uc,set_boost1
  I1:
     cmp  r4,#14H
     jmpr CC_nz,II1
     mov r4,#3ch
     jmpr CC_uc,set_boost1
 II1:
     cmp  r4,#3cH
     jmpr CC_nz,III1
     mov r4,#64h
     jmpr CC_uc,set_boost1
 III1:
     cmp  r4,#64H
     jmpr CC_nz,Iv1
     mov r4, #0C8h
     jmpr CC_uc,set_boost1
Iv1:    
     mov r4,#0ah
set_boost1:    
     extp #0e1h,#1
     mov 30fah,r4
exit1:
    mov r12, #0e4d0h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
 



Anyone care to break down this code into simple terms, I understand 0xFD10.4 is the cruise control status


Title: Re: Multi map selection using cruz control
Post by: TijnCU on July 16, 2017, 04:02:39 AM
sure, in simple terms:
Check if code has ran, if not insert 10h for mil flash counter and insert 1234h as check value. Check if cruise is pressed, if not skip to active mapset, if so, check if clutch is depressed. Ram is set to FFFF when this has been done to avoid looping. Then check mapnumber, switch to the next number. Copy map number to mil code and double the number. Call mil code, flash mil according to mapnumber with timer (10ms mil on, 10ms mil off, hence the double number), return to  code. ldrxn is using 3d map lookup function and the Y axis is the mapnumber.


Title: Re: Multi map selection using cruz control
Post by: 4ringpieces on July 16, 2017, 07:49:31 AM
What is extp? I can find explanations for cmp, mov etc but "extp" is alluding me



Title: Re: Multi map selection using cruz control
Post by: nihalot on July 16, 2017, 10:31:42 AM
What is extp? I can find explanations for cmp, mov etc but "extp" is alluding me



http://www.keil.com/dd/docs/datashts/infineon/c166ism.pdf


Title: Re: Multi map selection using cruz control
Post by: 4ringpieces on July 16, 2017, 01:39:47 PM
That's perfect! Thanks gives me some lunch time reading


Title: Re: Multi map selection using cruz control
Post by: Cadensdad14 on May 30, 2018, 03:43:44 PM
How does the map swap work.  I have a ram location I wan to use a Jmpr cc_nz on.  If ram location is greater than 0 alternate maps are used.  If location is 0 stock maps are used.  Ive worked my way through the Multimaps disassembly, but dont have enough knowledge to make sense of a lot of what's going on. 


Title: Re: Multi map selection using cruz control
Post by: vwdubNam on December 20, 2018, 08:02:09 AM
Interesting topic,

I'm a nood, and want to make a suggestion, it might be of use or not.
display the selected map could be additional added to a user customized interface on the cluster, given the cluster code read the specific register containing the map number.
but this would only be possible if the instrument cluster has been changed?

video of instrument cluster.
https://www.youtube.com/watch?v=gOG9OQvDFNQ&t=182s

anythoughts of my idea?
using a custom instrument cluster to display map selection?

flashing lights are cool


Title: Re: Multi map selection using cruz control
Post by: adam- on February 21, 2019, 08:22:03 AM
That is ColorFIS.  Would need to code it all together.  It's not set up for that.


Title: Re: Multi map selection using cruz control
Post by: Lechuga on March 05, 2020, 01:45:33 AM
Sorry to wake up an old thread but I am very interested (even if it is somewhat over my head right now).

If I get this right:

Code:
kfmdbgrg sub @ 0x8A5A40:             ;call from 0x88AF24
extp #0E1h, #1
mov r12, word_3828F2
extp #0E1h, 1#
mov r13, word_3828E8
rets

You have 3 different copies of the KFMDBGRG map in different addresses (being original, 3828F2 and 3828E8?) and select it by cruise control and clutch?

And how do you compile these snippets? Is there any freeware tool? (I will look for one)

I would like to adapt it to my 18CB

Cheers!


Title: Re: Multi map selection using cruz control
Post by: meandyoujane on November 20, 2020, 01:51:19 PM
I have tried the hj with flashing mil. Works well, it seems better to change and then switch the engine on and off again, although thinking about it maybe at ignition.
Changing on the fly seems to create flat spots although I am not fully used to it yet.
But fabulous work well done, I am going to try and get through the code to see how you have done it.


Title: Re: Multi map selection using cruz control
Post by: Dejw0089 on July 03, 2021, 04:59:19 AM
hi, its a 1.8t 06A906032hj ecu, though can be coded for any ecu. Its running fine on my car.
Here is the code at 0x8ffd40
 
extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_1
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_1
cc_isset:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_1:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset
     JB   0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit
CC_notset:
     jnb  0xfd10h.4, exit
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I
     mov r4,#14h
     jmpr CC_uc,set_boost
  I:
     cmp  r4,#14H
     jmpr CC_nz,II
     mov r4,#3ch
     jmpr CC_uc,set_boost
 II:
     cmp  r4,#3cH
     jmpr CC_nz,III
     mov r4,#64h
     jmpr CC_uc,set_boost
 III:
     cmp  r4,#64H
     jmpr CC_nz,Iv
     mov r4, #0C8h
     jmpr CC_uc,set_boost
Iv:    
     mov r4,#0ah
set_boost:    
     extp #0e1h,#1
     mov 30fah,r4
exit:
    mov r12, #0e400h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
ldrxnzk:    
     extp #0E1h, #1
     mov r4,3002h
     cmp r4,#1234h
     jmpr cc_z, stage_11
     mov r4,#1234h
     extp #0E1h, #1
     mov  3002h,r4
     mov  r4,#14H
     extp #0E1h, #1
     mov  30fah,r4                      
     jb 0xfd10h.4,cc_isset1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr cc_uc, stage_11
cc_isset1:  
     extp #0E1h, #1
     mov  3000h, 0xff1e
stage_11:
     extp #0E1h, #1
     mov  r4,3000h
     cmp  r4, 0xff1c
     jmpr cc_z, CC_notset1
     JB   0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1c
     jmpr  cc_uc,exit1
CC_notset1:
     jnb  0xfd10h.4, exit1
     extp #0E1h, #1
     mov  3000h, 0xff1e
     jnb 0xfd4eh.3, Exit1
     extp #0E1h, #1
     mov  r4,30fah
     cmp  r4,#0aH
     jmpr CC_nz,I1
     mov r4,#14h
     jmpr CC_uc,set_boost1
  I1:
     cmp  r4,#14H
     jmpr CC_nz,II1
     mov r4,#3ch
     jmpr CC_uc,set_boost1
 II1:
     cmp  r4,#3cH
     jmpr CC_nz,III1
     mov r4,#64h
     jmpr CC_uc,set_boost1
 III1:
     cmp  r4,#64H
     jmpr CC_nz,Iv1
     mov r4, #0C8h
     jmpr CC_uc,set_boost1
Iv1:    
     mov r4,#0ah
set_boost1:    
     extp #0e1h,#1
     mov 30fah,r4
exit1:
    mov r12, #0e4d0h
    mov r13, #23fh
    extp #0e1h, #1
    movbz r14, 30fah
    mov r15, 0f89eh
    calls 82h,5ef0h
    rets
 

Mybe stupid question but need change something more than ori routine to this function?
Of course I know I need change ram adress and maps adres (if they are in other place than your). I start work with ida pro and can diassemble bin file to see your code in IDA but want to learn more and change code to work with my ecu.


Title: Re: Multi map selection using cruz control
Post by: Camboui on February 29, 2024, 12:17:43 AM
hello could someone create me a switchmap for a me7.8 . of course I pay the work done . I’ve been watching the forum for a while but it’s not my level of cree ca .
thanks