Is this legal? I know decompiling is legal in some areas for specific reasons. But I don't think that you can open source the result of that decompilation. You end up with an artifact based on something you don't have the rights to relicense.
Nintendo hasn't gone after the repos because they have a very solid fair use defense. They have, however, taken action against shared EXEs derived from that source code which DO contain the copyrighted SM64 assets. The fact that they went against that and not the code-only project shows they probably agree with this analysis.