DIY PROM Do It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.

Code help...

Thread Tools
 
Search this Thread
 
Old Feb 23, 2003 | 09:04 PM
  #1  
V8Astro Captain's Avatar
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...

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
	;-------------------------------------------------
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.

Last edited by V8Astro Captain; Feb 23, 2003 at 09:07 PM.
Reply
Old Feb 24, 2003 | 06:36 AM
  #2  
RBob's Avatar
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...

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
	;-------------------------------------------------
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.
You found it. BCC is Branch if Carry Clear. So after the two VE's are added together and if there is no overflow (no carry), the branch occurs and the sum of the VE values are used as is. If the carry flag was set, the branch does not occur and the VE value is set to 255, the largest 8 bit value.

Then: 255 * 0.39 = 99.5%, the largest total VE value.

RBob.
Reply
Old Feb 24, 2003 | 01:07 PM
  #3  
funstick's Avatar
Supreme Member
 
Joined: Jun 2002
Posts: 1,787
Likes: 0
From: great lakes
im not seeing al the instructions there but VE2 comes into play during PE mode ? been wonedering about that !
Reply
Old Feb 24, 2003 | 02:13 PM
  #4  
V8Astro Captain's Avatar
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
Cool. Thanks RBob...

Funstick...VE1 and VE2 are added together all the time.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
89-IROCZ-5.0TPI
TPI
10
Feb 22, 2022 09:26 PM
Falcon50
DFI and ECM
81
Aug 22, 2020 03:26 PM
racereese
Tech / General Engine
14
Oct 3, 2015 03:46 PM
Luigytico09
TPI
0
Oct 1, 2015 08:46 AM
dusterbd
TPI
0
Sep 29, 2015 08:40 AM




All times are GMT -5. The time now is 11:49 AM.