Emulationstation on Gameshell

Okay! I got EmulationStation to install into a new install of clockworkos_v2.1.

It launches, but I get a configuration screen to assign keys. Unfortunately, the GameShell doesn’t have enough buttons to assign every function. Is there a technique to skip entries? Or better yet, does someone have a config file will the keys already assigned?

Thanks!

I believe that holding any button for several seconds will skip a keymapping entry. In this way you can skip functions you do not want to map to buttons by holding any key.

Cool! I got it up and running. Unfortunately, I can’t get it to run any ROMs from NES or SNES…

Edit: Got it. Typos in emulator paths.

Cool ! Good news :slight_smile:

Please check my launch script, it could be useful for ya ! :wink:

Confirmed. ES runs fine for me with 0.21 but the display is corrupted with 0.3 installed.

Hi. Great tutorial.

I have compiled emulationstaton on 0.21 and set up es_systems.cfg and gamelists.xml following your example. Also got ES icon on clockworkpi screen.

When I run emulationstation, I get an error initializing SDL. No available video device. Window failed to initialize followed by a segmentation fault:
20190320_230700

Any ideas?

Thanks

Did you get the resources folder in .emulationstation ?

Verify the owner and the permissions of the folders

You need to add DISPLAY=:0; to send the output to the LCD before the command if launching via SSH. IE:

cpi@clockworkpi:~/.emulationstation/gamelists$ DISPLAY=:0;emulationstation

Yes. I copied the contents of ~/EmulationStation/resources into ~/.emulationstation like this:
image

Is this correct?

Thanks again for the help.

Thanks for the suggestion. When I tried it I got this output:

image

This is the same output I get when I try to run emulationstation with the command:

cpi@clockworkpi:~/.emulationstation$ emulationstation

Am I missing SDL driver?

Looks like you took the contents of the resources folder, instead of the folder itself.

Try this command, which will recursively copy the resources folder into the .emulationstation folder:

cp -R ~/EmulationStation/resources/ ~/.emulationstation/

As for your sdl error… I do remember having this problem once, but the only solution that worked for me was to start from scratch and try again.

Thanks for the help. I used the cp -R ~/EmulationStation/resources/ ~/.emulationstation/ command previously but just tried again on fresh install of 0.3 with same results :woozy_face:

I did remember this time that the /etc/emulationstation files are note created automatically. I have been making the /etc/emulationstation/themes folder to install the light theme as per the directions. Browsing the Emulationstation github page it looks like there should be some files installed to /etc during installation. Is this correct?

Thanks very much to all who have helped out. Much appreciated. Really wanna get this to work.

For etc, I had to add the folders and files for themes manually. You will need to use sudo for all commands, including git.

FYI, I started again with a fresh image with OS 0.21 and got some similar sdl errors when attempting to run emulationstation over SSH, but it ran fine when I launched it from the GameShell. I would not recommend using 0.3. I got those corrupt screens using 0.3 on 2 different GameShells.

apt-get install libcurl4-openssl-dev

worked for me but from os 0.2

A bit of a necropost, but just want to confirm that emulationstation appears to be working soundly on os 0.5.

There was a small error in the initial apt-get install, in the sense that one of the fonts couldn’t be installed. I just removed that.

sudo apt-get install libsdl2-dev libboost-system-dev libboost-filesystem-dev libboost-date-time-dev libboost-locale-dev libfreeimage-dev libfreetype6-dev libeigen3-dev libcurl4-openssl-dev libasound2-dev libgl1-mesa-dev build-essential cmake fonts-droid-fallback vlc libvlc5 libvlc-dev rapidjson-dev

git clone --recursive https://github.com/RetroPie/EmulationStation.git

cd EmulationStation

cmake .

make

cp -R ~/EmulationStation/resources/ ~/.emulationstation/resources/

sudo make install

rm -Rf ~/EmulationStation

In a directory you can easily access via the gameshell, make a file called emulationstation.sh, or whatever you want to call it, and in the file just write the line

emulationstation

Since you did the sudo make install, it should reference the file you copied to /usr/local/bin.

This is the config file I generated, based on the default directory structure of the game shell. Place it in ~/.emulationstation

