Skip to content

Latest commit

ย 

History

602 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‡ฌ๐Ÿ‡ง English | ๐Ÿ‡ซ๐Ÿ‡ท Franรงais | ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol

ArcadeMatrix RPi ๐Ÿ“๐Ÿ‘พ

Telegram Community Ko-fi Visual Changelog Fleet Dashboard

๐Ÿ’ฌ Telegram Community: https://t.me/+DrSdAO8UMUViNmE0
๐Ÿ“บ Video Demo / Prรฉsentation : https://youtu.be/vAK880Io8yo?si=KSieTymlE7fLyZQs
๐Ÿ“ฐ Visual Changelog & ๐Ÿ“Š Public Fleet Dashboard: https://red77290.github.io/ArcadeMatrix_RPI/

The original Rust implementation of the ArcadeMatrix project, specifically designed to run on a Raspberry Pi connected to an RGB LED Matrix (HUB75) via the Adafruit HAT or Joy-IT hardware.

Developed in parallel with the ESP32 C++ version, this implementation leverages the power of the Raspberry Pi to deliver a high-performance multi-threaded graphics pipeline.

๐Ÿ“š Developer docs: Getting Started (dev workspace) ยท Developer Guide ยท Architecture ยท Quickstart (end users) ยท PC/manual tools


๐Ÿ’พ Quickstart: Pre-compiled Image (Recommended)

We provide pre-compiled, fully automated .img files, built and published automatically on every release.

Architecture / Bundle Recommended For Compatible With Download
64-bit (aarch64) Raspberry Pi 3, 4, 5, Zero 2 W Pi 3, 4, 5, Zero 2 W โฌ‡๏ธ Download 64-bit Image
32-bit (armhf) Raspberry Pi 1, 2, Zero (Original) All Raspberry Pi models โฌ‡๏ธ Download 32-bit Image
Companion Tools (ArcadeMatrix-tools.zip) PC / Mac / Console Tools (no source repo needed) Recalbox / Batocera / RetroPie sync, MUGEN extractor & Home Assistant โฌ‡๏ธ Download Companion Tools

Important

