MAME's mouse code was just changed by Derrick Renaud- I believe the changes are in effect from 104 onward. The changes allow all your mouse devices to be recognized separately, without any of the creative workarounds that have been necessary up 'til now, so I'd definately use a version after the change. Especially if you want to do 3-player Rampart. Three trackballs will also require two OptiPacs or OptiWiz. (What's the plural of OptiWiz?)
I really like the OptiWiz, but for your specific three trackball configuration, I'd got with the OptiPac instead. Here's why: Since each OptiWiz supports three axes, one of your trackballs will be split with one axis on one OptiWiz, and one on the other. All three axes on the OptiWiz appear to Windows as part of the same mouse- Up/Down (Y-axis), Right/Left (X-axis), and the Scroll Wheel (Z-axis). So, the trackball that's split between the encoders will appear to Windows as being two different mice. Theoretically, I think that ought to be OK with the new MAME code, though I doubt anybody's tested that particular configuration yet. But it may be an issue if you try to use it with anything other than MAME. Also, The scroll wheel is handled differently by Windows, it's much more sensetive than the other two. You can fix that by adjusting it's sensetivity in MAME, or by doing a custom compile of the MAME code. Can't do a thing about it outside of MAME, though.
It should be noted, none of this stuff is a problem for people who are just hooking up one trackball and one spinner, which is what 99% of people do anyway. And I like having a spinner set up as the scroll wheel- if you're also running Windows, or a frontend that lets you use the scroll wheel in the game list, then that's pretty darn cool. But for this specific application, maybe the OptiWiz isn't the best choice.
On the other hand, each OptiPac supports 4 axes- two per mouse (X & Y, and no scroll wheel). So it each trackball reads as it's own mouse, with identical sensetivity. Plus, you'll still have one mouse's worth of axes leftover for other controls.