MEVD17.2 emulation in development

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

  1. Twisted Tuning

    Twisted Tuning Lieutenant Vendor

    523
    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 Specialist

    86
    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 Specialist

    93
    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 Specialist

    86
    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 Specialist

    93
    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 Specialist

    93
    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 Specialist

    93
    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

    AZ
    2009 E93 335i
    Keep up the good work!
     
  9. LamboLover

    LamboLover Specialist

    93
    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 Specialist

    93
    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 Specialist

    86
    N55 DCT E82
    Looks like you are getting pretty close. Can't wait.
     
  12. all4bspinnin

    all4bspinnin Specialist

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

    LamboLover Specialist

    93
    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

    AZ
    2009 E93 335i
    Love the effort! Make N55 great again/finally
     
  15. LamboLover

    LamboLover Specialist

    93
    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 at 12:46 AM
  16. doublespaces

    doublespaces Administrator

    AZ
    2009 E93 335i
    Invaluable progress. Anyone who can use IDA Pro is a gem in my book.
     
Loading...