Repository navigation
Native games: programs built for the console, started without an emulator - #14
Open
KurdtNervanna wants to merge 2 commits into
Open
KurdtNervanna wants to merge 2 commits into
KurdtNervanna wants to merge 2 commits into
Conversation
…ator The system "native" (Native games, roms/native): one launch script per game (.sh), run by /bin/sh in its own folder and its own process group (host_launch_native), with the display, sound and pads handed over as for a libretro game. HOME on /data (the root is read-only), SDL_VIDEODRIVER kmsdrm, SDL_AUDIODRIVER alsa, RSOS_GAME_DIR, RSOS_LANG; output to game.log. Select+Start held 1 s quits it (SIGTERM to the group, SIGKILL after HANG_KILL_MS); sleep stops the group and turns the backlight off; a power-off sends SIGTERM; the idle power-off waits while it runs (no save state); an error exit is shown. SDL2 (KMS/DRM, GLES2, ALSA) in the RetroStone2 configs. docs/native-games.md; check-frontend 2a-2c (the launch and environment, an error exit, the menu stopping: the group goes too). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-transfer: sysmap.c lists every system of systems.c. Its alias is "nativegames", not "ports": RetroPie's port scripts start RetroPie's own emulators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
An update on the open question in the description (holding Select + Start didn't end a native game). On the same RetroStone2 Pro, now on 0.1.5 (a fork build of 0.1.5 with this PR), holding Select + Start for a second did end a native game. It was a game that has no Select + Start quit of its own, so the menu's check was the only one that could have closed it. On 0.1.4 that line never appeared, and the same logs had buttons the kernel reported held for 30 s. So the earlier failure was most likely the lost button releases that 0.1.5 fixes (#10), not this PR's code. |
This branch has not been deployed
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.
One feature, as asked in #11: Native games, programs built for the console that run without an emulator.
What it adds
A new system, Native games (
roms/native). Each game is one launch script (.sh) next to its own folder. The menu runs the script with/bin/shin the script's folder, in its own process group (host_launch_native()inhost/launch.c). It hands over the display, sound and pads the same way it does for a libretro game.The game's environment
HOME=/data/rsos/native-home, because the root file system is read-only.XDG_CONFIG_HOMEandXDG_DATA_HOMEsit under it.SDL_VIDEODRIVER=kmsdrmandSDL_AUDIODRIVER=alsa.RSOS_GAME_DIRandRSOS_LANG.game.log.What the menu does around it
HANG_KILL_MS.Build: SDL2 (KMS/DRM, GLES2, ALSA) is added to the two RetroStone2 configs.
Docs:
docs/native-games.mdcovers the folder layout, the launch script and the environment.Tests
check-frontendsteps 2a to 2c cover the launch and its environment, an error exit, and the menu stopping a running game (the whole process group goes).main, 0.1.5):check-frontend,check-host,check-input,check-i18nandcheck-transferpass.sysmap.cknows the new folder too (aliasnativegames, deliberately notports: RetroPie's port scripts start RetroPie's own emulators).po/rsos.potis regenerated (make pot).On hardware
Tested on a RetroStone2 Pro with a fork build based on 0.1.4.
frontend.logdoesn't show the "Select+Start held" line, so the menu never saw both buttons together. I couldn't find the cause in the code. The same log has a button the kernel reported held for 30 s, so it may be the lost-release problem that 0.1.5 fixes (issue with keys acting as if they are constantly being pressed #10). That still needs to be checked on 0.1.5. For now the two ports quit by themselves on Select+Start.Next
rsos-gamepad(it merges the RetroStone2's three input devices into one virtual SDL gamepad, via uinput) will be a separate PR once this one is in.🤖 Generated with Claude Code