RetroArch Libretro Technical Brochure
RetroArch Libretro Technical Brochure
platform
www.libretro.com
RetroArch
• A cross-platform architecture
• The reference frontend to an API
• An app library/ecosystem of its own
• A no-strings-attached enduser
program
• A project with multiple stakeholders
Open source development community
Hardware vendors
Allied open source projects (XBMC,
OpenEmu)
RetroArch
• Goals/ambition
Create an all-encompassing platform on top of all
existing platforms/operating systems/ecosystems
Any time, any place, any device
Backend and frontend compartmentalization
1 Codebase per app
Libretro
• A lightweight C/C++ API
• Works according to
backend/frontend principle
Backend application talks with
frontend by way of API
• Facilitates
input/audio/video/camera/locatio
n streams
for use in games/media
players/graphics applications
Augmented reality
Runs on nearly all available
platforms/operating systems
• Apps run on every platform
With added value (shaders, rewinding, input support,
etc)
Are loaded in as module inside the frontend app
Dynamic library (Position Independent Code)
No recompilation of the frontend (RetroArch)
necessary
Dynamic or static library
Libretro RetroArch
Application core
Libretro
Libretro API
frontend
Libretro frontend
• Reference implementation
RetroArch
Platform agnostic
Performance-focused
Advanced features (shaders, overlays, rollback, etc)
Implements new features of the API first
Puts a heavy emphasis on performance and code clarity
• Other implementations
XBMC (RetroPlayer)
Arcan
Minir (upcoming)
Platform context
Direct3D Direct3D 9
Direct3D 11
SDL
VideoCore
Proprietary GameCube/
Wii
TI OMAP
Shader backend nVidia Cg
context
Microsoft HLSL
OpenGL GLSL
Shaders
• Three totally different implementations
1 Codebase
Can convert Cg to GLSL through off-line conversion script
Cg maps mostly to raw HLSL
Windowing
context
driver EGL
EGL (DRM/Linux)
CoreGL CoreGL (iOS)
EGL (Android)
CoreGL (OSX)
DirectSound
Audio driver (Microsoft)
context
Xaudio
(Microsoft)
ALSA
PulseAudio
Proprietary
Android
Audio driver OpenSL
context
OpenMAX
Windows
Xaudio (desktop)
(Microsoft)
Windows RT
CoreAudio iOS
OSX
Input driver XInput
context
DirectInput
SDL
Android
iOS
Proprietary
OpenGL Android
Overlay context
iOS
Windows
(Desktop)
Blackberry
Windows
Direct3D (Desktop/Metro)
Windows
RT/Phone
RGUI RGUI
Menu/UI context
RMenu
Cocoa (OSX/iOS)
Native
Windows GUI
Android UI
Has its own software
library of apps
• Made possible by libretro API
• Collection:
Games
Emulators
Media players
3D apps
Augmented reality
Usecase
• Playing games
Game ports
Emulators
• Movies/music/media
Media player implementations
• Streaming
• Augmented reality
Userbase
• Mobile (Android/iOS)
• PC (Windows/OSX)
• Game consoles
• Embedded
WhatRetroArch/libretro is trying to
achieve
• A platform / ecosystem made available on top
of all other pre-existing platforms
• A real-time, open-source alternative for rapid-
deployment, cross-platform development
• Non-game/emulator usecases
Gaming is going to meet CAD, home automation,
augmented reality, and more
• A bare-bones, non-restrictive alternative to
more restrictive would-be competitors
• Is already in use worldwide, now up to 300,000
hits on Google Play Store)
Extension to libretro
• 3D rendering
By way of OpenGL / OpenGL ES
Crossplatform abstraction layer –
Libretro GL
Is OpenGL not already crossplatform?
What
do most platforms have in common
nowadays?