emulation now works but blocks in the CPU thread
implement basic context switching using "ucontext.h".
video/audio now work, timing still wrong.
fix timing