Update emulator.c