It'll have a M50D (mazda 5spd). They definitely aren't the best transmissions to hold up against abuse. Could you get it into reverse or was 4th the only gear it would go into???
You could have anything from busted up shift forks to an imploded tranny. It's any ones guess until you get into to. I would price out a good 5spd from a local junk yard and plan on the cost of replacing the whole tranny. That being said the ZF-542 5spd is the heavy duty 3/4-1ton tranny that you might want to upgrade to... I would think you could find a M50D for $300-$400 in working condition pretty easily... Don't forget to add $100ish for a new clutch too.