You need OBD2 reader or scanner to get the codes
Trouble code P0420 means:Catalyst system efficiency below threshold
Trouble code P0768 means: Shift solenoid D electrical problem
Trouble code P0171 means:System too lean (bank 1)
Trouble code P0400 means:Exhaust gas recirculation-flow malfunction
Trouble code P0170 means:Fuel trim malfunction (bank 1)
Trouble code P0421 means:Warm up catalyst system efficiency below threshold
Trouble code P0171 means :System too lean (bank 1)
Trouble code P0401 means:Exhaust gas recirculation-insufficient flow detected
Trouble code P0170 means: Adaptive Fuel Trim Too Rich or Too Lean (Bank 1)
Trouble code P0170 means: Adaptive Fuel Trim Too Rich or Too Lean (Bank 1)
you will have to get from Mazda or buy a used one
Trouble code P0401 means:Exhaust gas recirculation flow insufficient detected