README.md
1EmulationStation
2================
3
4This is a fork of EmulationStation for RetroPie.
5EmulationStation is a cross-platform graphical front-end for emulators with controller navigation.
6
7Building
8========
9
10**Building on Linux**
11
12EmulationStation uses some C++11 code, which means you'll need to use at least g++-4.7 on Linux, or VS2010 on Windows, to compile.
13
14EmulationStation has a few dependencies. For building, you'll need CMake, SDL2, FreeImage, FreeType, cURL and RapidJSON. You also should probably install the `fonts-droid` package which contains fallback fonts for Chinese/Japanese/Korean characters, but ES will still work fine without it (this package is only used at run-time).
15
16**On Debian/Ubuntu:**
17All of this be easily installed with `apt-get`:
18```bash
19sudo apt-get install libsdl2-dev libfreeimage-dev libfreetype6-dev libcurl4-openssl-dev rapidjson-dev \
20 libasound2-dev libgles2-mesa-dev build-essential cmake fonts-droid-fallback libvlc-dev \
21 libvlccore-dev vlc-bin
22```
23**On Fedora:**
24All of this be easily installed with `dnf` (with rpmfusion activated) :
25```bash
26sudo dnf install SDL2-devel freeimage-devel freetype-devel curl-devel \
27 alsa-lib-devel mesa-libGL-devel cmake \
28 vlc-devel rapidjson-devel
29```
30
31**Note**: this repository uses a git submodule - to checkout the source and all submodules, use
32
33```bash
34git clone --recursive https://github.com/RetroPie/EmulationStation.git
35```
36
37or
38
39```bash
40git clone https://github.com/RetroPie/EmulationStation.git
41cd EmulationStation
42git submodule update --init
43```
44
45Then, generate and build the Makefile with CMake:
46```bash
47cd YourEmulationStationDirectory
48cmake .
49make
50```
51
52NOTE: to generate a `Debug` build on Unix/Linux, run the Makefile generation step as:
53```bash
54cmake -DCMAKE_BUILD_TYPE=Debug .
55```
56
57**On the Raspberry Pi**
58
59* Choosing a GLES implementation.
60
61 * if the Pi system uses the legacy/Broadcom driver, install the `libraspberry-dev` package before running `cmake` to configure the build
62 * if the Pi system uses the Mesa VC3/V3D GL driver, build using `-DUSE_MESA_GLES=On` to choose the MESA GLES implementation. This option is _mandatory_ when compiling for a Pi4 system, since the legacy GL drivers are not supported anymore on this system.
63
64* Support for using `omxplayer` to play video previews in the gamelist is enabled by adding `-DRPI=On` to the build options
65
66**GLES build notes**
67
68 If your system doesn't have a working GLESv2 implementation, the GLESv1 legacy renderer can be compiled in by adding `-DUSE_GLES1=On` to the build options.
69
70**Building on Windows**
71
72[FreeImage](http://downloads.sourceforge.net/freeimage/FreeImage3154Win32.zip)
73
74[FreeType2](http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.bz2) (you'll need to compile)
75
76[SDL2](http://www.libsdl.org/release/SDL2-devel-2.0.8-VC.zip)
77
78[cURL](http://curl.haxx.se/download.html) (you'll need to compile or get the pre-compiled DLL version)
79
80[RapisJSON](https://github.com/tencent/rapidjson) (you'll need the `include/rapidsjon` added to the include path)
81
82(Remember to copy necessary .DLLs into the same folder as the executable: probably FreeImage.dll, freetype6.dll, SDL2.dll, libcurl.dll, and zlib1.dll. Exact list depends on if you built your libraries in "static" mode or not.)
83
84[CMake](http://www.cmake.org/cmake/resources/software.html) (this is used for generating the Visual Studio project)
85
86(If you don't know how to use CMake, here are some hints: run cmake-gui and point it at your EmulationStation folder. Point the "build" directory somewhere - I use EmulationStation/build. Click configure, choose "Visual Studio [year] Project", fill in red fields as they appear and keep clicking Configure (you may need to check "Advanced"), then click Generate.)
87
88
89Configuring
90===========
91
92**~/.emulationstation/es_systems.cfg:**
93When first run, an example systems configuration file will be created at `~/.emulationstation/es_systems.cfg`. `~` is `$HOME` on Linux, and `%HOMEPATH%` on Windows. This example has some comments explaining how to write the configuration file. See the "Writing an es_systems.cfg" section for more information.
94
95**Keep in mind you'll have to set up your emulator separately from EmulationStation!**
96
97**~/.emulationstation/es_input.cfg:**
98When you first start EmulationStation, you will be prompted to configure an input device. The process is thus:
99
1001. Hold a button on the device you want to configure. This includes the keyboard.
101
1022. Press the buttons as they appear in the list. Some inputs can be skipped by holding any button down for a few seconds (e.g. page up/page down).
103
1043. You can review your mappings by pressing up and down, making any changes by pressing A.
105
1064. Choose "SAVE" to save this device and close the input configuration screen.
107
108The new configuration will be added to the `~/.emulationstation/es_input.cfg` file.
109
110**Both new and old devices can be (re)configured at any time by pressing the Start button and choosing "CONFIGURE INPUT".** From here, you may unplug the device you used to open the menu and plug in a new one, if necessary. New devices will be appended to the existing input configuration file, so your old devices will remain configured.
111
112**If your controller stops working, you can delete the `~/.emulationstation/es_input.cfg` file to make the input configuration screen re-appear on next run.**
113
114
115You can use `--help` or `-h` to view a list of command-line options. Briefly outlined here:
116```
117--resolution [width] [height] try and force a particular resolution
118--gamelist-only skip automatic game search, only read from gamelist.xml
119--ignore-gamelist ignore the gamelist (useful for troubleshooting)
120--draw-framerate display the framerate
121--no-exit don't show the exit option in the menu
122--no-splash don't show the splash screen
123--debug more logging, show console on Windows
124--scrape scrape using command line interface
125--windowed not fullscreen, should be used with --resolution
126--vsync [1/on or 0/off] turn vsync on or off (default is on)
127--max-vram [size] Max VRAM to use in Mb before swapping. 0 for unlimited
128--force-kid Force the UI mode to be Kid
129--force-kiosk Force the UI mode to be Kiosk
130--force-disable-filters Force the UI to ignore applied filters in gamelist
131--help, -h summon a sentient, angry tuba
132```
133
134As long as ES hasn't frozen, you can always press F4 to close the application.
135
136
137Writing an es_systems.cfg
138=========================
139
140Complete configuration instructions at [emulationstation.org](http://emulationstation.org/gettingstarted.html#config).
141
142The `es_systems.cfg` file contains the system configuration data for EmulationStation, written in XML. This tells EmulationStation what systems you have, what platform they correspond to (for scraping), and where the games are located.
143
144ES will check two places for an es_systems.cfg file, in the following order, stopping after it finds one that works:
145* `~/.emulationstation/es_systems.cfg`
146* `/etc/emulationstation/es_systems.cfg`
147
148The order EmulationStation displays systems reflects the order you define them in.
149
150**NOTE:** A system *must* have at least one game present in its "path" directory, or ES will ignore it! If no valid systems are found, ES will report an error and quit!
151
152Here's an example es_systems.cfg:
153
154```xml
155<!-- This is the EmulationStation Systems configuration file.
156All systems must be contained within the <systemList> tag.-->
157
158<systemList>
159 <!-- Here's an example system to get you started. -->
160 <system>
161 <!-- A short name, used internally. -->
162 <name>snes</name>
163
164 <!-- A "pretty" name, displayed in the menus and such. This one is optional. -->
165 <fullname>Super Nintendo Entertainment System</fullname>
166
167 <!-- The path to start searching for ROMs in. '~' will be expanded to $HOME or %HOMEPATH%, depending on platform.
168 All subdirectories (and non-recursive links) will be included. -->
169 <path>~/roms/snes</path>
170
171 <!-- A list of extensions to search for, delimited by any of the whitespace characters (", \r\n\t").
172 You MUST include the period at the start of the extension! It's also case sensitive. -->
173 <extension>.smc .sfc .SMC .SFC</extension>
174
175 <!-- The shell command executed when a game is selected. A few special tags are replaced if found in a command, like %ROM% (see below). -->
176 <command>snesemulator %ROM%</command>
177 <!-- This example would run the bash command "snesemulator /home/user/roms/snes/Super\ Mario\ World.sfc". -->
178
179 <!-- The platform(s) to use when scraping. You can see the full list of accepted platforms in src/PlatformIds.cpp.
180 It's case sensitive, but everything is lowercase. This tag is optional.
181 You can use multiple platforms too, delimited with any of the whitespace characters (", \r\n\t"), eg: "genesis, megadrive" -->
182 <platform>snes</platform>
183
184 <!-- The theme to load from the current theme set. See THEMES.md for more information.
185 This tag is optional; if not set, it will use the value of <name>. -->
186 <theme>snes</theme>
187 </system>
188</systemList>
189```
190
191The following "tags" are replaced by ES in launch commands:
192
193`%ROM%` - Replaced with absolute path to the selected ROM, with most Bash special characters escaped with a backslash.
194
195`%BASENAME%` - Replaced with the "base" name of the path to the selected ROM. For example, a path of "/foo/bar.rom", this tag would be "bar". This tag is useful for setting up AdvanceMAME.
196
197`%ROM_RAW%` - Replaced with the unescaped, absolute path to the selected ROM. If your emulator is picky about paths, you might want to use this instead of %ROM%, but enclosed in quotes.
198
199See [SYSTEMS.md](SYSTEMS.md) for some live examples in EmulationStation.
200
201gamelist.xml
202============
203
204The gamelist.xml file for a system defines metadata for games, such as a name, image (like a screenshot or box art), description, release date, and rating.
205
206If at least one game in a system has an image specified, ES will use the detailed view for that system (which displays metadata alongside the game list).
207
208*You can use ES's [scraping](http://en.wikipedia.org/wiki/Web_scraping) tools to avoid creating a gamelist.xml by hand.* There are two ways to run the scraper:
209
210* **If you want to scrape multiple games:** press start to open the menu and choose the "SCRAPER" option. Adjust your settings and press "SCRAPE NOW".
211* **If you just want to scrape one game:** find the game on the game list in ES and press select. Choose "EDIT THIS GAME'S METADATA" and then press the "SCRAPE" button at the bottom of the metadata editor.
212
213You can also edit metadata within ES by using the metadata editor - just find the game you wish to edit on the gamelist, press Select, and choose "EDIT THIS GAME'S METADATA."
214
215A command-line version of the scraper is also provided - just run emulationstation with `--scrape` *(currently broken)*.
216
217The switch `--ignore-gamelist` can be used to ignore the gamelist and force ES to use the non-detailed view.
218
219If you're writing a tool to generate or parse gamelist.xml files, you should check out [GAMELISTS.md](GAMELISTS.md) for more detailed documentation.
220
221
222Themes
223======
224
225By default, EmulationStation looks pretty ugly. You can fix that. If you want to know more about making your own themes (or editing existing ones), read [THEMES.md](THEMES.md)!
226
227I've put some themes up for download on my EmulationStation webpage: http://aloshi.com/emulationstation#themes
228
229If you're using RetroPie, you should already have a nice set of themes automatically installed!
230
231
232-Alec "Aloshi" Lofquist
233http://www.aloshi.com
234http://www.emulationstation.org
235