Mirror emulator continued, small fixes in other sources.
Emulator is ready. A bug occures when closed in debug mode (GDB), but
it's possibly a bug in GDB.