In RetroPie, the libretro emulator cores are identified with a lr- in front of their name. With a few simple changes to the emulator source code, almost any existing emulator could become a libretro core. RetroArch then handles the input controls and output graphics and audio while the emulator core handles the emulation of the original system. RetroArch and libretro provide a way to take an existing emulator and load that emulator as a library or 'core'. RetroArch is the official front end for the libretro API.