You'll have to learn the assembly languages 6502 & 65c816. You'll also need to learn how the NES and SNES operates. There is a lot involved with doing a port. But if you're serious, I'd suggest going to discord and checking out nesdev and snesdev. The way I do things is vastly different, compared to traditional methods of working in assembly.