Libretro is a simple but powerful development interface that allows for the
easy creation of emulators, games and multimedia applications that can plug
straight into any libretro-compatible frontend. This development interface is
open to others so that they can run these pluggable emulator and game cores
also in their own programs or devices.

Gearsystem is a cross-platform Sega Master System / Game Gear / SG-1000
emulator written in C++.

Homepage:
https://docs.libretro.com/library/gearsystem/
