NefMoto

Technical => Reverse Engineering => Topic started by: TijnCU on March 21, 2018, 05:29:51 AM



Title: Anti Lag enrichment by boost ASM add-on
Post by: TijnCU on March 21, 2018, 05:29:51 AM
Last week I finished my code for enrichment by boost during anti lag. It works like this:
in the function for FKKVS, the call to the lookup function is replaced with the new code to supply a custom factor to the last instance of ftek_w.  This allows a percentual enrichment to your injector times in a 3d map from boost * rpm.
Set your personal ALS flag in the first line of code, and write a custom 3d map. Mine is 5x10, but you can make it any size you want. You can also change pvdkds_w for another 16 bit variable, for example wped_w.
Code:
seg018:AF700
seg018:AF700 ALS_enrichment_function:                ; CODE XREF: sub_865B32+48P
seg018:AF700                 jnb     word_FDE2.2, Call ; ALS flag
seg018:AF704                 add     r0, #0Ch
seg018:AF708                 mov     r4, pvdkds_w
seg018:AF70C                 mov     [-r0], r4
seg018:AF70E                 movbz   r5, nmot
seg018:AF712                 mov     [-r0], r5
seg018:AF714                 mov     r4, #3B00h ;new map offset
seg018:AF718                 mov     r5, #22Bh ; new map multiplier
seg018:AF71C                 mov     [-r0], r5
seg018:AF71E                 mov     [-r0], r4
seg018:AF720                 mov     r4, #3AF6h ; 16bit axis offset
seg018:AF724                 mov     r5, #22Bh ; multiplier
seg018:AF728                 mov     [-r0], r5
seg018:AF72A                 mov     [-r0], r4
seg018:AF72C                 extp    #22Bh, #1
seg018:AF730                 movbz   r12, unk_8AFAEA ; 8bit axis size (10)
seg018:AF734                 mov     r13, #3AECh ; 8bit axis offset
seg018:AF738                 mov     r14, #22Bh ; multiplier
seg018:AF73C                 extp    #22Bh, #1
seg018:AF740                 movbz   r15, byte_8AFAEB ; 16bit axis size (5)
seg018:AF744
seg018:AF744 Call:                                   ; CODE XREF: sub_8A465E:ALS_enrichment_functionj
seg018:AF744                 calls   82h, sub_8267E4 ; original lookup call
seg018:AF748                 rets

Let me know what you think, I have logged it and it is functional. Now, grab that C166 ISM and get coding!


Title: Re: Anti Lag enrichment by boost ASM add-on
Post by: gman86 on March 21, 2018, 01:19:57 PM
Nice work. Glad to see folk still keeping the dream alive :)