recalbox

package
v2.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: GPL-3.0 Imports: 37 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package recalbox implements Recalbox. Games are launched through EmulationStation's UDP command port so ES stays in charge of emulator configuration, and followed through the state file ES rewrites on every event.

Index

Constants

View Source
const (
	// ScriptPath is a permanent user script: ES runs it once when it starts
	// and leaves it running across frontend restarts.
	ScriptPath = "/recalbox/share/userscripts/zaparoo(permanent).sh"
	// SupervisorPIDFile is written by the script so it runs only once.
	SupervisorPIDFile = "/tmp/zaparoo-supervisor.pid"
)
View Source
const (
	// InstallDir holds the binary, config, database and logs on the share
	// partition, which Recalbox upgrades keep.
	InstallDir = "/recalbox/share/system/zaparoo"
	// ServiceBinaryDir is on tmpfs, which can execute files.
	ServiceBinaryDir = "/tmp/zaparoo-bin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer added in v2.23.0

type Installer struct {
	FS afero.Fs
	// StartScript runs the installed script detached from the caller.
	StartScript func(path string) error
	// Signal sends a signal to a process.
	Signal func(pid int, sig syscall.Signal) error
	// Sleep waits between checks that a stopped supervisor has exited.
	Sleep func(time.Duration)
	// Script is the supervisor template; it names @ZAPAROO_BIN@.
	Script string
	// Executable is the absolute path of the binary the script runs.
	Executable string
}

Installer installs Core as a Recalbox user script.

func NewInstaller added in v2.23.0

func NewInstaller(script, executable string) *Installer

NewInstaller returns an Installer for the real system.

func (*Installer) Install added in v2.23.0

func (i *Installer) Install() error

Install writes the user script and starts it, so Core runs now and on every boot. Running it again stops the running supervisor first, so the reinstalled binary and script take over instead of waiting for a reboot.

func (*Installer) Uninstall added in v2.23.0

func (i *Installer) Uninstall() error

Uninstall stops the supervisor, which stops Core, and removes the script.

type Platform

type Platform struct {
	*linuxbase.Base
	// contains filtered or unexported fields
}

Platform implements platforms.Platform for Recalbox.

func NewPlatform added in v2.23.0

func NewPlatform() *Platform

NewPlatform creates a Recalbox platform.

func (*Platform) LaunchMedia

func (p *Platform) LaunchMedia(
	cfg *config.Instance,
	path string,
	launcher *platforms.Launcher,
	db *database.Database,
	opts *platforms.LaunchOptions,
) error

LaunchMedia launches media with the platform's launchers.

func (*Platform) Launchers

func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher

Launchers returns one launcher per Recalbox system Zaparoo knows, plus custom and generic launchers.

func (*Platform) ReturnToMenu added in v2.7.0

func (p *Platform) ReturnToMenu() error

ReturnToMenu stops the running game, which returns to ES.

func (*Platform) RootDirs

func (p *Platform) RootDirs(cfg *config.Instance) []string

RootDirs returns configured index roots plus the folders ES reads ROMs from.

func (*Platform) ServiceBinaryDir added in v2.23.0

func (*Platform) ServiceBinaryDir() string

ServiceBinaryDir is where the service runs from. The share is FAT mounted without exec bits, so the binary is copied to tmpfs first.

func (*Platform) Settings

func (*Platform) Settings() platforms.Settings

Settings keeps everything in InstallDir.

func (*Platform) StartPost

func (p *Platform) StartPost(
	ctx context.Context,
	cfg *config.Instance,
	launcherManager platforms.LauncherContextManager,
	activeMedia func() *models.ActiveMedia,
	setActiveMedia func(*models.ActiveMedia),
	db *database.Database,
	scheduler *idle.Scheduler,
) error

StartPost starts following EmulationStation events.

func (*Platform) Stop

func (p *Platform) Stop() error

Stop ends event tracking. A running game is left to ES.

func (*Platform) StopActiveLauncher

func (p *Platform) StopActiveLauncher(intent platforms.StopIntent) error

StopActiveLauncher stops the running game, whether Core or ES started it. Active media stays set when the game could not be stopped.

func (*Platform) SupportedReaders

func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader

SupportedReaders returns the standard Linux reader set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL