We are pleased to inform you that we have implemented a gamepad.

Mostly implemented in JavaScript, but ...

https://github.com/pome-ta/pystaNesForJS