Based on the work in [this guide for using Nintendo controllers with Arduinos](http://www.instructables.com/id/Use-an-Arduino-with-an-N64-controller/) here comes a comfortable library for usage with, e.g., Arduino Uno and similar CPUs. For NES there is already [nespad](http://code.google.com/p/nespad/). This library uses inline assembly. Controllers can be attached to PIN 0 up to 13. But be aware that it's not written in best way possible. To use it, search for N64 in the Library Manager. Otherwise place the folder N64Controller into your `libraries` folder or download and import it as ZIP.
I used it in combination with [TVout](http://code.google.com/p/arduino-tvout/) and [EEPROM](http://arduino.cc/playground/Code/EEPROMWriteAnything) for highscore saving when I modified an existing Tetris port. The port used a Simple Tetris Clone under MIT license and if you want you can see the result here which is quite nice: [N64Tetris](http://pothos.blogsport.eu/files/2012/03/N64Tetris.zip).