Pages: 1 ... 7 8 [9]
Author Topic: Map Switching Routine  (Read 77560 times)
nubcake
Sr. Member
****

Karma: +42/-3
Offline Offline

Posts: 401


« Reply #120 on: July 13, 2017, 06:10:27 PM »

For what it's worth, I was able to directly read and write values to 0x383f42 (via KWP) and that value stayed persistent after a power cycle.  Even though my rinky-dink code wrote and returned the values 0x1, 0x2 and 0x3, for some reason when I use my logger on the same address, I'm getting 16, 32, and 48 instead.  Any known reason why this would happen or am I just losing a nibble somewhere in my code?  Can't confirm that maps are changing on my bench rig (or I haven't figured out a way yet) so more results to follow.

Looks like either your logger or your "writer" are off by 4 bits. (It's a word var, by the way). Should not stay between power cycles as well.
Also (not sure here, going from memory) it really has to go through the "switch" section of code manually to compute new map addresses. So (if you absolutely want to make it this way) you're better off just emulating cruise stalk action by KWP.
Logged
phila_dot
Hero Member
*****

Karma: +157/-11
Offline Offline

Posts: 1705


« Reply #121 on: July 13, 2017, 09:03:20 PM »

Shouldn't be too difficult.

All you would need is a very basic function that monitors the contents of the ram address and jumps to the right location in the map switching routine any time the value changes. You would also have to change one jump in the map switching routine to avoid an infinte loop.

I'll get you the specifics when I get the chance, but it should really only take a few bytes of code.
Logged
DT
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 139


« Reply #122 on: July 15, 2017, 07:11:16 AM »

Why not
http://nefariousmotorsports.com/forum/index.php?topic=2349.0
to be able to easily view which set is active? Or did I miss something in trichard3000's wish?

Logged
TijnCU
Hero Member
*****

Karma: +50/-3
Offline Offline

Posts: 690


flying brick


« Reply #123 on: July 16, 2017, 04:05:30 AM »

Well actually I think he is more interested in switching the maps from a kpw comm. I can see how cool this can be when you are using some kind of touchscreen in your car to select driving modes.
Logged

fukenbroken
Hero Member
*****

Karma: +62/-7
Offline Offline

Posts: 784


mk4 1.8T AUM


« Reply #124 on: July 16, 2017, 01:44:53 PM »

Well actually I think he is more interested in switching the maps from a kpw comm. I can see how cool this can be when you are using some kind of touchscreen in your car to select driving modes.

well then using can-bus messages would be better way to do that
Logged
trichard3000
Full Member
***

Karma: +6/-0
Offline Offline

Posts: 55


« Reply #125 on: July 17, 2017, 08:44:44 AM »

Well actually I think he is more interested in switching the maps from a kpw comm. I can see how cool this can be when you are using some kind of touchscreen in your car to select driving modes.

This is the kind of functionality I was hoping was already "in there" or at least could be hacked to work by poking at the routines by writing one or more set of memory locations directly.  If this isn't workable, I'm fine because my main goal was to be able to read the mapset in use, more than write it.

well then using can-bus messages would be better way to do that

I'm also trying to keep this all working over the typical, blue logging cable.  Without digging back in to the wiring diagrams, I don't think my B5 has CAN-BUS at the OBD connector.  KWP can be used over K-line as well as CAN-BUS so if it's low-level ECU stuff, I may not need CAN-BUS. 

Even though my rinky-dink code wrote and returned the values 0x1, 0x2 and 0x3, for some reason when I use my logger on the same address, I'm getting 16, 32, and 48 instead.  Any known reason why this would happen or am I just losing a nibble somewhere in my code?

My bug.  :-)
Logged
AdamS3
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


« Reply #126 on: July 18, 2017, 12:56:47 PM »

Can you do this to an med 9.1 audi s3? 2.0tfsi?


Sent from my iPhone using Tapatalk
Logged
Speedy_Driver_90
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


« Reply #127 on: June 24, 2019, 10:51:25 AM »

the whole mapswitch stuff is completly after the normal stuff where in a normal bin only is FF in hex editor right?

so if i transfer everthing to my M box bin, the mapswitch works should also work in there?  i use a M box bin in a 2000 eu spec a6 ajk with s4 agb cams and bosch maf so i propably cant use the bin attached in here?
Logged
littco
Hero Member
*****

Karma: +48/-6
Offline Offline

Posts: 892


« Reply #128 on: June 24, 2019, 02:26:33 PM »

the whole mapswitch stuff is completly after the normal stuff where in a normal bin only is FF in hex editor right?

so if i transfer everthing to my M box bin, the mapswitch works should also work in there?  i use a M box bin in a 2000 eu spec a6 ajk with s4 agb cams and bosch maf so i propably cant use the bin attached in here?

Map switching routine is after the normal stuff yes, but it is also referenced in the main code to the new routine. If you just copy and paste the routine , you literally just have the routine at the end of the bin, may as well put in "stairway to heaven" lyrics in there instead for all the good it will do. You also need to make sure you find the reference point in the main map and copy the hex for that and any other parts referenced elsewhere. If you know what you are doing then sure copy and paste will work but if you don't then without IDA pro you have a hard task.
Logged
Speedy_Driver_90
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


« Reply #129 on: June 26, 2019, 05:32:49 AM »

then i definitly cant do that.. maybe somebody could help me with that?
Logged
up50lut3
Full Member
***

Karma: +0/-0
Offline Offline

Posts: 55


« Reply #130 on: July 06, 2019, 09:06:44 AM »

is there a simple way to make make 3 or 2 maps only? or does it all need to be done in ram variables?
Logged
nihalot
Full Member
***

Karma: +30/-2
Offline Offline

Posts: 93


« Reply #131 on: July 06, 2019, 09:35:34 AM »

may as well put in "stairway to heaven" lyrics in there instead for all the good it will do.

On it Tongue

But yea, the routine needs to be referenced or it's not going to do anything
Logged

Multimap on MED9/MEDC17/EDC15/EDC17
www.tangentmotorsport.com
info@tangentmotorsport.com
Pages: 1 ... 7 8 [9]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.026 seconds with 17 queries. (Pretty URLs adds 0s, 0q)