Skip to content

Jamyz/RetroBoxLED

Repository files navigation

๐ŸŽฎ RetroBoxLED

ESP32 firmware for Recalbox LED marquee (HUB75/DMD 128x32 P4 panels).

โœ… Compatible with Recalbox 10.0.5


๐ŸŒ English | Franรงais | Espaรฑol


โ„น๏ธ Info

I have previously built management applications in C++, C# and VB .Net for personal and professional projects. But I have to admit that AI helped me a lot to build this in just a few days. Obviously it is not perfect. Some large lists like ARCADE, MAME or FBNEO take a long time to display an image. That is why I am keeping this project open to everyone, waiting for someone to do better.

โœจ Features

  • GIF playback : Plays GIFs and PNGs (/Arcade, /BEST_OF_TOP_30, /Pixel_Art, etc.)
  • Fallback : /systems/_defaults/_default.png
  • Playlists : Arcade.txt, Favorites.txt, Consoles.txt
  • MQTT : EmulationStation events (rungame, shutdown, etc.)
  • Recalbox : Automatic Arcade mode

โญ How it works

By default, the ESP32 plays a GIF playlist. Once it receives information via MQTT, it automatically switches to ARCADE mode. When Recalbox is turned off, the ESP32 resumes playlist playback. If a GIF or PNG is missing, it will use the fallback file placed in /systems/_defaults.

๐Ÿ“ SD Card Structure

The SD card must be formatted as FAT32 with the following structure. Copy the _defaults folder into the systems directory on your SD card.

RetroBoxLED SD Card/
โ”œโ”€โ”€ gifs/
โ”‚   โ”œโ”€โ”€ Arcade/, BEST_OF_TOP_30/, Pixel_Art/   | GIFs
โ”œโ”€โ”€ systems/
โ”‚   โ”œโ”€โ”€ mame/, neogeo/, snes/                  | Systems
โ”‚   โ”‚   โ”œโ”€โ”€ logo_detoure/, marquee             | Image folders
โ”‚   โ”œโ”€โ”€ _defaults/                             | Fallback files
โ”œโ”€โ”€ playlists/
โ”‚   โ”œโ”€โ”€ Arcade.txt, Favorites.txt, Consoles.txt

๐Ÿš€ Installation

Before use, follow these steps in order:

  1. Configuration : Set up the config.ini file
  2. Playlists : Create your playlists
  3. Tools : Use the provided scripts
  4. Flash : Flash the ESP32 firmware
  5. MQTT : Understand how MQTT works
  6. Telnet : Telnet terminal for testing

1 - โš™๏ธ Configuration

The config.ini file must be located at the root of the SD card. It allows you to configure the following settings:

# Info
info=0                      # 0 = no info at boot, 1 = display info at boot

# Playlist
playlist=TODO.txt           # Plays the playlist specified in /playlist
random=1                    # 0 = play in order, 1 = play randomly

# Wi-Fi & Bluetooth
wifi_enabled=1              # 0 = Wi-Fi disabled, 1 = Wi-Fi enabled (keep at 1)
wifi_ssid=mywifi            # Your Wi-Fi network name
wifi_password=mypassword    # Your Wi-Fi password
bluetooth_enabled=0         # 0 = Bluetooth disabled, 1 = Bluetooth enabled (keep at 0)
                            # Enable if you experience interference (e.g. 8Bitdo Pro 3 controller)
bluetooth_name=ESP32-GIF    # Bluetooth name

wifi_static_enabled=1       # 0 = DHCP, 1 = static IP (recommended)
wifi_static_ip=192.168.20.240   # Only if wifi_static_enabled=1
wifi_gateway=192.168.20.1       # Only if wifi_static_enabled=1
wifi_subnet=255.255.255.0       # Only if wifi_static_enabled=1
wifi_dns1=1.1.1.1               # Only if wifi_static_enabled=1
wifi_dns2=8.8.8.8               # Only if wifi_static_enabled=1

