I have a 1993 Mazda MX-6 that runs fine when the check engine light goes off it will move on with ya but when the check engine light comes on it spits/sputters and does all kinds crazy stuff the RPM gauge jumps back and fourth also.   Can someone help me out with this problem?  I have heard tons of stuff from different people saying whats wrong with it,   So far ive been out $400 on the car buying sensors/parts.
Coolant Temperature Sensor
VSS
Air Filter
Fuel Filter
Plugs/ Plug Wires
  I heard that the problem was a distributor shaft,   I haven't bought one for it yet im tired buying parts for it.