Move emulation to its own thread. Add QGLWidget for drawing.