Title: FLAT SHIFT CODE MODIFICATION ME17
Post by: alessandro244 on May 22, 2026, 04:05:11 AM
Hello everyone, my name is Alessandro. I recently learned how to dismantle code and create small patches. I think I'm on the right forum. I'm working on med17.3.0 with an existing flat code. The problem is that NLS only activates when the threshold is set, and it doesn't take the rpm value when I press the clutch pedal. I'd like to modify the code to take the rpm value only when I press the clutch.
I didn't want to publish the entire code out of respect for its creator; I only posted the part where I think I can make changes.
I believe the code was written by someone on the forum ::).
I apologize for the variables, but I identified them in Italian and hope they're correct.
Anyway, my idea is to create a variable that contains the revolutions per minute (RPM) when B_kuppl is active and insert it in place of NLS_ATTIVAZIONE_RPM. I'm available for any further questions; I'm eager to learn.
the code is too long so he inserted it into a text document
Title: Re: FLAT SHIFT CODE MODIFICATION ME17
Post by: alessandro244 on June 08, 2026, 10:40:01 AM
I'm sharing my little patch (still not working) and I'm hoping for some expert opinion. *************************************************************
SUB_8016eef0 XREF[1]: 800986f6 (c)
8016eef0 99 9c 8c ld.a a12 ,[a9 ]0xa4c => ->MAP_CODEWORD_ATTIVAZIONI = 8006f000
90
8016eef4 91 10 00 movh.a a2 ,#0xd001
2d
8016eef8 09 24 18 ld.b d4 ,[a2 ]-0xe8 => VAR_OLD_CLUCH = ??
c8
8016eefc f6 4e jnz d4 ,LAB_8016ef18
8016eefe 05 dc a0 ld.bu d12 ,B_kuppl = ??
86
8016ef02 6f 2c 13 jz.t d12 ,#0x2 ,LAB_8016ef28
00
8016ef06 05 dc c4 ld.hu d12 ,nmot_w = ??
7d
8016ef0a 89 2c 92 st.h [a2 ]-0xee => VAR_GIRI_FRIZ_2 ,d12 = ??
c8
8016ef0e 82 14 mov d4 ,#0x1
8016ef10 89 24 18 st.b [a2 ]-0xe8 => VAR_OLD_CLUCH ,d4 = ??
c8
8016ef14 1d 00 0d j LAB_8016ef2e
00
LAB_8016ef18 XREF[1]: 8016eefc (j)
8016ef18 05 dc a0 ld.bu d12 ,B_kuppl = ??
86
8016ef1c 6f 2c 06 jz.t d12 ,#0x2 ,LAB_8016ef28
00
8016ef20 09 2c d2 ld.hu d12 ,[a2 ]-0xee => VAR_GIRI_FRIZ_2 = ??
c8
8016ef24 82 14 mov d4 ,#0x1
8016ef26 3c 04 j LAB_8016ef2e
LAB_8016ef28 XREF[2]: 8016ef02 (j) , 8016ef1c (j)
8016ef28 82 04 mov d4 ,#0x0
8016ef2a 89 24 18 st.b [a2 ]-0xe8 => VAR_OLD_CLUCH ,d4 = ??
c8
LAB_8016ef2e XREF[2]: 8016ef14 (j) , 8016ef26 (j)
8016ef2e 09 2c d2 ld.hu d12 ,[a2 ]-0xee => VAR_GIRI_FRIZ_2 = ??
c8
8016ef32 0b c0 f0 mov d13 ,d12
d1
8016ef36 89 2c 86 st.h [a2 ]-0xfa => VAR_LC_RPM_ATTIVAZIONE ,d12 = ??
c8
8016ef3a 09 c4 d0 ld.hu d4 ,[a12 ]0x10 => LC_HYSTERESI = 00C8h
08
8016ef3e 0b 4c 80 sub d12 ,d12 ,d4
c0
8016ef42 89 2c 84 st.h [a2 ]-0xfc => VAR_LC_GIRI_RIATTIVAZIONE_CUT ,d12 = ??
c8
8016ef46 09 c4 d8 ld.hu d4 ,[a12 ]0x18 => GIRI_MOTORE_LC = 0320h
08
8016ef4a 0b 4d 80 sub d13 ,d13 ,d4
d0
8016ef4e 89 2d 82 st.h [a2 ]-0xfe => VAR_LC_GIRI_ANTI_BAND ,d13 = ??
c8
8016ef52 00 90 ret
|