Home

Awesome

lrcpp

lrcpp is a library meant to ease the development of Libretro front-ends. It has three blocks:

Usage

In order to have a working application several classes must be implemented. Their methods map almost directly to the Libretro API and should be self explanatory.

The minimum set of components required to run the more simple cores areAudio and Video (only the software framebuffer methods need be implemented for most of the cores, so setHwRender can return false). Input must also be provided in order to be able to interact with the emulation, of course. Some cores will also need configuration information to run, and thus will need a Config component. It doesn't hurt to provide a Logger component since it's easy to implement.

API

Frontend

The Frontend class manages a Core's' life-cycle, and connects it to the platform specific code needed for it to run. It does so via platform dependent components that are responsible for thigs like video and audio output, controller and camera input, and so on. Frontend also takes care of calling the core's functions and set the necessary callbacks for it to use, and routes the environment calls from the core to the correct components.

Components

Logger

Logs messages from the core. Only one method must be implemented.

Config

Deals with everything related to configuration and then some. Several methods must be implemented.

Video

Takes care of everything related with video output. The methods that must be implemented are the following:

Led

Changes the state of the system's LEDs.

Audio

Component that receives audio frames and must produce the audio output.

Midi

Provides the core access to the a MIDI device for raw I/O.

Input

Deals with all input devices.

Rumble

Allows to set the state of the rumble motors in controllers.

Sensor

Controls sensors like accelerometers.

Camera

Provides access to an attached camera.

Location

Provides location information to the core.

VirtualFileSystem

Provides the core with a virtual file system interface.

DiskControl

Interface with the core to control removable midia.

Perf

Utility interface for performance measurement.