There is a lot of debate on this topic with no clear answer. Nintendo is notoriously aggressive in protecting its intellectual property, so it is possible that emulating their games could be considered illegal. However, there are also a number of legal precedents that suggest that emulation is fair use. Ultimately, it is up to the individual to decide whether or not to emulate Nintendo games. If you do decide to emulate, be sure to do your research to avoid any potential legal issues.