I can fully understand your flustration Howard and the feeling of banging you're head against the wall can be quite taxing on the nerves. That said, kindly allow me to play the Devils Advocate for a moment.
As you know, upon purchasing the vehicle the contract that you signed was between you and the dealer and, therefore, any issues that you might have must be resolved directly and through them. Mazda themselves only provide a telephone/email contact as a matter of courtesy and during my one and only contact with them which was simply requesting advice, I had the distinct feeling that I was dealing with them through a third party with the subsequent advice being read from a crib sheet. Anyway, that be as it may, the fact still remains that your contract is with the dealer and in spite (or should that be despite) their friendliness/willingness to help etc or any disagreement between them and Mazda, a final resolution to the problem lies with the dealer - the contract provider.
In the first instance I would compose a well thought out letter providing in detail the history of this gearbox problem and the efforts that you have taken to resolve it. Leave out any reference to the dealings between the dealer and Mazda as this is not your problem and the letter is being addressed to the dealer. The final paragraph of this letter should state (or words to the effect) that it is hoped that this problem can be resolved amicably and in a timely manner but that you will not hesitate to seek legal advice failing a satisfactory reply.
You might like to consider taking legal advice anyway, either before or after writing this letter to explore fully your consumer rights.