+1 for multimouse. Mame has to have this on to start using the rawmouse caps and actually see each TB as an independent device.
About MameUI, though, haven't used it in ages. so I'm not positive how it works with rawinput support.
You might try plain vanilla command line Mame first, to make sure it's operational as you expect.
I've got 2 TBs in my cab (2 player marble madness is mucho divertido!)