Does the mouse pointer move on the desktop when using the trackball?
Assuming you mean for MAME, you need to edit the Mame.ini file to enable the mouse and trackball.
There are a few ways to do this, google or search this forum for Mame.ini and more info will come up.
If using windows open the command prompt (CMD)
You will need to navigate to where your Mame.exe file is then enter Mame.exe -cc
This will then create a new file in that folder called Mame.ini in there you can edit the settings.
Example
cd D:\Emulators\Mame\
Mame.exe -cc
you can also drag and drop the Mame folder into CMD and it should auto fill that info.
Once you have the Mame.ini file open it with notepad or a text editor. Look for
# CORE INPUT OPTIONS
Change Mouse to 1
then look for
# CORE INPUT AUTOMATIC ENABLE OPTIONS
and change trackball_device to mouse
you can also change anything else to mouse that you want.