I wouldn't edit the files by hand, at least not to start. I would personally load up a game in MAME, hit TAB, and go to General Options - Player 1 Controls. Find the Mouse stuff near the bottom (should be 6 lines for Analog, Inc, Dec and X,Y). Now, select the analog for x and move your tank stick to left or right. It should pop up with something like 'MOUSE_1_X'. Now, if you want to see if MAME is recognising different mice with different numbers, try the y axis with the mouse. It should give you something like 'MOUSE_2_Y' or something like that. If it reports the same number, that shouldn't be a problem. If it doesn't take the trackball, then I would try unplugging the mouse and restarting the PC prior to trying again (just to see if it works). There may be an option in MAME to enable multiple mice. If so, it has to be enabled.