<systemList>
	<system>
		<name>mame</name>
		<fullname>Multiple Arcade Machine Emulator</fullname>
		<path>~/games/ARCADE</path>
		<extension>.zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/mame2003_plus_libretro.so %ROM%</command>
		<platform>mame</platform>
		<theme>mame</theme>
	</system>
	
	<system>
		<name>nes</name>
		<fullname>Nintendo Entertainment System</fullname>
		<path>~/games/NESTOPIA</path>
		<extension>.nes .NES .zip .7z</extension>
		<command>retroarch -F -L ~/.apps/emulators/nestopia_libretro.so %ROM%</command>
		<platform>nes</platform>
		<theme>nes</theme>
	</system>

	<system>
		<name>snes</name>
		<fullname>Super Nintendo Entertainment System</fullname>
		<path>~/games/SFC9X</path>
		<extension>.sfc .smc .fig .zip .7z</extension>
		<command>~/apps/emulators/PocketSNES %ROM%</command>
		<platform>snes</platform>
		<theme>snes</theme>
	</system>

	<system>
		<name>gb</name>
		<fullname>Game Boy</fullname>
		<path>~/games/GB</path>
		<extension>.gb .gbc .gba .gbx .7z .zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/mgba_libretro.so %ROM%</command>
		<platform>gb</platform>
		<theme>gb</theme>
	</system>

	<system>
		<name>gba</name>
		<fullname>Game Boy Advance</fullname>
		<path>~/games/MGBA</path>
		<extension>.gb .abc .gba .gbx .7z .zip</extension>
		<command>~/apps/emulators/gpsp %ROM%</command>
		<platform>gba</platform>
		<theme>gba</theme>
	</system>

	<system>
		<name>megadrive</name>
		<fullname>Sega Mega Drive</fullname>
		<path>~/games/PicoDrive</path>
		<extension>.bin .zip .gen .32x .smd .iso .7z</extension>
		<command>retroarch -F -L ~/apps/emulators/picodrive_libretro_gameshell_v1.92.so %ROM%</command>
		<platform>megadrive</platform>
		<theme>megadrive</theme>
	</system>

	<system>
		<name>gamegear</name>
		<fullname>Sega Game Gear</fullname>
		<path>~/games/GGEAR</path>
		<extension>.md .gg .7z .zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/gearsystem_libretro.so %ROM%</command>
		<platform>gamegear</platform>
		<theme>gamegear</theme>
	</system>

	<system>
		<name>coleco</name>
		<fullname>Colecovision</fullname>
		<path>~/games/COLECO</path>
		<extension>.col .COL .7z .zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/bluemsx_libretro.so %ROM%</command>
		<platform>colecovision</platform>
		<theme>colecovision</theme>
	</system>

	<system>
		<name>lynx</name>
		<fullname>Atari Lynx</fullname>
		<path>~/games/LYNX</path>
		<extension>.lnx .7z .zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/handy_libretro.so %ROM%</command>
		<platform>lynx</platform>
		<theme>lynx</theme>
	</system>

	<system>
		<name>n64</name>
		<fullname>Nintendo 64</fullname>
		<path>~/games/mupen64</path>
		<extension>.z64 .n64 .zip .7z .v64</extension>
		<command>~/apps/emulators/mupen64plus --plugindir /usr/local/lib/mupen64plus/ --gfx mupen64plus-video-rice.so --fullscreen %ROM%</command>
		<platform>n64</platform>
		<theme>n64</theme>
	</system>

	<system>
		<name>zxspectrum</name>
		<fullname>Sinclair ZX Spectrum</fullname>
		<path>~/games/FUSE</path>
		<extension>.tzx .tap .z80 .rzx .scl .trd .7z .zip</extension>
		<command>retroarch -F -L ~/.apps/emulators/fuse_libretro.so %ROM%</command>
		<platform>zxspectrum</platform>
		<theme>zxspectrum</theme>
	</system>

	<system>
		<name>amiga</name>
		<fullname>Amiga</fullname>
		<path>~/games/UAE</path>
		<extension>.uae .7z .zip</extension>
		<command>~/apps/emulators/uae4arm %ROM%</command>
		<platform>amiga</platform>
		<theme>amiga</theme>
	</system>

	<system>
		<name>psx</name>
		<fullname>Sony Playstation</fullname>
		<path>~/games/PCSX</path>
		<extension>.bin .cue .img .mdf .pbp .toc .cbn .m3u .ccd</extension>
		<command>~/apps/emulators/pcsx -cdfile %ROM%</command>
		<platform>psx</platform>
		<theme>psx</theme>
	</system>

</systemList>

When setting up the key bindings initially, it is purely for the emulationstation interface, and not for setting up values in games. There are less keys on the gameshell than the interface asks for. You can skip any keys you don’t use, such as L3 and R3 etc, by holding the menu button for a couple of seconds on the gameshell.

I made a themes directory in ~/.emulationstation/themes and copied the default theme to there.
You can get it from https://emulationstation.org/downloads/themes/simple_latest.zip
Using the config above, it should put together a nice visually pleasing theme, and be compatible with emulationstation community themes. I personally find that it’s easy enough to see, despite the low resolution.

There are possibly some people out there just wanting the gameshell as a pure emulation device, and not really care for tinkering. If that’s the case, then possibly having emulationstation as the main launcher could almost be feasible.

3 Likes

I personnally edited the pixel TFT theme to make it compatible with videos thumbnail.
And also created a Shell script to use different emulator for the same system.
I coule share them if someone us interested.

2 Likes

