There's nothing illegal about emulation, IP theft is illegal. 99%+ of emulator projects are totally legal except in insanely corrupt countries.