Implemented joypad input, and base for speed hacks (although it's disabled because it breaks shit). Also fixed NMI wait.