Yes, of course. It is too easy. I figure it out many years ago before NDS emulated in it.
Go to OPTIONS>Emulation Setup>ControlsClick highlight Button A and use your controller to press then click highlight Button B and use your controller to press and so on. Get it ?
Do not forget to go back to OPTIONS after OK and click SAVE OPTION.