To give you an idea for some of the tricks in the ECU, here is a piece of seemingly incomprehensible code for reading in data from Port C (IDL, DFG/LP, TE1, HT, AC, STA, OX1 and IGSW).
Port C is address $28h, and the processed data is stored in RAM variable $4Fh.
ROM:F6CA ld a, $28h ; Port C Data Register
ROM:F6CC xor a, #11000011b ; PC0 = IDL ; PC1 = DFG/LP; PC6 = OX; PC7 = IGSW
ROM:F6CE push a
ROM:F6CF mov a, b
ROM:F6D0 xor a, $4Fh ; Initially zero on _RESET
ROM:F6D2 and a, $50h ; snapshot of xor'd Port C from last read
ROM:F6D4 and b, $4Fh
ROM:F6D6 add a, b
ROM:F6D7 st a, $4Fh
ROM:F6D9 pull b
ROM:F6DA st b, $50h
Turns out the algorithm is doing two simple things. First, the mask #11000011h just inverts the value for the bits with a 1, and those with a 0 are left alone. So input IDL, DFG/LP, OX1, and IGSW are inverted.
The second, and more tricky thing, is that the code requires that the input from Port C be the same for two readings before the value in $4Fh is changed. Its a form of averaging or glitch removal.