Yeah... having joystick and mouse enabled all the time is a problem... you need to have them disabled in mame.ini then depending upon the game, enable only what you need in the particular game.ini
That will work, but it's not the best solution BECAUSE you still need the buttons connected to the GP-Wiz 49 in some of your trackball games. I know, because I have gone through the same thing (with a similar-looking control panel

). Basically the GP-Wiz 49 and TB are both competing for movement (the joystick is the culprit in trackball games).
Here is what you need to do:
Go to the games you use a trackball with. Hit TAB. Go to INPUT (this game). Move down to Track X Analog and hit ENTER. Move the trackball left or right so that it reads: Mouse 1 X
IF IT WON'T REGISTER THE TRACKBALL MOVEMENT, then exit MAME and plug in a regular USB mouse. Using a regular mouse for some reason seems to work better when mapping controls than the trackball. I know, because I got the same thing setting up my panel and also when beta testing the Optiwiz. BTW - leave the trackball plugged in too.
Once you have the mouse hooked up, launch MAME again and go back to the controls setup on the games. Once you have Track X Analog set to: Mouse 1 X
THEN
Go down to Track X Dec and hit ENTER. Hit ESCAPE which should set the value to: NONE
Do this for Track X INC
Go to Track Y Analog and hit ENTER. Move the mouse Up to set the value to: Mouse 1 Y
Set the values for Track Y Inc & Dec to NONE like we did above.
Now your trackball game will work exactly like it should.