Looks like a sensor that is bad. Probably a throttle position sensor or speed sensor. You will have to check the codes. Auto zone does it for free. Then we will have some direction. Hope this helps. Let me know what you find.
A couple of months ago, my girlfriend couldn't get the car out of park. I went into the shifter and took the neutral safety switch thing loose so it could be shifted without pressing the brake. The switch is still connected to the wiring harness though. Since then, we have noticed that the cruise control does not work all the time, just sporadically. Now, yesterday, the break lights quit working. I replaced the bulbs and they came on while the break was depressed but now will not work again and now the check engine light and AT light are on. The manual says when the AT light is on, it is an electrical problem and driving the car could damage the trans axle. One of the symptoms of the check engine light, per the manual, is also an electrical problem. Could it be the brake switch? Could it be that neutral safety switch that is working properly? Is it safe to drive it to autozone to check the codes with it jerking into drive when moved form park? Or, do you still think it is a throttle position sensor or speed sensor? Thanks for your help. My girlfriend is scared to death and we don't have much money and can't afford a high shop bill.
The thing you disconnected was the shift lock solenoid. Having it disconnected should not harm anything. But it may be shorted internally, and that may be causing the problem with the brake lights and cruise control. It could also be the brake switch. Try disconnecting elec. connecter on shift lock solenoid.
If that doesn't work then replace brake light switch. That should fix the brake lights and cruise control. However the hard shifting and check engine/AT lights being on is still probably gonna be a throttle position sensor or speed sensor, both are pretty easy to change. Should not be a problem to drive down to auto zone, but i wouldn't drive it more then you have too. Let me know if you need any more help.
Looks like the TCM is bad. That's the transmission control module. Yes, it will be expensive. It has to be replaced by the dealer and programed to the car. I have seen a few Mazdas with this problem.
As far as cost my guess would be about $750-$1000. Wish i had better news for you. But this does explain the transmission problems. There really isn't much you can do, the TCM has to be replaced. It is possible that it is just a wiring problem, but i doubt it. If the car is still under warranty then it should be covered. Disconnecting the shift lock has nothing to do with this problem. The transmission may be damaged if you continue to drive it like that. Sorry for the bad news, let me know if there is anything else i can do for you.