Code help...
Thread Starter
Supreme Member
iTrader: (1)
Joined: Jun 2001
Posts: 1,520
Likes: 0
From: 600 yds out
Car: Bee-Bowdy
Engine: blowd tree-fity
Transmission: sebin hunnerd
Axle/Gears: fo-tins
Code help...
This is from the 7747 ARJU hack...
If I'm reading this right then the code stored the VE2 value in $00A9 (D66C). Then at D6C3 the VE1 value is added to $00A9. Then at D6C5 there is a break if $00A9 is greater than #255, if so it is limited to #255 by D6C7.
So the total for VE1 and VE2 added together is 255.
I know this was covered in an earlier post of mine, I just want to understand it. Before I thought that I could have 255 in both tables. Now I think I see why it doesn't work like that.
Code:
*================================================
* LOOK UP 2D VE2 VALUE
* (0 - 6400 RPM)
*
* ADD TO VE 3d RESULTS IN $00A9
*
* TBL = %VE * 2.56
*================================================
D664: LDAA L001C ; RPM/25
D666: LDX #$D3C7 ; 2D LOOK PU OF VE2
D669: JSR LFB49 ; 2D LOOK PU
;
D66C: STAA L00A9 ; FUEL FM TBL
*================================================
*================================================
* LOOK UP FL 1
* MAIN FUEL PREDICITIONS vs MAP vs RPM, (FL1)
*
* TBL = %VE * 2.56
*================================================
D6B2: LDAA L0026 ; S/D MAP
D6B4: LSRA ; DIV BY 2 FOR LK UP
D6B5: LDAB L001C ; RPM/25
D6B7: CMPB #128 ; 3200 RPM
D6B9: BLS LD6BD ; BR IF RPM LT 3200
; ... else
D6BB: LDAB #128 ; FORCE 3200 RPM
D6BD: LD6BD LDX #$D37C ; POINT TO FL 1 TABLE
D6C0: JSR LFB67 ; 3D LOOK UP
;
D6C3: ADDA L00A9 ; SAVE TOTAL VE RESULT
D6C5: BCC LD6C9 ; IF NO OVERFLOW
; ... else
D6C7: LDAA #255 ; USE 100 % VE
D6C9: LD6C9 STAA L00A9 ; SAVE VE RESULT
;------------------------------------------------- So the total for VE1 and VE2 added together is 255.
I know this was covered in an earlier post of mine, I just want to understand it. Before I thought that I could have 255 in both tables. Now I think I see why it doesn't work like that.
Last edited by V8Astro Captain; Feb 23, 2003 at 09:07 PM.
Moderator
iTrader: (1)
Joined: Mar 2002
Posts: 18,432
Likes: 233
From: Chasing Electrons
Car: check
Engine: check
Transmission: check
Re: Code help...
Originally posted by V8Astro Captain
This is from the 7747 ARJU hack...
If I'm reading this right then the code stored the VE2 value in $00A9 (D66C). Then at D6C3 the VE1 value is added to $00A9. Then at D6C5 there is a break if $00A9 is greater than #255, if so it is limited to #255 by D6C7.
So the total for VE1 and VE2 added together is 255.
I know this was covered in an earlier post of mine, I just want to understand it. Before I thought that I could have 255 in both tables. Now I think I see why it doesn't work like that.
This is from the 7747 ARJU hack...
Code:
*================================================
* LOOK UP 2D VE2 VALUE
* (0 - 6400 RPM)
*
* ADD TO VE 3d RESULTS IN $00A9
*
* TBL = %VE * 2.56
*================================================
D664: LDAA L001C ; RPM/25
D666: LDX #$D3C7 ; 2D LOOK PU OF VE2
D669: JSR LFB49 ; 2D LOOK PU
;
D66C: STAA L00A9 ; FUEL FM TBL
*================================================
*================================================
* LOOK UP FL 1
* MAIN FUEL PREDICITIONS vs MAP vs RPM, (FL1)
*
* TBL = %VE * 2.56
*================================================
D6B2: LDAA L0026 ; S/D MAP
D6B4: LSRA ; DIV BY 2 FOR LK UP
D6B5: LDAB L001C ; RPM/25
D6B7: CMPB #128 ; 3200 RPM
D6B9: BLS LD6BD ; BR IF RPM LT 3200
; ... else
D6BB: LDAB #128 ; FORCE 3200 RPM
D6BD: LD6BD LDX #$D37C ; POINT TO FL 1 TABLE
D6C0: JSR LFB67 ; 3D LOOK UP
;
D6C3: ADDA L00A9 ; SAVE TOTAL VE RESULT
D6C5: BCC LD6C9 ; IF NO OVERFLOW
; ... else
D6C7: LDAA #255 ; USE 100 % VE
D6C9: LD6C9 STAA L00A9 ; SAVE VE RESULT
;------------------------------------------------- So the total for VE1 and VE2 added together is 255.
I know this was covered in an earlier post of mine, I just want to understand it. Before I thought that I could have 255 in both tables. Now I think I see why it doesn't work like that.
Then: 255 * 0.39 = 99.5%, the largest total VE value.
RBob.
Thread
Thread Starter
Forum
Replies
Last Post




