I have the trackball working on all of the emulators that use and where its possible. I don't think mame4all has any support for mice though.
Here is what I did for advmame.sdl.rc
device_mouse sdl
device_raw_mousedev[0] auto
device_raw_mousedev[1] auto
device_raw_mousedev[2] auto...