Based on the work in http://www.instructables.com/id/Use-an-Arduino-with-an-N64-controller/ here comes a comfortable library for usage with e.g. Arduino Uno. For NES there is already http://code.google.com/p/nespad/ . This library uses inline assembly and controllers can be attached to PIN 0 up to 13. But be aware that it's not written in best way possible. Place the folder N64Controller into your folder 'libraries'.
I used it in combination with TVout ( http://code.google.com/p/arduino-tvout/ ) and EEPROM ( http://arduino.cc/playground/Code/EEPROMWriteAnything ) for highscore I modified an existing Tetris port which itself uses Simple Tetris Clone under MIT license to be using this library here and the result is quite nice: http://pothos.blogsport.eu/files/2012/03/N64Tetris.zip