Add Retroid platform#110
Merged
Merged
Conversation
Supports Retroid Pocket 5, Pocket Mini V2, and Pocket Flip 2 running LessOS (Snapdragon 865/SM8250). Platform features: - Multi-device variant detection via LESSOS_DEVICE - Dynamic input device discovery by name - AMOLED brightness curves - 1080p/1240p HDMI support - Overscan enabled for Mini V2 (near-square display)
- Fix button mapping to Nintendo layout (swap A/B and X/Y) - Fix brightness control path (panel0-backlight → ae94000.dsi.0) - Fix screen blanking during fake standby - Disable analog stick RGB LEDs on startup - Add logging to msettings via LOG_* macros - Increase keymon input device monitoring (event0-3 → event0-7) - Fix analog axis overflow with clamping - Remove dead L3/R3 button mappings
Use SDL_Renderer instead of SDL_GetWindowSurface which doesn't work with OpenGL ES. Get display mode before window creation and use SDL_WINDOW_FULLSCREEN_DESKTOP for proper fullscreen rendering. Adds rotation detection for portrait panels. Unifies implementation across retroid, rgb30, tg5040, and rg35xxplus
Replace hardcoded /dev/input/event* paths with dynamic device enumeration using libudev. Devices are discovered at runtime via udev properties (ID_INPUT_JOYSTICK for joysticks, input subsystem for all inputs). Fixes #109
- Rename SwanStation core from SWAN to SWST to avoid WonderSwan confusion - Remove backup files (keymon.c.bak, platform.c.bak) - Add missing trailing newlines to Makefiles
There was a problem hiding this comment.
Pull request overview
This PR adds support for Retroid Pocket devices (Pocket 5, Pocket Flip 2, Pocket Mini V1/V2) running LessOS on Qualcomm Snapdragon 865 (SM8250) hardware. The implementation includes comprehensive platform support with device variant detection, HDMI output, haptic feedback, and dynamic input device discovery via libudev.
Key changes include:
- Complete Retroid platform implementation with support for 4 device variants (FHD 1920x1080, Mini V1 1280x960, Mini V2 1240x1080)
- New libudev-based input device discovery system for robust event device enumeration
- Refactored show.c boot splash utilities across multiple platforms to use SDL_Renderer for GLES compatibility
- SwanStation PlayStation emulator core support for ARM64 platforms
Reviewed changes
Copilot reviewed 66 out of 71 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| workspace/retroid/platform/platform.{h,c} | Complete platform implementation with variant detection, SDL2 rendering, input handling, and power management for SM8250 hardware |
| workspace/retroid/libmsettings/ | Settings library for brightness, volume, HDMI detection using DSI panel backlight and ALSA |
| workspace/retroid/show/show.c | Boot splash display using SDL_Renderer with rotation support |
| workspace/retroid/install/boot.sh | LessOS boot script with atomic update handling and CPU governor configuration |
| workspace/retroid/README.md | Comprehensive platform documentation including device specs, input mappings, and LessOS references |
| workspace/all/common/udev_input.{h,c} | New libudev-based input device discovery utility for dynamic event device enumeration |
| workspace/all/utils/keymon/keymon.c | Added libudev support for platforms with KEYMON_USE_LIBUDEV flag |
| workspace/all/{launcher,player}/Makefile | Build system integration for libudev on supporting platforms |
| workspace/rgb30/platform/platform.{h,c} | Migrated RGB30 from hardcoded event paths to libudev discovery |
| workspace/{tg5040,rgb30,rg35xxplus}/show/show.c | Refactored to use SDL_Renderer for GLES hardware acceleration compatibility |
| workspace/all/paks/config/platforms.json | Platform registration with LessOS configuration |
| workspace/all/paks/Emus/cores.json | Added SwanStation core for ARM64 PlayStation emulation |
| workspace/all/paks/Emus/configs/retroid/ | Device-specific scaling configurations for optimal display on each variant |
| toolchains.json | Toolchain mapping (temporarily using rk3566) |
| skeleton/SYSTEM/retroid/ | System skeleton files including shutdown script and default settings |
| skeleton/BOOT/common/updater | Boot detection logic for Retroid devices |
| scripts/generate-scaling-configs.py | Added Retroid variants to automatic scaling config generation |
| README.md | Updated supported devices list with Retroid Pocket family |
| Makefile | Added retroid to default platforms build list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update toolchains.json to use sm8250 instead of rk3566 - Update Makefile.env with cortex-a76.cortex-a55 tuning (closest to A77.A55) - Remove trailing empty line from system.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Retroid Pocket devices (Pocket 5, Pocket Flip 2, Pocket Mini V1/V2) running LessOS on Qualcomm Snapdragon 865 (SM8250) hardware. The implementation includes comprehensive platform support with device variant detection, HDMI output, haptic feedback, and dynamic input device discovery via libudev.