USB Joystick or Game pad config.

Does any body know how to configure a USB Joystick? I am playing emulation games on my computer from Nintento64, Zega and other old games. I am using jnes as my game emulator, but I cannot get the control configuration correctly. Can any one give me some instructions on how to set up game pad correctly? What are other game emulators that I can use?
