Pixelcade for RecalBox (Experimental)

Note: RecalBox support is experimental and not officially supported.

You’ll need at least 600 MB free on your SD card for the Pixelcade LED installation. Pixelcade will be installed in:

Pixelcade Executable: /etc/init.d/pixelcade

Pixelcade Artwork: /recalbox/share/pixelcade-art

The following hardware devices have been tested with RecalBox and Pixelcade together. Other devices may work but if not, post on the Pixelcade forum and we’ll look into it.

  • Raspberry Pi 4 Model B

Installation

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

ssh root@recalbox or ssh root@<Your RecalBox IP Address>

password: recalboxroot

And then copy and paste the below command to install Pixelcade:

Pixelcade LED Installer Command

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

The installation script will take around 20-30 minutes to complete depending on the speed of your Internet connection.

Optional LED Art Pack

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. Use this command to install the art pack:

cd ~/pixelcade && ./pixelweb -p /recalbox/share/pixelcade-art --install-artpack <serial code>

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://recalbox.local:8080 or <RecalBox IP Address>:8080

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

Widget Features (Experimental)

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://recalbox.local:8080/weather?location=x

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

Clock

http://recalbox.local:8080/clock

Sports Scores Ticker

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

x can be: nfl, nba, nhl, mlb

Stock Ticker

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

where x,y, z are ticker names

ex. 

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

Pixelcade Command Line Parameters

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

/etc/init.d/S99MyScript.py

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

cd /etc/init.d/pixelcade && ./pixelweb -p /recalbox/share/pixelcade-art -port 7070 -image "system/recalbox.png" -startup &

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

cd /etc/init.d/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

Customizing Pixelcade Behavior in Batocera

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

/recalbox/share/userscripts

Here are the scripts for reference which you can customize

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

ScriptDescription
systembrowse[systembrowsing].sh

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:7070/console/stream/[console-name]

gamescroll[gamelistbrowsing].sh

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:7070/arcade/stream/[console name]/[rom name]

gamelaunch[rungame].sh

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=10

For cycle mode, number of seconds a still image PNG marquee will remain before scrolling the high score text.  This has no effect if it’s an animated GIF marquee which will always loop once.

 

esstart[stop].sh

Launches when the EmulationStation front end is started. This script will display the default text “Welcome and Game On” using this API call:

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

esquit[start].sh

Launches when the EmulationStation front end is shutdown. This script will display the text “Thanks for Playing” using this API call:

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

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