The QuickNES core library, originally by Shay Green, heavily modified