Remember Me
You can configure your controller by launching a ROM, pressing TAB on a keyboard to bring up the MAME UI and selecting Input (general) or Input (this game).
Forum member Floob has created a video that demonstrates this.
Configuring MAME with USB controller