# MQTT
recalbox_ip=192.168.20.104  # Fixed IP address of your Recalbox
image_folder=logo_detoure   # Either: logo_detoure or marquee

2 - โ–ถ๏ธ Playlists

You can create your own playlists. The tool Generador de Playlists v1.0.1.bat (modified from RetroPixelLED) is located in the tools folder of this repository. It lists all folders found in the gifs directory. If you have folders like Arcade, BEST_OF_TOP_30, Pixel_Art, etc. containing GIFs, you can select which ones to include in your playlist (e.g. folders 1, 3 and 5). To include everything in a single playlist, enter TODO.


3 - ๐Ÿ› ๏ธ Tools

A script is available for you:

RetroBoxLED_toolkit.py

  • Extracts images from your media folders
  • Converts images to 128x32 format
  • Creates the system and game cache
  • Copies everything to the SD card

The best approach is to place this file in a dedicated folder to keep everything at hand. Simply follow the on-screen instructions and choose the desired options.

The best option for the panel is to perform a full scrape with Recalbox using the LOGO DETOURED or MARQUEE image type, which are ideal for the LED panel, as shown in the screenshot below.

Scrapping_Recalbox

Once the script is done, you will find an sd_card folder. Copy its contents to your SD card or keep it as a backup.

You can download system PNGs from the script or use your own. A system named _defaults is also included. If you place a _default.gif or _default.png file there, it will be used as the default when no system image is found, and also at boot. By default, GIFs take priority over PNGs.


4 - โšก Flash

Before you begin, make sure your PC recognises your ESP32.

๐Ÿ’ก ESP32 not detected?

If "Install" cannot find the COM port:

USB Chip Drivers
CP2102 Silicon Labs
CH340/CH341 SparkFun

Installation steps:

  1. Use a compatible browser (Google Chrome or Microsoft Edge).
  2. Connect your ESP32 to the USB port of your computer.
  3. Click the "Install" button and select the corresponding COM port.
  4. Important: Check the "Erase device" box to perform a full memory wipe and avoid fragmentation errors.

5 - ๐Ÿง  MQTT โ€” The brain of RetroBoxLED

MQTT tells the ESP32 what to display.

Recalbox โ†’ "Launching MAME" โ†’ MQTT โ†’ ESP32 โ†’ "Display MAME GIF or PNG!"

  • Synchronisation : The LED panel displays exactly the game being played
  • Local network : 192.168.XXX.XXX (arcade Wi-Fi)

Example:

1. You launch King of Fighters (mame/kof98)
2. The marquee[rungame,...](permanent).sh script detects the event โ†’ sends "mame/kof98" via MQTT
3. ESP32 receives it โ†’ displays /systems/mame/kof98.gif
4. GIF not found? โ†’ displays /systems/_defaults/_default.gif

The file marquee[rungame,endgame,systembrowsing,gamelistbrowsing,sleep,wakeup,stop,start](permanent).sh must be placed in /recalbox/share/userscripts/ on your Recalbox.


6 - >_ Telnet

The firmware includes a Telnet terminal for testing the ESP32. Type help to display the list of available commands. You can send commands to change the displayed GIFs, etc. This feature will be removed later once the code is stable, to free up space on the ESP32.


๐Ÿ“š Required Libraries

To compile the project from the Arduino IDE, install the following libraries via the Library Manager or from their official repositories:


๐Ÿ›’ Bill of Materials

To ensure compatibility, using the components tested during development is recommended:


๐Ÿค Credits


โ˜ ๏ธ Fallen in battle

  • An old 1GB SD card used for testing
  • 1 ESP32
  • 1 64x32 LED panel

โ˜• Support the project

If this project helped you, you can buy me a coffee:

๐Ÿ‘‰ โ˜• Donate via PayPal


RetroBoxLED = Recalbox + Pixel LED perfection! ๐Ÿ˜Ž

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors