added emu-shared.c