Nemulator
Nemulator is an emulator for the NES and the Sega Master System, developed by James Slepicka. It began as an NES emulator and now reaches a high level of compatibility on both systems.
Its NES emulation is mature, with support for the vast majority of the console’s many mappers, unofficial and undocumented CPU opcodes and cycle-accurate timing, which lets it run almost every NES game without problems.
Sega Master System support was added in version 4.0. It is newer than the NES emulation but already works well, making Nemulator worth trying for both systems.