While emulation software itself are legal as long as they don't infringe copyright protections on the console, emulating games is only so when legitimately purchasing the game physically and ripping the contents.