There's nothing to program. Once it's enable on the frontend and maime, it ready to be use.
For mame, just start a game with the keyboard, hit tab and go into the varies section, select each function, hit the 'Enter" key and then hit the joystick button (GPWiz) that you want, repeat for everything else.