1. Login to disable the Ads!

MEVD17.2 emulation in development

Discussion in 'N55' started by LamboLover, Oct 31, 2017.

Loading...
  1. Twisted Tuning

    Twisted Tuning Lieutenant Vendor

    Messages:
    674
    Finding tables you need to know how to read code and in the case of the BMW. since everything is in german, you would be best to know how to read german or at a minimum all the main keywords used in programming. there are several tools you can use to define tables. But you need to find them first. I use a mix of Winols and other Hex editors and etc.

    But anyway, if you hear from Martial, you will know why they are left out of the XDF. but there was a specific reason. We have the tables.

    Or you can just wait it out as we will be adding some more features soon and one will be burble intensity.
     
  2. Sbrach

    Sbrach Corporal

    Messages:
    154
    Ride:
    N55 DCT E82
    I just want to turn off the PPK burbles in my custom tune. I don't check the box for Exhaust Burbles in flash options. So if I were to check the box for burbles and set the sliders to 0s does that just leave the tables as they are in whatever bin is being flashed or does it over-write them with the stock, non-PPK values?

    I'm assuming the specific reason is because the burble settings are an MHD exclusive feature? I don't have a problem with that, you guys did the work so you get to decide what is shared and what isn't. Sucks for guys like me who just want to tune their own car and have no interest in tuning other peoples cars but it is what it is.
     
  3. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Re the realtime/flex, quick update. Have been working on conversion to all the other versions for realtime and done first draft. Awaiting third attempt at receiving a working bench MEVD172G to test with as first one was physically damaged, second one was water damaged and the newer ECUs are quite different in some crucial ways that absolutely require bench testing. Working on flex fuel versions, but making some changes that will not affect function, but improve maintenance, quality and testing when moving to new versions and adding new tables. The compiler I am using allocates arrays in memory in reverse order to how they are listed in the source file, and follows them with non array variables. Along with manual xdf creation this is a major PITA to make changes especially when the final flex fuel tables required are not yet fixed. So I am changing to use a structure containing the new tables in the correct order and will work on methods to at least semi automate xdf creation.
     
  4. Sbrach

    Sbrach Corporal

    Messages:
    154
    Ride:
    N55 DCT E82
    Nice work, spending the time on automation now makes sense, should save you a lot of time in the future. Its always a struggle for me to decide if I should spend the time to make a tool to automate something or just do it by hand.

    https://xkcd.com/1319/
     
  5. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Now have all the new flex fuel tables/values/pointers in an auto-generated structure so that the order is defined behaviour and more can be easily added to the end simply by adding to a list.
     
  6. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Some early success in getting my build process to start spitting out csv files that with a bit more work should be able to be imported into TunerPro (as tsv) to generate xdf files.

    Moving the new flex fuel data into C structures (to prescribe the order) has meant that the map file produced by the compiler doesn't contain the names and addresses of the new maps, but I have another way to extract those automatically as a final part of the build.

    This feels like the unsexy underbelly of product development, but will be very useful. I just cannot face making all these xdf files by hand and maintaining them.
     
  7. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Decided to change to writing the xdf files directly, except the xdf format is not actually described, so made a template for a flexible 3d map structure. Now spitting out 1240 lines of xdf from the build for all the new flex fuel 3d tables. They don't have addresses in yet, and there are a few 2d tables to do, but have a method that looks like it will work and save a lot of time. Edit - axis link working so that you can click the new flex fuel x and y axes from the table and they are opened which reduces a lot of hassle with TunerPro. Also got the min/max values in there so that the tables are coloured by value.
     
    Last edited: Jan 9, 2018
  8. doublespaces

    doublespaces Administrator

    Messages:
    5,937
    Location:
    AZ
    Ride:
    2009 E93 335i
    Keep up the good work!
     
  9. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    upload_2018-1-9_19-29-8.png

    Autogenerated from compilation. Few tweaks to signed axes and scalings of some of the maps needed.

    _P are Petrol, _E are Ethanol. Will give them better names.

    Still to add the 2d blending tables.
     
  10. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    upload_2018-1-11_23-29-48.png
    Getting there. Testing of all the changes from the last week then resume porting to other versions.
     
    • Like Like x 3
    • Love Love x 1
    • List
  11. Sbrach

    Sbrach Corporal

    Messages:
    154
    Ride:
    N55 DCT E82
    Looks like you are getting pretty close. Can't wait.
     
  12. all4bspinnin

    all4bspinnin Corporal

    Messages:
    124
    Ride:
    135i TT
    Thank you for your hard work. It is very appreciated!!
     
    • Like Like x 1
    • Agree Agree x 1
    • List
  13. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Thanks, doing even more automation now I'm on a roll with it, have cut the manual configuration in half in the last few days. I've got IDA Pro scripts parsing every routine I can automatically, going through subroutines and their children to find values and variables. Finally received a 2015 535i MEVD172G N55 ECU in good condition for the bench to test with that I should also be able to test S55 code on. Some discussion around using the flex fuel method for other map switching, for adapting to water/meth injection.
     
  14. doublespaces

    doublespaces Administrator

    Messages:
    5,937
    Location:
    AZ
    Ride:
    2009 E93 335i
    Love the effort! Make N55 great again/finally
     
  15. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    Now got rid of virtually all the manual config files for each version, automatically resolving code and calibration addresses, trying to handle the edge cases I see with the later DMEs for S55, just leaving a spreadsheet with a list of flex fuel maps and their parameters for the new xdf on one row each.

    Now reading many of those from the xdf too.

    So xdf and bin in, xdf and bin out with a single "make" command.

    Also going to work on automating more of the disassembly process because a good disassembly is the basis for the automatic code generation. Silly things like if IDA cannot find a reference to a section of code it doesn't make it into a function. So then you miss more references. Much of the code is addressed by structures containing pointers.

    This all leads to more possibilities that I will consider soon but priority is to finish this first.
     
    Last edited: Jan 20, 2018
  16. doublespaces

    doublespaces Administrator

    Messages:
    5,937
    Location:
    AZ
    Ride:
    2009 E93 335i
    Invaluable progress. Anyone who can use IDA Pro is a gem in my book.
     
  17. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    New code (using structures to package the order of the new tables, automatically finding most of the variables, automatically add new tables to xdf) works on bench on MEVD172. After working out how to write the flash counter in EEPROM on MEVD172G, I'm doing lots of work on EEPROM so that my code can store variables in non volatile memory. Then a real push to get some of it tested further and released otherwise I could end up polishing it forever and never sharing the fun or feeding the resident cat.
     
  18. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    EEPROM writing works, so the mobile app will be able to write ethanol or map switch data and it will not be forgotten when you key off.

    First full build with all the toys in it for MEVD172G (F series) started testing on the bench today with (much relief) a huge success. RAM is more limited, but I have organised things for efficiency on these models so you can still do lots of fuel, ignition, VANOS, wastegate, load, torque tables all at once. Tomorrow I will test with a variable resistor into the flex fuel input as I did on MEVD172 (E series) and check table blending results for flex fuel.

    After that, repeat testing of latest build on bench and in car for MEVD172 (E series).

    upload_2018-2-19_18-27-31.png
     
  19. MiamiM3

    MiamiM3 New Member

    Messages:
    7
    Ride:
    2011 BMW 335i AT M-Sport
    This is so over my head, but I am definitely excited for the end result. Will this work inconjuction with the car's protune? Or will this be a combination of a custom tune and flexfuel in one package?
     
  20. LamboLover

    LamboLover Corporal

    Messages:
    202
    Ride:
    Everything
    The realtime tuning/emulation technique is aimed at tuners to allow a better tune more quickly, but I would like to make it accessible to interested enthusiasts too. A tuner could remote tune a car and both the tuner and user can save time. A user could make adjustments at an event.

    Presently I have integrated flex fuel and realtime into one build as they overlap from the programming and testing point of view.

    I need to sort out the marketing still with MHD but he has been so busy with F series and moving, and me with getting the technicalities solved. I am also looking to the VAG market too, and have a few contacts there.
     
Loading...
Loading...