Use usleep to make the emulation wait. Dramatically lowers CPU usage!
Trying to get around the lock ups that happen sometimes - still not working as yet :(
Maybe this will fix the problems with the buttons missing the image?