VGMusic.com is fan-made midi files that try to recreate the music of the games.
If you are looking for something that's real and actually from the games, you want music rips. These include NSF files (NES), GBS files (Game Boy and Game Boy Color), VGM files (Master System and Genesis), GSF files (Game Boy Advance), USF files (Nintendo 64), PSF files (Playstation), and several others.
You can also find a lot of soundtracks ripped from the consoles on archive.org! These are usually wav or mp3 files, i.e. more usual and supported formats.