Can anyone tell me if the 1997 engine with distributor and the 1999 model with ignition leads direct to ignitors are compatible?
I can buy a cheap 97 engine as a back up for my 1999 which has a gudgeon knock developing
but I need to know if I can make the 97 engine work in the 99 RAV.

Main point is how does the camshaft trigger the ignitor timing and if a distributor will bolt directly onto a 1999 head
or will I have to put the 1999 head on the 1997 block?

I imagine the wiring to the ignition will be different, and also wonder if I have to buy the 1997 computer.

The RAV is dual fuel so providing I can make the one with the dizzy (1997) trigger its not a big problem.
Engine is cheap.

I doubt if a 1999 engine would be as cheap.