Water intrusion into a connector (X309) located under the cab, beneath the driver's seat, can cause a rough idle, erratic speedometer operation, ABS Light and Check Engine Light illumination, and automatic transmission shifting problems. If needed, connector repair parts are available from Mazda dealers, and possibly some Ford dealers.
Car Problem Reports
Mazda B2500 Rough Running Idle, ABS Light Illuminated, and Check Engine Light
Mazda B2500 Problem
Average Mileage: 133,000 mi (110,000 mi - 150,000 mi)
Visitor, 2000 Mazda B2500, 150,000 mi
This describes the exact problem with my truck.
Replaced the TPS and still having these problems. Hope replacing this connector does the trick, these problems caused my recent smog to abort....