finished emulator, probably some bugs. Will squash them later