-
Notifications
You must be signed in to change notification settings - Fork 0
Add Retroid platform #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Retroid platform #110
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
- 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 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.