How dtammam/arcade_station works
Project type and purpose
• Arcade Station is a cross-platform (Windows, Linux, macOS) desktop application—a game front-end with an installation wizard, runtime service, and embedded third-party front-end (Pegasus FE).
• Purpose: let non-technical users install, configure, and launch arcade games in a kiosk-style environment.
File structure to extract main blocks
Top-level directories:
• install/ – Python-based installation wizard (UI pages, logic, resources)
• src/arcade_station/ – Core runtime code (common functions, platform adapters, game launchers, listeners)
• src/pegasus-fe/ – Third-party front-end application (executables, QML themes, config files)
• bin/ – OS-specific binaries & helper scripts (AudioSwitch, LightsTest, mame2lit, shell scripts)
• config/ – TOML-based configuration files for defaults and game definitions
README for additional insights
• Features: installer wizard, game configuration, kiosk mode
• Architecture not explicitly drawn, but README calls out cross-platform core, installer UI, platform scripts, and Pegasus FE integration
a. Main components:
1) Installer Subsystem
– UI layer (Python install/installer/ui/app.py + pages)
– Installation logic (install/installer/config/installation.py)
– Resource templates (e.g., audioswitch_settings, arcade_station_start scripts)
2) Runtime Core
– Core services (src/arcade_station/core/common)
– Platform adapters (linux, macos, windows subfolders)
3) Pegasus FE
– Executable per platform (pegasus-fe_linux, pegasus-fe_mac, pegasus-fe_windows.exe)
– QML theme files and settings (src/pegasus-fe/themes + config)
4) Launchers & Listeners
– Game launchers (launch_game.py, launch_script.py)
– Key listener (key_listener.py)
– ITGmania monitor (monitor_itgmania.py)
5) Configuration & Assets
– config/*.toml files
– assets/images, assets/sounds
6) External Utilities & Binaries
– AudioSwitch, LightsTest, MAME helper (bin/windows & bin/unix)
– Shell scripts for kiosk mode and startup
b. Relationships and data flows:
• Installation flow:
User → Installer UI → Installation Logic → writes config files + copies assets + installs helper scripts
• Runtime flow:
Launcher (launch_arcade_station.bat / .sh) → Python Core startup →
– Reads config/*.toml
– Spawns Pegasus FE process with appropriate settings
– Initializes key listener → reacts to input → calls core common functions
– On game select: Core calls Launcher modules → spawns game binary or script
– Optional: Core utilities control AudioSwitch, LightsTest, iCloud, VPN
– For ITGmania: Core monitors scores/outputs via monitor_itgmania
• Platform abstraction: Core common functions delegate to platform folders (windows, linux, macos)
c. Architectural patterns and principles:
– Layered architecture: Installer vs. Runtime vs. External
– Modular design: “common” services + “platform” plugins
– Separation of concerns: UI (Pegasus + Installer) ←→ Application logic (Python Core) ←→ Data (Config/Assets) ←→ OS/binaries
d. Key technologies:
– Python 3.12.9 (core, installer, launchers, listeners)
– QML (Pegasus FE themes and UI)
– TOML (configuration)
– Platform scripts: PowerShell, Bash, Batch files
– Third-party executables: Pegasus-FE, AudioSwitch, MAME