Bruce
06-07-2004, 09:04 PM
While not for the weak of heart, or the novice, here's a code patch.
While not perfect this patch will get you close on converting the 58 code from 2 bar to 3 bar.
The changes are
1) Change: LDAB #135 ; load accum A
To,
LDAB #211 ; load accum A
2) Change: LDAB #200 ; load accum B
MUL ; Multiply 8 by 8
ADCA #8 ; Add with carry to A
To,
;LDAB #200 ; load accum B
;MUL ; Multiply 8 by 8
;ADCA #8 ; Add with carry to A
So when your done, the Source Code would look like:
LF56D: STAA L00BC ; Turbo Boost Pressure
; Kpa=n/1.28 Store Accum A
LDAA L003F ; filtered map adc term load accum A
LDAB #211 ;135 ; load accum A
MUL ; Multiply 8 by 8
SUBD #400 ; Subtract Memory from A
BCC LF57B ; Branch if Carry Clear
CLRA ; Clear A
CLRB ; Clear B
LF57B: LSLD ; Logical Shift Left Double
BCS LF581 ; Branch if carry set
LSLD ; Logical Shift Left Double
BCC LF583 ; Branch if Carry Clear
LF581: LDAA #255 ; load accum A
LF583: STAA L003D ; MAP Store Accum A
LDAA L003F ; filtered map adc term load accum A
;LDAB #200 ; load accum B
;MUL ; Multiply 8 by 8
;ADCA #8 ; Add with carry to A
STAA L003A ; map term for BPW Store Accum A
RTS ; Return from Subroutine
For educational purposes only, ie for understanding automotive engine management systems.
No warranty expressed or implied.
Use at your own risk.
If your not totally confident on your code ability do not attempt to try this.
Not legal for highway use.
While not perfect this patch will get you close on converting the 58 code from 2 bar to 3 bar.
The changes are
1) Change: LDAB #135 ; load accum A
To,
LDAB #211 ; load accum A
2) Change: LDAB #200 ; load accum B
MUL ; Multiply 8 by 8
ADCA #8 ; Add with carry to A
To,
;LDAB #200 ; load accum B
;MUL ; Multiply 8 by 8
;ADCA #8 ; Add with carry to A
So when your done, the Source Code would look like:
LF56D: STAA L00BC ; Turbo Boost Pressure
; Kpa=n/1.28 Store Accum A
LDAA L003F ; filtered map adc term load accum A
LDAB #211 ;135 ; load accum A
MUL ; Multiply 8 by 8
SUBD #400 ; Subtract Memory from A
BCC LF57B ; Branch if Carry Clear
CLRA ; Clear A
CLRB ; Clear B
LF57B: LSLD ; Logical Shift Left Double
BCS LF581 ; Branch if carry set
LSLD ; Logical Shift Left Double
BCC LF583 ; Branch if Carry Clear
LF581: LDAA #255 ; load accum A
LF583: STAA L003D ; MAP Store Accum A
LDAA L003F ; filtered map adc term load accum A
;LDAB #200 ; load accum B
;MUL ; Multiply 8 by 8
;ADCA #8 ; Add with carry to A
STAA L003A ; map term for BPW Store Accum A
RTS ; Return from Subroutine
For educational purposes only, ie for understanding automotive engine management systems.
No warranty expressed or implied.
Use at your own risk.
If your not totally confident on your code ability do not attempt to try this.
Not legal for highway use.