Found the solution. Need to add the -ctrlr xarcade as a command line option. How about an option in gameex to choose which input device you are going to use. A ticket box for xarcade, joystick, keyboard etc.
Have an x-arcade 2 player joystick. If i use Mame32 then everything is ok. But if i use the gameex interface, player 1 joystick does not work but the buttons do. The coin button also moves to button 8. It used to work in v3.63 but stopped in v3.64 and 3.70. Any ideas?