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 B4000 Rough Running Idle, ABS Light Illuminated, and Check Engine Light
Mazda B4000 Problem
Average Mileage: 123,953 mi (65,721 mi - 164,000 mi)
Visitor, 1994 Mazda B4000, 120,000 mi
all of the above about to try to fix it