Yes, completely — the emulator software itself is legal to own and use. The legality question attaches to the games, not the program.
The rule of thumb is that if you own a physical copy of the game, having a ROM of it is defensible. Downloading a ROM for a game you have never bought is where you cross into infringement.
So own Mega Man 7 on cartridge and the ROM is fine. Own nothing and it is not.