Pages: 1 [2]
Author Topic: ME7.5 Launch Control On 4B0906018CH_360854  (Read 10821 times)
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #15 on: May 31, 2018, 07:45:37 PM »

So I took your advise and worked on some things.  For starters I moved my flags to the location 0x383900.  Basically, bit 0 is active during Launch Control, bit 1 is active during No Lift Shift.  Not really necessary to seperate them, but I have some revisions Im hoping to do it lays the groundwork for.  Since I ran into a wall with switching maps based on the status of those bits, i decided to disable knock recognition when those bits were active.  Its bit 0xFD70.14 in my file.  Its set at 0x72DAC and cleared at 0x72DB0.

0x872DAA     jmpr       cc_Z, loc_872DB0
0x872DAC     bset        b_kr.14                                         Replaced with call function
0x872DAE     jmpr       cc_UC, loc_872DB2                        Replaced with call function

0x872DB0     bclr         b_kr.14

0x872DB2      jnb        b_kr.14, loc_872DC8

I inserted a call function to 0x8A4000 replacing the bset and jmpr at 0x872DAC because the call function is a 16 bit and the 2 existing functions were 8 bit.  At 0x8A4000 i have the following:

0x8A4000      extp      #0E0, #1
0x8A4004      movb     rl4, B_alsflags
0x8A4008      cmpb     rl4, #0
0x8A400C      jmpr      cc_NZ, loc_8A4014
0x8A400E      bset       b_kr.14
0x8A4010      jmps      87h, loc _872DB2

0x8A4014      jmps       87h, loc_872DB0

I think I got it.  Call inserted to jump in blank space.  Reference to the flag inserted.  Completion of the function replaced with the call.  Return to program from both sides of the function. 

Now if someone could give me a pointer about pointers I would be eternally grateful.
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #16 on: June 01, 2018, 06:27:56 PM »

ok.  Been tracing the disassembly to see what is going on in the map switching.  Following along pretty long til I hit the pointer which weve established I dont really know how it works.

code reads
extp    r5, #1
mov     r7, [r4]

my values for r5 and r4 at this point are r5=207 and r4=2BC
so im concluding that im moving the value located at 0x02BC on page 207 to register 7.  Page 204 is 0x810000 and page 205 is 0x814000.  Im assuming that page 206 is 0x818000 and that page 207 is 0x81A000.  That would mean placing the value im after at 0x81A2BC.  Yet that seems to be blank space in my file.  Do i need to recheck my math to arrive at those values or am I missing something else in this process?
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #17 on: June 02, 2018, 04:52:00 AM »

Found my issue.  Was calculating the values using the flag for the new maps and the values for the stock maps.
Logged
Cadensdad14
Full Member
***

Karma: +8/-1
Offline Offline

Posts: 134


« Reply #18 on: June 03, 2018, 07:37:55 PM »

Ok.  I have kfzw, kfzw2, and lamfa so far as als conditional maps now.  I have them as KFZWALS, KFZW2ALS, and the best one... LAMALS.  I also plan on adding LAMBTS to the mix.  I want to take timing to -30* in areas where im beyond the rpm threshold.  To do that I think I need to add KZFWMN and maybe KFZWMS to the mix.  Ive been able to find KFZWMS, but KFZWMN is more of a problem.  I have 2 variants in my file and nowhere do i see a constant that will point me towards them.  The maps are located at 0x81230C and 0x8123CC.  They output to the RAM variable zwmn.  I dont have a location for zwmn either.  So right now my options are edit KFZWMN over 4000 rpms and assume that I'll never have problems in standard operation, or get a hint on where to find it.  Im going to be posting a M-Box 2.7 and CH-Box 1.8 map here shortly. 
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

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