Using the emulator itself is perfectly legal and above all, you must own the games you want to play using the emulator.