too bad you have a 97 if it was like 94-96 you can actually do a 3sgte engine swap as long as its not a jdm motor! i research this for like months ca rules are
1) newer motor (1 year diffrence you can get slide on)
2) engine must be coming from a car with simlar weight (3sgte or 3sge)
3) either us model or jdm replacement for same motor .. (only can do a jdm swap with a jdm 5sfe if your going jdm)
4) has to pass the sniffer it should
if you register it as a mr2 motor
but man its hard finding a 3sgte us motor with low milleage that be less then 3000.00 dollar..