Here is the page for SNES on retropie: https://retropie.org.uk/docs/Super-Nintendo-Entertainment-System/ and here is the one for NES: https://retropie.org.uk/docs/Nintendo-Entertainment-System/
You will find the proper file extensions there. Also, you should read and follow these instructions before posting on here: https://retropie.org.uk/forum/topic/3/read-this-first