Please do! Any shared perspective is good!!
I initially had a system config with both standalone and Retroarch, but I wanted to make this as “kiosk friendly” as possible, and that just confuses my layman subject. Plus that config I wrote is for a stock 0.5 setup, without any extra standalone emulators installed.

On another note, do you have real hit or miss kind of luck with stability? Like some times Retroarch cores sometimes work a treat, and other times just fail completely? It’s like it’s getting confused as to what running directory it is coming from, possibly dependant on whatever the previous thing you did was.
Pcsx ends up installing its .pcsx and rom directories in the same one as my ES running script within the launcher menu.
Exiting out of standalone emulators is also hit or miss, with the ES sometimes coming back in frozen, and half loaded in. Retroarch at least seems to be able to exit fine.
Did you provide any arguments in your running script to make it run with more consistency? I have a feeling it is to do reinitialisation of graphic drivers and/or not cleanly terminating processes.
It’s such a pretty UI to just hand to someone to use, and have them go “oh wow” but just not stable enough to leave them with your console for more than 5 mins without panicking.

The script is here : Launch emulator script

Actually it’s just a thing to save the association with emulator/rom in a file. You have to edit it manually, but when it’s done, it’s done.

Since I’m still in 0.3 I’d never experienced any kind of problem with stability. But I don’t play pcsx a lot.

After a quick look at the launch script I think it’s not up to date. I will check this later.

Oh, re: the system.config I was thinking rather, if you used any specific parameters or arguments. I personally found that using the -F to run it in full screen (before -L) had more success with getting retroarch to run.
Also, sound doesn’t appear to be working for the menus the way it’s expected.

The one that I have written out has all the associations for the pre installed on an up to date 0.5, favouring retroarch, since returning to ES after using a standalone, eg gpsp+, PocketSnes crashes the app. It’s basically a mirror of each of the action.config files.

The other problem I have is how it handles *.zip files. It doesn’t handle it the same way the stock launcher does, instead initially decompressing, and leaving the extracted files from the archive in the same directory. Not the most ideal scenario, especially if you’re space limited. I’ve left it in my script, just for convenience.

Here’s the log readout for an emulator using retroarch. It works, but as you can see, the attempts to load the sounds for the ES launcher aren’t behaving.

lvl2: 	Parsing XML file "/home/cpi/.emulationstation/gamelists/psx/gamelist.xml"...
lvl2: 	 req sound [basic.launch]
lvl2: 	   (missing)
lvl2: 	Attempting to launch game...
lvl2: 		retroarch -L ~/.config/retroarch/cores/pcsx_rearmed_libretro.so /home/cpi/games/PSX/Castlevania\ -\ Symphony\ of\ the\ Night.bin
lvl2: 	Creating window...
lvl2: 	Created window successfully.
lvl2: 	GL vendor:   lima
lvl2: 	GL renderer: Mali400
lvl2: 	GL version:  2.1 Mesa 20.0.0-devel (git-2d971cc1ca)
lvl2: 	Checking available OpenGL extensions...
lvl2: 	 ARB_texture_non_power_of_two: ok
lvl2: 	 req sound [basic.launch]
lvl2: 	   (missing)

On the other hand, this is how it behaves trying to load a standalone emulator. I have chosen Mupen64plus, with specific arguments defining that it is to be run in full screen, with a specified plugin etc. overriding whatever it is that gets put in a config; since I believe that ES doesn’t seem to obey directory heirachy/structure. As you can see, it crashes.

lvl2: 	Attempting to launch game...
lvl2: 		~/apps/emulators/mupen64plus --plugindir /usr/local/lib/mupen64plus/ --gfx mupen64plus-video-rice.so --fullscreen /home/cpi/games/N64/Banjo-Kazooie\ \(U\)\ \(V1.0\)\ \[\!\].z64
lvl1: 	...launch terminated with nonzero exit code 32256!
lvl2: 	Creating window...
lvl2: 	Created window successfully.
lvl2: 	GL vendor:   lima
lvl2: 	GL renderer: Mali400
lvl2: 	GL version:  2.1 Mesa 20.0.0-devel (git-2d971cc1ca)
lvl2: 	Checking available OpenGL extensions...
lvl2: 	 ARB_texture_non_power_of_two: ok

Now here’s the funny thing. If I load up a standalone without ES via the standard launcher, I get the reverse happening, with retroarch based games not working, but standalone being fine. Judging by the logs, and the fact that you have it working in 0.3 fine, my guess is that this is something related to OpenGL extensions that have been introduced in 0.5, and the compatibility thereof.

I may have jumped the gun little bit, saying that it’s 100% ready fro prime time. I would say it is, if you have a very specific es_system.cfg file that:
a) Doesn’t read compressed archives
b) only uses either retroarch OR standalone emulators

Edit: I just checked out that script in your last post! That is amazing, how it handles the compressed files! that should hopefully solve that problem re: how stock ES handles things. I’m definitely going to use it! :slight_smile: