@substring thats great thanks. I will keep you posted. I also found this link might be helpful -

https://retropie.org.uk/forum/topic/14283/getting-trackball-to-work-with-mame/13