Required MicroSD Card: true 16 GB minimum (>= 15.1 GB) โ€” 32 GB strongly recommended. The full image is 15.03 GB (bootfs + Linux OS + ~6 GB exFAT DATA partition for your GIFs, MUGEN sprites, and fonts). Never use an 8 GB card or an undersized "16 GB" card (< 15.03 GB), or verification will fail at the end and the DATA partition will be truncated. See the full release list for older versions.

  1. Flash the image to your MicroSD card:
    • Direct flash without decompressing (recommended): use Raspberry Pi Imager (Operating System โ†’ Use custom, select the .img.xz file directly, and make sure to click "No" when asked to apply OS customisation settings) or Balena Etcher, both of which natively stream .img.xz archives.
    • If your flashing tool requires a raw .img file (e.g. Rufus or Win32DiskImager โ€” note that Pi Imager / Etcher are still preferred because Win32DiskImager does not refresh Windows partition tables after writing): extract the .img.xz only with 7-Zip (Windows), Keka (macOS), or xz -d (Linux) with at least 16 GB of free disk space (avoid Windows 11's built-in extractor and WinRAR, which can truncate .xz archives over 4 GB).
  2. Open the DATA USB drive: physically unplug and reinsert the SD card into your PC/Mac (if Windows prompts you to format a drive, click Cancel โ€” that is the Linux partition). A USB drive named DATA will appear.
    • ๐Ÿ’ก On Windows, if only bootfs appears (DATA missing in File Explorer): Windows sometimes skips assigning a drive letter to the 3rd partition. Right-click the Start button โ†’ Disk Management (diskmgmt.msc), right-click the DATA (exFAT) block โ†’ Change Drive Letter and Paths... โ†’ Add... โ†’ Pick a letter (e.g. E:) โ†’ OK (use a USB MicroSD adapter if an older built-in laptop SD slot grays out that option).
  3. Open config.json on the DATA drive to configure your Matrix size and Wi-Fi credentials ("ssid" and "password"), and drop your media into gifs/, fighters_32/, fighters_64/, or fonts/ as needed.
  4. Plug the SD card into your Raspberry Pi and power it on.
  5. The Matrix will immediately turn on and display the IP address for 5 seconds. Use this IP (http://<IP>:8080) to access the Web UI!

๐Ÿ•น๏ธ Built-in Engines & Hardware Simulations

Every engine in ArcadeMatrix RPi is engineered in pure, multi-threaded Rust with zero allocation on the display render cycle, guaranteeing a rock-solid 60 FPS refresh rate. Below are hardware-accurate simulations of each engine running on physical HUB75 displays:

Engine / ID Hardware Simulation Description & Key Features
Desk Master Dashboard
dashboard
Dashboard Engine Complete horizontal desk deck with handcrafted analog watch dial, smooth sweeping second hand, world clocks, live OpenWeatherMap weather, and live Binance cryptos & Yahoo Finance stocks ticker.
Retro Game Clock
clock
Retro Clock

๐Ÿ‘‰ View 10+ Retro Clocks Showcase โž”
Signature animated retro arcade and console clocks (Metal Slug, Castlevania, Mario, Mega Man, Sonic, Pokรฉdex, Pac-Man, Tetris, World Clock, Matrix Rain...) with 100% bit-perfect sprites.
M.U.G.E.N Arcade Fighters
fighter (Transverse Overlay)
Fighter Engine Transverse overlay renderer (system.idle_fighter_enabled, not a standalone rotation engine ID) bringing authentic retro fighting game sprites (Street Fighter, King of Fighters, etc.) with real-time healthbars, custom stages, and autonomous CPU battles over clocks and dates.
Spotify Now Playing
spotify
Spotify Engine Real-time track display with full-color album artwork, scrolling artist/title, animated mini equalizer bars, and track progress.
Google Cast & Nest
google_cast
Google Cast Engine Automatic mDNS discovery of Google Home / Nest Audio devices with live streaming media artwork, volume, and playback progress.
Crypto Ticker & Chart
crypto
Crypto Engine Live Binance / CoinGecko prices, 24h change badge, and real-time historical sparkline charts with smart TTL caching.
Stock Market Ticker
stock
Stock Engine Real-time quotes from Yahoo Finance, 1D % badges, and intraday sparkline area charts for NASDAQ/S&P stocks and ETFs.
Weather Forecast
weather
Weather Engine Live outdoor conditions, high/low temperatures, humidity, wind, and animated retro icons via OpenWeatherMap & Open-Meteo.
System Telemetry HUD
system_info
SysInfo Engine Real-time dual-column monitor of Raspberry Pi CPU usage (%), RAM (%), SoC hardware temperature (ยฐC/ยฐF), and system Uptime with vibrant gauge bars.
Live News Ticker
gnews
GNews Engine Real-time breaking headlines with topic pills ([TECH], [WORLD], [BIZ]), live pulsing red beacon, and smooth sub-pixel scrolling ticker.
Home Assistant & MQTT
mqttdata
MQTT Data Engine Stream Home Assistant dashboards, sensor values, 24h historical charts, and local weather via MQTT with ready-to-use blueprints.
Animated GIF Player
gifs
GIF Engine Smooth 60 FPS playback of retro animations, folders, and network playlists with zero-copy row span presentation.
Scrolling Text Banner
message
Message Engine Customizable dot-matrix marquee signs with glowing amber typography, multiple scroll directions, and REST API triggers.
Arcade Cabinet Marquee
marquee
Marquee Engine Displays official illuminated arcade marquees via Pixelcade integration for Batocera, Recalbox, and RetroPie gaming setups.
Retro Games Showcase
retro_games
Retro Games Showcase Engine Streams authentic retro console & arcade box art, metadata badges, localized synopses, and 30 FPS RGB565 gameplay videos.
โœจ Powered by the dmd_media_showcase companion app on your LAN (.exe Windows / .dmg macOS / Linux / Docker โ€” 0 config, launch & run).
Movie Showcase
movie_showcase
Movie Showcase Engine Cinema poster & trailer showcase streaming TMDB/TVDB movie posters, ratings, localized synopses, and 30 FPS RGB565 trailers.
โœจ Powered by the dmd_media_showcase companion app on your LAN (.exe Windows / .dmg macOS / Linux / Docker โ€” 0 config, launch & run).
Series Showcase
series_showcase
Series Showcase Engine TV series showcase displaying show posters, release year, star ratings, localized synopses, and 30 FPS RGB565 trailer streams.
โœจ Powered by the dmd_media_showcase companion app on your LAN (.exe Windows / .dmg macOS / Linux / Docker โ€” 0 config, launch & run).
Anime Showcase
anime_showcase
Anime Showcase Engine Anime & manga showcase powered by AniList/Jikan/Kitsu metadata with cover art, localized synopses, and 30 FPS RGB565 video previews.
โœจ Powered by the dmd_media_showcase companion app on your LAN (.exe Windows / .dmg macOS / Linux / Docker โ€” 0 config, launch & run).
Calendar & Date
date
Date Engine Large arcade-styled date with 3D Capcom/Nintendo drop shadows, multi-language support (EN, FR, ES), and NTP synchronization.
Smart Agenda (iCal / .ics)
agenda
Agenda Engine Dual-calendar RFC 5545 .ics / webcal:// synchronization (Google, Apple iCloud, Outlook, Nextcloud) with persistent SD binary cache (agenda_<id>.bin), contextual arcade pixel-art icons, imminent countdown alerts, and sleeping Metool FREE PLAY chill mode.
High Scores & RetroAchievements
sync_celebration
Sync Celebration Engine Live arcade Hall of Fame high score podiums, RPG-style RetroAchievements XP bars, and preemptive 60 FPS Q8.8 fireworks + system-matched hero celebrations (Priority 55) when unlocking achievements or beating a Top 3 arcade record on Recalbox, Batocera, or RetroPie.

Note

Hardware Rendering Notice: The engine preview displays and clock showcase posters shown in this documentation are high-fidelity software simulations designed to illustrate visual layouts, animations, and telemetry widgets. Actual hardware rendering on a physical HUB75 LED matrix panel may differ depending on LED pitch, optical acrylic diffusion, viewing distance, and ambient brightness.

๐ŸŒŸ Core Architecture Highlights (RPi Exclusives & ESP32 Alignment)

  • ๐ŸŽฏ Canonical Display Arbiter & Preemption Engine: Bounded $O(1)$ zero-allocation decision pipeline with multi-source priority arbitration (Rotation 10 $\to$ GIF 20 $\to$ Marquee 30 $\to$ MQTT 40 $\to$ InGameShowcase 45 $\to$ SyncCelebration 55), PreemptionStack<4>, exact intent matching, and resilient orphan cleanup.
  • ๐Ÿงญ Dynamic Orientation & Tate Mode (OrientationManager): Multi-angle manual and responsive rotation (0ยฐ, 90ยฐ, 180ยฐ, 270ยฐ) with automatic layout classification (LayoutClass) and reactive versioning.
  • ๐Ÿ›ก๏ธ Transparent Runtime Memory Governance (core::memory): Modeled on the ESP32 lifecycle philosophy and tailored for Raspberry Pi's 1 GB RAM โ€” automatic glibc arena tuning (M_ARENA_MAX = 2 + malloc_trim), shared HTTP connection pools on EngineContext, post-deactivate() retention auditing (> 15 MB triggers automatic Drop instance recycling), and a two-tier RSS watchdog (200 MB dormant eviction / 260 MB active recycle) so memory stays bounded regardless of individual engine implementations.
  • ๐Ÿ”„ Over-The-Air (OTA) Firmware Update: Update the single standalone Rust binary directly from the Web UI without re-flashing your SD Card image! (Failsafe Recovery: If an OTA update ever breaks your system, plug your SD card into a PC and drop a valid firmware named arcadematrix_recovery.bin at the root of either the bootfs partition or the DATA partition. It will automatically install on the next boot!)
  • ๐Ÿš€ Rust Native Multi-Threaded Engine: High-performance multi-threaded engine using Actix-web and image processing in pure compiled Rust with 0% idle CPU overhead.
  • โšก Zero-Copy DirtyBounds Canvas Pipeline (canvas_single): Single off-screen canvas with zero-copy row span presentation and DirtyBounds dirty line tracking. On static clock frames and slow-moving animations, present() immediately detects clean state and never touches the Broadcom memory bus or DMA engine, completely eliminating SDIO Wi-Fi drops!
  • ๐Ÿ—‚๏ธ Network GIF Library & Web File Manager (/api/gifs/*): Complete network management of GIF playlists directly from the Web UI! Browse playlist folders, upload animated GIFs over Wi-Fi/Ethernet, create/delete folders, rename items, and trigger automatic background library re-indexing. Native dual-orientation support (?orientation=yoko|tate) for both Horizontal (Yoko) and Vertical (Tate) display layouts โ€” implemented by @TooncesToo!
  • ๐Ÿ”ค Dynamically Loadable Fonts (.ttf): Drop any .ttf or .otf font directly into the fonts/ folder, and the Web UI will automatically list it for use on the Clock or Date.
  • ๐ŸŒง๏ธ True Matrix Digital Rain (Katakana): A completely custom, buttery smooth, genuine Matrix digital rain effect (DotGothic16) with falling half-width Katakana and "unlit LED" negative space text punching through the rain.

๐ŸŽจ Signature Themed Clocks Collection

ArcadeMatrix RPi includes a signature collection of handcrafted, hardware-synchronized retro arcade and console clocks rendered with 100% bit-perfect original sprites in full 60 FPS, with full multi-resolution support for Landscape (64x64, 128x32, 256x64) and Portrait / Tate modes (32x64, 64x128, 64x256):

1. Metal Slug: Super Vehicle-001 (SNK Neo Geo) โ€” Theme 41

Authentic SNK Neo Geo pixel art with Arabian desert bazaar backdrop, Marco Rossi combat animations, Rebel Di-Cokka tank, patrol helicopter, and heavy machine gun firefights. Metal Slug Clock

2. Castlevania (Konami NES) โ€” Theme 31

Gothic clock tower Belfry with Simon Belmont climbing the grand stone staircase toward Dracula's chamber, authentic pedestal torch, flapping vampire bat across the blood moon, and high-legibility ivory digits. Castlevania Clock

3. Super Mario Bros (NES) โ€” Theme 30

Mushroom Kingdom Overworld with 100% authentic SMB1 brick blocks; Mario runs across the screen and jumps under the digit block to trigger an elastic bounce and digit flip (with green Koopa shell kick and gold coin pop in 128x32 compact mode, and vertical 3-tier climb in portrait mode). Super Mario Bros Clock

4. Mega Man (Capcom NES) โ€” Theme 35

Capcom Wily Castle fortress with separated technical platforms, life gauge, sleeping Metool, and Mega Man firing his Buster shot at the minute pod. Mega Man Clock

5. Sonic The Hedgehog (Sega Genesis) โ€” Theme 39

Green Hill Zone checkered platforms, spinning gold rings, red spring, Motobug badnik, and Sonic idle/spin-dash jumping animations. Sonic The Hedgehog Clock

6. Pokรฉmon Pokรฉdex (Nintendo Game Boy) โ€” Theme 32

Authentic dual-screen Pokรฉdex (Pocket Index) interface with creature inspection viewport, animated Pikachu sprite, PKMN font digital clock, live seconds telemetry bar, and blinking LED status sensor. Pokรฉdex Clock

7. Pac-Man Arcade (Namco 1980) โ€” Theme 26

Original Namco arcade maze with blue neon corridors, energizers, dots, animated Pac-Man, and 4 chasing ghosts (Blinky, Pinky, Inky, Clyde). Pac-Man Clock

8. Russian Tetris (Alexey Pajitnov / Game Boy) โ€” Theme 23

Legendary falling block puzzle with dynamic 3D-beveled mino bricks (I, J, L, O, S, T, Z) cascading down to assemble the hours and minutes in real-time. Tetris Clock

9. World Clock & Solar Terminator โ€” Theme 33

High-resolution continental world map with dynamic day/night solar terminator calculating real-time solar declination, local meridian marker, and dual UTC/local time. World Map Clock

10. True Matrix Rain (The Wachowskis 1999) โ€” Theme 21

Iconic digital rain with phosphor green glyph cascades, randomized drop speeds, blazing white lead heads, fading persistence trails, and glowing neon clock digits. Matrix Rain Clock


๐Ÿš€ Hardware Requirements & Compatibility

Thanks to the native Rust implementation (~5 MB binary, bounded ~80โ€“150 MB RSS runtime footprint with automatic 200/260 MB watchdog recycling, and 0% idle CPU overhead), ArcadeMatrix fully supports Raspberry Pi hardware without stutter or dropped frames:

  1. Raspberry Pi:
    • Legacy / Single-Core: Pi 1 (B, B+, A+), Pi Zero, Pi Zero W (Fully supported with zero lag thanks to Rust!)
    • Multi-Core: Pi 2, Pi 3, Pi 4, Pi Zero 2 W (Recommended)
    • (โš ๏ธ Pi 5 Warning: The hzeller rgb-led-matrix library does NOT support the Pi 5 natively via GPIO due to the new RP1 chip. You must use an active adapter board for Pi 5!).
  2. RGB LED Matrix: HUB75 panels (e.g., 64x64, 128x32, 256x64).
  3. Adafruit RGB Matrix HAT (or Joy-IT, or custom wiring).
  4. MicroSD Card (16GB or larger recommended for the Pre-compiled Image).

๐Ÿ› ๏ธ Advanced Installation

Option 2: Manual Installation

If you prefer to install it manually on a fresh Raspberry Pi OS Lite (64-bit): Once logged into your Raspberry Pi via SSH:

curl -sSL https://raw.githubusercontent.com/red77290/ArcadeMatrix_RPI/main/autoInstall.sh | bash

(If the repository is private, you will need to git clone manually first and run ./autoInstall.sh from inside the folder).

The script will automatically:

  1. Install Rust, Actix-web, image-rs, and build-essential.
  2. Download and compile the hzeller/rpi-rgb-led-matrix driver.
  3. Setup systemd to automatically start ArcadeMatrix on boot.

Option 3: Smart Deploy via Computer

If you want to compile the application on your own computer (much faster) and automatically deploy it to the Raspberry Pi, you can use the smart Docker-based deployment scripts.

On macOS / Linux:

bash scripts/deploy.sh --ip <PI_IP> --user <PI_USER> --pass <PI_PASS>
# Example: bash scripts/deploy.sh --ip 192.168.1.177 --user pi --pass raspberry

On Windows (PowerShell):

.\scripts\deploy.ps1 -Ip "192.168.1.177" -User "pi" -Pass "raspberry"

The script will auto-detect your Pi's architecture, compile the binary via Docker, stop the remote service, upload the file, and restart the application.


โš ๏ธ Hardware Warning: Wi-Fi & Interference (VHS Lines)

Raspberry Pis (especially Pi 3 and Zero W) share their internal Wi-Fi bus clock with the PWM/PCM hardware controller used by the LED matrix.

When driving large matrices (like 256x64), the DMA controller must push massive amounts of data to the GPIO pins. If hardware pulsing is enabled (disable_hardware_pulsing = false), this creates intense DMA bandwidth saturation that starves the internal SDIO Wi-Fi chip, causing severe packet loss, lag, and disconnections.

While an unstable Wi-Fi might be acceptable if you only use the Web UI occasionally to change the clock, it completely breaks features that rely on a stable internet connection or local network:

  • Recalbox/Batocera/Pixelcade MQTT Sync: Will drop messages or disconnect.
  • Crypto & Stock Tickers: API calls will timeout and fail.
  • Weather: API calls will timeout.

Solutions & Render Pipeline Selection:

ArcadeMatrix RPi now features canonical IDrawingSurface abstraction with a configurable Render Pipeline selector in the Web UI (#sys-tab-hardware):

  1. canvas_single (Recommended / Default in auto): Single off-screen canvas with zero-copy row span presentation and DirtyBounds dirty line tracking. On static clock frames and slow-moving animations, present() immediately detects clean state and never touches the Broadcom memory bus or DMA engine. This completely prevents SDIO Wi-Fi drops and buffer starvation on Raspberry Pi!
  2. canvas_double: Double-buffered off-screen canvas for maximum tear-free smoothness when Wi-Fi contention is not an issue (e.g. Ethernet / USB Wi-Fi).
  3. direct_double: Direct hardware double-buffering via rpi-rgb-led-matrix C FFI.
  4. direct_single: Direct hardware single frame-buffer.
  5. Use an Ethernet (RJ45) cable (Pi 3B/4): Bypasses the SDIO Wi-Fi chip entirely.
  6. Use a USB Wi-Fi Dongle: USB controllers use a different internal bus and are immune to the PWM DMA starvation.
  7. Set disable_hardware_pulsing = true: Forces the matrix to use CPU bit-banging instead of hardware DMA. Your Wi-Fi will work perfectly, but you will see a slight "VHS lines" flickering effect on the matrix.

(Note: 128x32 matrices require 4x less DMA bandwidth, so they usually run perfectly fine with hardware pulsing enabled and internal Wi-Fi active).

(Note on Raspberry Pi 4: The Pi 4 uses a much faster PCIe architecture and DMA controller. It is highly likely that it is NOT impacted by this 256x64 Wi-Fi saturation bug. However, this has not been officially tested yet as we do not have a Pi 4 on hand to confirm.)

Raspberry Pi Matrix Compatibility Table

Matrix Size Render Pipeline Network / Pulse Configuration Image Quality Wi-Fi / API / MQTT
Any canvas_single (Default) Internal Wi-Fi + DMA Pulsing โœ… Perfect (No flicker) โœ… 100% Stable (Zero Drops)
128x32 Any Pipeline Internal Wi-Fi + disable_hardware_pulsing = false โœ… Perfect โœ… Stable
256x64 canvas_double / direct Ethernet (RJ45) + DMA Pulsing โœ… Perfect โœ… Stable
256x64 canvas_double / direct USB Wi-Fi Dongle + DMA Pulsing โœ… Perfect โœ… Stable
256x64 direct_single Internal Wi-Fi + disable_hardware_pulsing = true โš ๏ธ Slight Flicker โœ… Stable
256x64 direct_double Internal Wi-Fi + disable_hardware_pulsing = false โœ… Perfect โŒ Broken / Timeouts

๐ŸŽจ Media Management

The pre-compiled image features a dedicated DATA partition formatted as exFAT. This means you can plug your SD card directly into your Windows or Mac computer to drag-and-drop your files without needing SSH or FTP!

Sprites & GIFs

  • /fighters_32/ or /fighters_64/: Put your .fgt sprites here (See MUGEN Sprites section below).
  • /gifs/: Drop your .gif loops in folders inside here. The Web UI will automatically scan these folders and let you check the ones you want to play!

Fonts

  • /fonts/: Drop your .ttf, .otf, or .bdf files here. By default, the project ships with PressStart2P.ttf, VT323.ttf, and DotGothic16.ttf.

๐Ÿ•ธ๏ธ Web UI

Navigate to http://<YOUR_PI_IP>:8080/ to access the Control Panel.

The interface is aligned with the ESP32 version, offering Dashboard controls, Playlist selection, Clock configuration, Showcase Server settings, and MQTT settings, with added controls for Gradients and Unlimited Sizes.


๐ŸŽฌ Turnkey Media Discovery โ€” Zero Config (dmd_media_showcase)

The 4 Showcase engines (retro_games, movie_showcase, series_showcase, anime_showcase) pair with the dmd_media_showcase companion application running on a machine on your local network (Windows PC, Mac, Linux, NAS, Docker, or another Raspberry Pi) to stream zero-repetition RGB565 posters, panoramas, localized synopses (en, fr, es, de, it), and 30 FPS videos with zero files to prepare:

  1. 0 config โ€” launch the executable and it runs: download the latest release and run dmd-media-showcase.exe (Windows .zip), DMD Media Showcase.app (macOS .dmg), ./start_showcase.sh (Linux), or the Docker container. Encrypted API keys and tools are already bundled inside, and it automatically advertises itself as http://dmdmediashowcase.local:8890.
  2. Flip the toggle ON in your DMD: in the ArcadeMatrix Web UI Settings tab (MQTT & API -> ๐ŸŽฌ DMD Media Showcase), http://dmdmediashowcase.local:8890 is already pre-filled (showcase.enabled = false by default). Toggle Enable DMD Media Showcase ON, click Save Showcase Settings, and verify the ๐ŸŸข Communication OK (v3.0.0) badge.
  3. Enjoy & explore the built-in Web App whenever you want: add retro_games, movie_showcase, series_showcase, or anime_showcase to your rotation (display_duration_sec from 15 to 120 seconds, honored automatically so Poster + Synopsis + Video sequences never cut off prematurely). To customize visuals (Card Studio & live LED simulator, system/genre/decade tags, on-demand search, source priority) or check live monitoring, simply open the Web App at http://dmdmediashowcase.local:8890/.

๐Ÿ•น๏ธ Recalbox, Batocera & RetroPie Integration (Pixelcade Marquees + In-Game Showcase + High Scores & RetroAchievements)

ArcadeMatrix supports instant Pixelcade-style marquees while browsing menus, automatic In-Game Showcase presentations (Animated Info Card + Panoramas + Gameplay Video), Arcade High Scores (Hall of Fame), RetroAchievements (RA) progress cards, and 60 FPS Fireworks & Hero Celebrations (SyncCelebration, Priority 55) when you unlock an achievement or beat a Top 3 arcade record on your Recalbox, Batocera, or RetroPie console!

Important

Batocera version requirement: Dynamic marquee switching while browsing games and systems requires Batocera v33 or newer (Batocera introduced the EmulationStation game-selected and system-selected script hooks in v33). On Batocera v32 and earlier, only game launch and stop events (game-start, game-end) are supported. Recalbox is fully supported across all versions via its native state polling daemon.

โœจ How It Works in Practice

  1. Menu Browsing (0 ms Instant Marquee): As you browse your game lists, the Raspberry Pi downloads official Pixelcade marquees in the background, caches them on your SD card, and displays them instantly on your LED matrix.
  2. Launching a Game (Seamless In-Game Showcase):
    • The moment you launch a game, the classic marquee appears immediately (zero black screen or "Waiting for content" screen).
    • Offline In-Game Showcase (0 ms, Zero Server Needed): If you placed an Offline Recalbox/Batocera pack generated by dmd_media_showcase Tab #7 into data/showcase/<system>/<rom>.gif (data/showcase_tate/<system>/<rom>.gif in TATE), FrontendSync decodes and plays the 24-bit RGB888 .gif presentation locally with 0 network calls โ€” even without a running Showcase server!
    • Live Remote Fallback: Otherwise, if dmd_media_showcase is enabled on your network and In-Game Showcase is turned on, FrontendSync requests the game's presentation on a dedicated {dmd_id}_sync slot (sending both the ROM basename and console display title as fallback_query without disturbing Showcase rotation queues), prepares the Animated Info Card + Boxart/Marquee/Screenshot Panoramas + Gameplay Video in the background, and smoothly takes over the screen once ready.
    • Configurable Playback Cycle while playing:
      • Alternate Marquee & Showcase (default): Alternates between the Showcase presentation and a configurable pause on the classic marquee (e.g. 45s).
      • Play Once then Keep Marquee: Plays the Showcase presentation once, then leaves the game's marquee on screen.
      • Loop Showcase Continuously: Repeats the Showcase presentation while the game runs.
  3. Exiting a Game (0 ms Menu Return & Server Process Abort): Returning to the console menu immediately restores live menu marquees (0 ms) and automatically aborts any running server-side Showcase transcoding processes (1..N converter/ffmpeg workers per DMD via DELETE /api/v1/clients/{sync_id}/queue, with zero HTTP traffic during idle menu browsing).
  4. Automatic Shared MQTT Broker (Zero Re-install & Extra Free RAM):
    • Console sync scripts store only your DMD's IP address (DMD_HOST) and ask the DMD dynamically which MQTT broker to use.
    • When Share Showcase MQTT Broker is enabled and Showcase is reachable, ArcadeMatrix automatically uses Showcase's MQTT broker and stops its local mosquitto service to free system RAM โ€” falling back automatically to the local broker if Showcase is turned off. You never need to re-install the script on Recalbox/Batocera!
  5. Instant Replay Cache & 1-Click Cache Eviction:
    • Enabling Persistent On-Demand Conversion Cache in Showcase saves converted game presentations on disk by (System + Game + Resolution + Card Style) so relaunching a previously played game starts instantly.
    • Click ๐Ÿ—‘๏ธ Evict Showcase Cache directly inside System -> MQTT & API -> ๐ŸŽฎ FrontendSync whenever you want to clear cached conversions after changing card styles.

๐Ÿš€ Step-by-Step Activation Tutorial

1. One-Click Automatic Console Installation (Recommended)

Go to System -> MQTT & API -> ๐ŸŽฎ FrontendSync in the ArcadeMatrix Web UI, select your console OS (Auto-Detect, Recalbox, Batocera, or RetroPie), enter the console's IP and SSH credentials, and click Install Sync Script.

(Manual alternative โ€” download ArcadeMatrix-tools.zip without cloning the repo, see tools/README.md: run ArcadeMatrix-tools/install.sh / ArcadeMatrix-tools/install.ps1 from your PC/Mac, or copy ArcadeMatrix-tools/rpi_emulationstation_base_os_setup.sh to your console via scp and enter your ArcadeMatrix IP).

2. Enable In-Game Showcase & Customize Your Card

  1. In System -> MQTT & API -> ๐ŸŽฌ DMD Media Showcase, toggle Enable DMD Media Showcase ON and verify ๐ŸŸข Communication OK.
  2. In ๐ŸŽฎ FrontendSync, set Enable MQTT to Enabled, enable Share Showcase MQTT Broker (Free Local RAM) and In-Game Showcase (Card + Gameplay Video).
  3. Select your Playback Cycle (Alternate Marquee & Showcase, Play Once, or Loop) and Card Style Source:
    • Inherit DMD Profile from Showcase Studio: Uses the visual design configured in Showcase's Card Studio.
    • Custom Override on DMD: Configure Card Layout (Classic Split, Badge Header, Full Art, Minimal), Theme (Tinted, Neon Border, Poster Wash), Synopsis Scroll Speed, Panoramas, Gameplay Video duration/FPS/framing, and Color Boost directly on your DMD.
  4. Click Save MQTT Settings โ€” launch any game on your console and enjoy!

How does the Daemon architecture work?

Unlike native Recalbox scripts that run (and freeze the system) on every joystick movement, ArcadeMatrix installs an ultra-lightweight Python/Shell Daemon (arcadematrix_daemon.py) in the background.

  • Zero Lag: Consumes 0% CPU. EmulationStation suffers no stutter or lag, even when scrolling at max speed.
  • Anti-Spam (Debounce): If you scroll quickly through 50 games, the daemon won't flood the network. It only sends the message to the matrix if you pause on a game for more than 150 milliseconds.
  • Thread Safety: On the LED Matrix side, downloads and the drawing engine are separated by threads with robust locks, preventing freezing and image cache corruption.

๐Ÿ”ง Matrix Configuration

If you have a matrix larger than 64x64 or 128x32, or if you are using a non-Adafruit HAT, you may need to tweak the hzeller arguments in src/core/matrix.rs. By default, it's set to --led-gpio-mapping=adafruit-hat and 128x32.

You can also change Matrix brightness dynamically via the Web UI Settings.

  • Enable Standby/Night modes.

๐Ÿ“‚ Managing Media (GIFs and MUGEN Sprites)

Adding GIFs

Simply drop any standard .gif files into the gifs/ directory:

ArcadeMatrix_RPi/
โ””โ”€โ”€ gifs/
    โ”œโ”€โ”€ mario_run.gif
    โ”œโ”€โ”€ sonic_wait.gif
    โ””โ”€โ”€ ...

Adding MUGEN Sprites

To achieve perfect 60fps performance and exact "virtual ground" alignments across massive character rosters, the Fighter engine uses pre-processed .fgt files along with index.json / index.txt manifests.

๐Ÿ’ก Ready-to-Use Packs (No Python Required): Download โฌ‡๏ธ fighters_32_rpi.zip (64ร—32, 128ร—32 & vertical TATE) or โฌ‡๏ธ fighters_64_rpi.zip (128ร—64 & 256ร—64 HD) and extract directly to the root of your DATA partition (DATA:/fighters_32/ or DATA:/fighters_64/).

Want to convert your own MUGEN characters? (Do not drop raw images directly!) Download ArcadeMatrix-tools.zip (no need to download the full source code) and use mugen_extractor/mugen_extractor.py (also located in tools/mugen_extractor/ in the repository) to process your MUGEN characters.

The extractor will read MUGEN .sff and .air files, calculate the perfect bounding boxes to prevent animation jittering, and export optimized .fgt files directly into your fighters_32/ and fighters_64/ folders.

Please refer to tools/mugen_extractor/README.md for full instructions on how to add more MUGEN characters!


โš™๏ธ Advanced Configuration (config.json)

If you prefer to edit settings manually instead of using the Web UI, you can directly edit the config.json file located on the DATA partition of your SD Card. This is especially useful for setting up Wi-Fi before the first boot.

โ„น๏ธ ArcadeMatrix uses a single structured config.json (the legacy conf.ini format has been removed). The file is self-healing: any missing key is recreated with its default on boot, so a partial hand-edit is always safe.

{
  "matrix": { "width": 64, "height": 32, "chain_length": 1, "mapping": "adafruit-hat",
              "rgb_sequence": "RGB", "slowdown": 2, "disable_hardware_pulsing": false },
  "wifi":   { "ssid": "YourNetwork", "password": "YourPassword", "configured": false,
              "disable_internal": false },
  "mqtt":   { "enabled": false, "broker": "192.168.1.50", "port": 1883 },
  "showcase": { "server_url": "http://192.168.1.50:8080", "transport_mode": "mqtt_udp",
                "use_showcase_broker": true, "mqtt_broker_source": "global", "mqtt_custom_url": "" },
  "system": { "format_24h": true, "lang": "en", "night_mode_enabled": false,
              "turn_off_at": "23:00", "wake_up_at": "07:00", "night_brightness": 20 },
  "instances": [
    { "instance_id": "clock_main", "engine_id": "clock",
      "config": { "theme": "0", "font": "DotGothic16.ttf", "size": "16" } }
  ],
  "rotation": [ { "instance_id": "clock_main", "duration_sec": 30 } ],
  "api_auth_enabled": false,
  "api_token": ""
}

Key points:

  • matrix โ€” hardware driver (panel size, mapping, rgb_sequence, slowdown, disable_hardware_pulsing, ...). Editing it triggers an automatic restart.
  • wifi โ€” set configured: false to force a (re)connection attempt on the next boot (auto-set back to true on success). Use disable_internal: true with an external USB dongle.
  • mqtt โ€” Recalbox/Batocera marquee sync (see above).
  • showcase โ€” unified dmd_media_showcase server connection shared by retro_games, movie_showcase, series_showcase, and anime_showcase.
  • system โ€” timezone, language, 24h format, and the Night/Standby schedule (night_brightness: 0 fully turns the panel off).
  • instances / rotation โ€” each engine is a self-contained instance; rotation decides the display order and per-slot duration_sec. Editing an instance from the Web UI applies live, without a restart.
  • api_auth_enabled / api_token โ€” when enabled, sensitive endpoints require the X-API-Token header (see the API note below).

๐Ÿ‘‰ Full field-by-field reference: docs/CONFIGURATION.md.

๐Ÿ”’ API Authentication

api_auth_enabled is false by default so the bundled Web UI works out of the box. Set it to true (and copy the auto-generated api_token) to require the X-API-Token header on sensitive endpoints such as /api/wifi, /api/mqtt/install, /api/system/reboot, and /api/system/shutdown. Enable it whenever the device is reachable beyond a trusted LAN.

๐Ÿ™ Acknowledgments

A huge thanks to the open-source community and the creators of the incredible libraries that power this project:

  • rpi-rgb-led-matrix by hzeller (and the Rust bindings by AidanWallace)
  • Actix-web for the blazing fast web API
  • image-rs for image processing
  • rumqttc for MQTT support
  • @TooncesToo for implementing the network GIF library API, multi-file uploader, and Web UI file manager with dual-orientation support on both Raspberry Pi and ESP32.
  • And the entire Rust community for creating such an amazing ecosystem (Tokio, Serde, reqwest, tracing, etc.)!

Special thanks to the RPiTeam for the awesome pack of 600 GIFs!

โ˜• Support the Project

Ko-fi

If you enjoy this project and want to support its ongoing development, feel free to buy me a coffee on Ko-fi. It is completely voluntary, no strings attached, and nothing expected in return โ€” just a kind gesture that fuels motivation and testing on new hardware!

๐Ÿ“œ License

This project is licensed under the MIT License.

In short: you are free to use, modify, distribute, and sublicense this software for any purpose, personal or commercial, provided that the original copyright notice and permission notice are preserved. See the full LICENSE file for details.