This has come up before. I had it myself.
The problem isn't with your wiring, most likely. It's Mame itself. Press tab during a game and check what keystrokes buttons 5 and 6 use. Chances are there won't be anything there. Just assign them again. That's what I did. I have to do it everytime I upgrade Mame.
Anyone know why this happens though?
The mame default is no keys mapped to player 2 button 5 & 6. If you don't use the old cfg/cfg files, mame "drops" back to the default (unless you use ctrlr/ini files). Sometimes a few cfg/cfg files (the one edited when you use TAB) might not be compatable with the new mame. OTOH, the ctrlr/ini files are designed to be, so if you do the remapping with the ctrlr/ini files once, it should work with all the new mames.
Read [rul=http://www.mameworld.net/easyemu/mamecontrolini.htm]easyemu[/url] and the docs/ctrlr.txt file that comes with mame for more info on using ctrlr/ini files.
FWIW, the hotrodse, slikstik, and xarcade use ctrlr/ini files to map their player two buttons 5-6.
But as Peale said, if you only upgrade the exe, the cfg/cfg files won't be overwritten, and should work most of the time on most games.