How limitlabs/fw-glyph works
Glyph is controller firmware that scans physical controls, applies configurable game-specific mappings, and exposes controller reports over USB or console protocols. The tree also shows configuration/display, persistence, and RGB features. Sampled code confirms the input-state transformation and display-control behavior; the top-level runtime loop and several backend integrations were not sampled, so their wiring is represented only where the tree or code supports it.
Main entry points: state.hpp Input State · ControllerMode.cpp Controller Mode · backend_init.cpp Backend Dispatch · glyph_overrides.hpp Glyph Defaults
Components 20
Input Hardware
- Switch Matrix
include/input/SwitchMatrixInput.hpp - GPIO Input
src/input/GpioButtonInput.cpp - GameCube Input
HAL/pico/src/input/GamecubeControllerInput.cpp
Mode Processing
- Input State
include/core/state.hpp - Mode Selection
src/core/mode_selection.cpp - Controller Mode
src/core/ControllerMode.cpp - Custom Mapping
src/modes/CustomControllerMode.cpp - SOCD Rules
src/core/socd.cpp - Game Modes
src/modes
Controller Outputs
- Backend Dispatch
HAL/pico/src/comms/backend_init.cpp - USB HID
HAL/pico/src/comms/DInputBackend.cpp - Console Protocols
HAL/pico/src/comms
Configuration Device
- Glyph Defaults
config/glyph/common/include/glyph_overrides.hpp - Config Persistence
HAL/pico/src/core/Persistence.cpp - Integrated Display
src/comms/IntegratedDisplay.cpp - Display Menus
HAL/pico/src/display - RGB Lighting
config/glyph/common/src/LEDTemplates.cpp
Other components
- Player Controls
- Game Host
- Configurator
Connections 19
- Player Controls → Switch Matrix: presses
- Switch Matrix → Input State: sets buttons
- Player Controls → GPIO Input: presses
- GPIO Input → Input State: scans buttons
- Player Controls → GameCube Input: uses controller
- GameCube Input → Input State: updates stick
- Input State → Controller Mode: provides inputs
- Controller Mode → SOCD Rules: resolves directions
- Controller Mode → Custom Mapping: custom mode
- Mode Selection → Game Modes: selects mode
- Glyph Defaults → Mode Selection: defines modes
- Glyph Defaults → RGB Lighting: defines colors
- Configurator → Backend Dispatch: configures device
- Backend Dispatch → USB HID: initializes
- Backend Dispatch → Console Protocols: initializes
- USB HID → Game Host: sends reports
- Console Protocols → Game Host: sends reports
- Integrated Display → Display Menus: updates display
- Display Menus → Config Persistence: stores settings