Exactly & Thanks! Where has this chart been all my life?
I made it back in 2000 when I was working through $58. I wrote a program to do the math in hex, with appropriate rounding, so I could see it happen step by step. I've posted it to a few sites over the years but the people that appreciate it are few and far between.
Why are you inserting "ECM generated reference periods" into the process? That phrase indicates the ecm is responsible for creating the value, which it is not. The ecm simply measures time between two events. No event, no measurement. Are you referring to the source of the value?
Code:
LDX L3FC0 ; LAST DRP PERIOD
STX L00B3 ; CURRENT MNR LOOP DRP PERIOD
I suppose this might be thought of as "Ecm generated" since the value is obtained from onboard hardware but it's the only "reference period" other than when "current" is moved to "old."
Code:
LDD L00B3 ; CURRENT MNR LOOP DRP PERIOD
STD L00B5 ; OLD REF PER
But believe the last column labeled “cntr * knumcyl” should be labeled (cntr * knumcyls) / 8, with no adjustment to “cntr” being required for 8 cyls.
The last column is the result of multiplication done by the ecm with the number of cylinders variable. There is no division. It's done with rounding. The time between DRP's is queried, knumcyl is loaded, and the two variables are sent to the standard 8X16 multiply subroutine.
Code:
CFAD ldd REFINT
CFB0 std rpmref ; L0037. This will become 90deg ref * # of cylinders.
CFB2 ldx #0x0037 ; places addy of rpmref in X
CFB5 ldaa NUMCYL ; sets up for 8X16mult
CFB8 beq LCFBF ; for 8cyl, goto LCFBF
CFBA jsr 8X16mult ; generic multiply for 8X16 bit #'s: returns 16 bit
; value in D = 90 deg counter * NUMCYL
;
CFBD std rpmref ; now we have a number = ref corrected for knumcyl
The logical tests are reversed in $8D (BNE vs BEQ) but the steps are the same. What's in the column is exactly what's generated by the 8X16 multiply subroutine for the listed counter and knumcyl values. If you're looking at this section:
Code:
LDD L00B3 ; CURRENT MNR LOOP DRP PERIOD
LSRD ; DIV BY 8
LSRD
LSRD
Its for dwell calculation.
What other info are you looking for?
Edit: The file I attached to the previous post was the raw data I obtained from the program. That's not what I intended to attach. This is formatted a little better.
Bookmarks