Pixelcade for EmuELEC

EmuELEC allows you to run emulation on sub $50 Android TV boxes like this one for example. The experience is very similar to RetroPie running on a Raspberry Pi but more affordable given the current limited availability and high cost of Raspberry Pis and EmuELEC supports the powerful Odroid N2+ board.

You’ll need at least 1 GB free on your SD card for the Pixelcade LED installation and note that the Pixelcade dynamic game scrolling and screen saver updates requires EmuElec 4.4 or above. Pixelcade will be installed in /storage/roms/pixelcade. Also note that you can re-run the installer to get Pixelcade artwork updates and the installer will not overwrite any of your artwork changes.

From a computer on the same network (Ethernet or WiFi) as your EmuELEC, SSH into your EmuELEC using the username of root and the password of emuelec.

ssh root@emuelec or ssh root@<Your EmuELEC IP Address >

Then copy and paste the command below to run the Pixelcade LED Installer.

Pixelcade LED Installer Command

curl -kLO -H "Cache-Control: no-cache" https://raw.githubusercontent.com/alinke/pixelcade-linux-builds/main/install-scripts/setup-emuelec.sh && chmod +x setup-emuelec.sh && ./setup-emuelec.sh

Pixelcade LCD

Use this Version

The LED installation script will take around 10-15 minutes to complete.

EmuELEC and Pixelcade Demo

RetroAchievements Integration

Pixelcade Companion Web Interface

Use the Pixelcade Companion Web interface to browse marquee artwork. From any web browser on the same network as your Batocera, go to:

http://emuelec.local:8080 or <emuelec IP Address>:8080

For example: http://emuelec.local:8080 or 192.168.1.198:8080

Browse Artwork

Browse marquee artwork by system /console type. 

Update Artwork

Check for new artwork and click “UPDATE / INSTALL ARTWORK” when there is an update.

Also, an optional paid LED art pack is available for Pixelcade LED with additional animated marquees. Note this art pack is for Pixelcade LED only and not for Pixelcade LCD marquees.

After purchasing the LED art pack, you’ll receive a serial code and then enter it in the “Enter Art Pack License” box. 

Widgets

While not in Arcade marquee mode, Pixelcade can display weather, act as a clock, display sport scores, and stock prices. 

First click the “Widget Settings” box to configure your favorite teams, stocks, and zip code for weather.

Settings

Use Settings to access the Pixelcade log. This is a great tool when customizing artwork. For example, this line tells you that your arcade front end sent a request to Pixelcade for a file called mame/3stooges.png

Received request for arcade stream: Console: mame ROM: 3stooges

Customizing Pixelcade Behavior in EmuELEC

You can customize the Pixelcade behavior by modifying the scripts located in 

/storage/.emulationstation/configs/scripts

Here are the scripts for reference which you can customize

https://github.com/alinke/pixelcade-linux/tree/main/emuelec/scripts

ScriptDescription
System Selected

Launches each time a system/console/collection is selected. This script make this API call to display the system/console marquee:

http://127.0.0.1:8080/console/stream/[console-name]

Game Selected

Launches each time a game is selected like for example while scrolling through games. This script makes this API call to display the game marquee:

http://localhost:8080/arcade/stream/[console name]/[rom name]

Game Start

Launches each time a game is launched. This script will check if the game has high scores and display high scores in cycle mode if yes. Cycle mode means cycling between the game marquee and the high score scrolling. If the game does not have or does not support high scores, then the text “Now Playing will scroll and then the game marquee will be displayed. 

You can customize these settings in this script:

DISPLAYHIGHSCORES=yes

If set to no, high scores will not scroll and the “Now Playing will scroll and then the game marquee will be displayed.

NUMBERHIGHSCORES=3

The number of high scores to scroll, choose 1 for example to only show the top score.

CYCLEMODE=yes

Cycle mode continually cycles between the game marquee and scrolling high scores while a game is active. If set to no, then high scores will scroll only once on game launch and then display the game marquee.

NUMBER_MARQUEE_LOOPS=1

For cycle mode, the number of times the animated marquee will loop before scrolling the high score text, this has no effect if it’s a still image game marquee.

Front End Restart or Shutdown

 Launches when the EmulationStation front end is restarted or shutdown. This script will display the text “Bye” using this API call:

http://localhost:8080/text?t=<Your%20Scrolling%20Text%20Here>

achievements

Fires each time a RetroAchievement is achieved. Note that RetroAchievements are one time events. You must have RetroAchievement turned in the EmulationStation menu.

Here are features available from the Pixelcade API which you can use in the above scripts https://pixelcade.org/api

Widget API Access

While not in Arcade marquee mode, Pixelcade can display weather, act as a clock, display sport scores, and stock prices. Please note this widgets are currently experimental.

Weather

http://batocera.local:8080/weather?location=x

x can be a zip code or a city/country name

Clock

http://batocera.local:8080/clock

Sports Scores Ticker

http://batocera.local:8080/sports/x

x can be: nfl, nba, nhl, mlb

Stock Ticker

http://batocera.local:8080/stocks?tickers=x,y,z

where x,y, z are ticker names

ex. 

http://batocera.local:8080/stocks?tickers=aapl,googl,sbux

Pixelcade Command Line Parameters

Pixelcade will start automatically utilizing the custom.sh built in startup script of EmuELEC located at:

/storage/.config/custom_start.sh

The Pixelcade installer adds this line to custom.sh which will start Pixelcade automatically with these command line parameters:

cd /storage/roms/pixelcade && ./pixelweb -image "system/emuelec.png" -startup &

Pixelcade has additional command line parameters for customization. Use this command to see the possible parameters.

cd /storage/roms/pixelcade && ./pixelweb -h

Usage of ./pixelweb:

  -b string

   optional bind address (default “0.0.0.0”)

  -check-artwork

    check Pixelcade artwork for updates. Exits with code 0 if no update available, 1 if update is available, 2 if directory does not exist, 3 if unknown error.

  -d string

    path to pixelcade device. Set to auto to scan for device. On Windows use COM# (default “auto”)

  -debug

    debug log level

  -delay int

    time (in seconds) to delay device init

  -devicescan

    scan for device if not found or not specified with -d (default true)

  -font string

    default font for text (default “Arial Narrow 7”)

  -fontcolor string

    default font color for text (default “red”)

  -fontcolorrandom

    random default font color. Overrides -fontcolor

  -fontsize int

    default font size for text (default 28)

  -fuzzy

    enable fuzzy matching for images

  -image string

    optional image to display on startup (default “mame/pixelcade.png”)

  -install-artpack string

    install art pack with license code

  -install-artwork

    install Pixelcade artwork to pixelcade root. Exits with code 2 if artwork already installed.

  -logfile string

    optional log file

  -nointro

    skips playing the startup text and logo. Screen will be black on startup.

  -p string

    path to pixelcade root (default “/userdata/system/pixelcade”)

  -port int

    optional port to listen on (default 8080)

  -progress-stdout

    print progress output as stdout only

  -startup

    startup mode

  -swapbluegreen

    swap blue and green. Only needed for certain panels.

  -system-image string

    optional system image to display on startup. Overrides -image

  -text string

    optional text to display on startup (default “Welcome to Pixelweb”)

  -trace

    trace log level

  -update-artwork

    install Pixelcade artwork to pixelcade root

  -version

    display the version number