mister

package
v2.10.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: GPL-3.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdWallpaper added in v2.10.0

func CmdWallpaper(_ platforms.Platform, env *platforms.CmdEnv) (platforms.CmdResult, error)

CmdWallpaper sets or unsets the MiSTer main menu wallpaper.

With an argument (e.g. "mister.wallpaper|filename.png"), sets that file from the wallpapers directory as the active wallpaper. Without arguments, unsets the current wallpaper.

The mechanism works by creating a symlink at /media/fat/menu.{ext} pointing to the target file in /media/fat/wallpapers/, then setting the background mode byte in MENU.CFG to wallpaper mode. If the user is on the main menu, the menu core is relaunched to display the change immediately.

func CreateLaunchers added in v2.7.0

func CreateLaunchers(pl platforms.Platform) []platforms.Launcher

CreateLaunchers creates all standard MiSTer launchers for the given platform. This is exported for use by MiSTeX and other MiSTer variants.

func LoadCsvMappings

func LoadCsvMappings() (uidMappings, textMappings map[string]string, err error)

func StartCsvMappingsWatcher

func StartCsvMappingsWatcher(
	getLoadTime func() time.Time,
	setMappings func(map[string]string, map[string]string),
) (func() error, error)

Types

type CoreNameGetter added in v2.9.1

type CoreNameGetter interface {
	GetCoreName() string
}

CoreNameGetter provides an interface for getting the active core name.

type CsvMappingEntry

type CsvMappingEntry struct {
	MatchUID  string `csv:"match_uid"`
	MatchText string `csv:"match_text"`
	Text      string `csv:"text"`
}

type FramebufferChecker added in v2.9.1

type FramebufferChecker interface {
	IsReady() bool
}

FramebufferChecker provides an interface for checking framebuffer readiness.

type MiSTerConsoleManager added in v2.7.0

type MiSTerConsoleManager struct {
	// contains filtered or unexported fields
}

MiSTerConsoleManager manages console/TTY switching for MiSTer platform.

func (*MiSTerConsoleManager) Clean added in v2.7.0

func (*MiSTerConsoleManager) Clean(vt string) error

Clean prepares a console for use (clears screen, hides cursor). This is public to allow launchers to clean specific TTYs.

func (*MiSTerConsoleManager) Close added in v2.7.0

func (m *MiSTerConsoleManager) Close() error

Close exits console mode and returns to normal display.

func (*MiSTerConsoleManager) Open added in v2.7.0

func (m *MiSTerConsoleManager) Open(ctx context.Context, vt string) error

Open switches to console mode on the specified VT. The provided context can be used to cancel the operation if the launcher is superseded.

func (*MiSTerConsoleManager) Restore added in v2.7.0

func (*MiSTerConsoleManager) Restore(vt string) error

Restore restores console cursor state. This is public to allow launchers to restore specific TTYs.

type Platform

type Platform struct {
	shared.LinuxInput
	// contains filtered or unexported fields
}

func NewPlatform

func NewPlatform() *Platform

func (*Platform) CheckAndClearArcadeCardLaunch added in v2.7.0

func (p *Platform) CheckAndClearArcadeCardLaunch(setname string) bool

CheckAndClearArcadeCardLaunch checks if the setname was recently launched via card. Returns true if there's a match within the last 15 seconds, false otherwise. Clears the cache after checking to prevent stale suppressions.

func (*Platform) ConsoleManager added in v2.7.0

func (p *Platform) ConsoleManager() platforms.ConsoleManager

func (*Platform) ForwardCmd

func (p *Platform) ForwardCmd(env *platforms.CmdEnv) (platforms.CmdResult, error)

func (*Platform) GetDBLoadTime

func (p *Platform) GetDBLoadTime() time.Time

func (*Platform) ID

func (*Platform) ID() string

func (*Platform) LaunchMedia

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

func (*Platform) LaunchSystem

func (p *Platform) LaunchSystem(cfg *config.Instance, id string) error

func (*Platform) Launchers

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

func (*Platform) LookupMapping

func (p *Platform) LookupMapping(t *tokens.Token) (string, bool)

func (*Platform) ManagedByPackageManager added in v2.10.0

func (*Platform) ManagedByPackageManager() bool

ManagedByPackageManager checks if this install is managed by MiSTer Downloader or update_all by looking for known database entries in the downloader configuration file.

func (*Platform) ReturnToMenu added in v2.7.0

func (p *Platform) ReturnToMenu() error

func (*Platform) RootDirs

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

func (*Platform) ScanHook

func (p *Platform) ScanHook(token *tokens.Token) error

func (*Platform) Screenshot added in v2.10.0

func (*Platform) Screenshot() (*platforms.ScreenshotResult, error)

Screenshot triggers a MiSTer screenshot via the command interface and waits for the resulting file to appear in the screenshots directory. The full image is read into memory and returned as bytes. Typical PNGs are ~200-500KB which is fine for single-client usage on ARM. If screenshots grow significantly larger, consider a streaming approach instead.

func (*Platform) SetArcadeCardLaunch added in v2.7.0

func (p *Platform) SetArcadeCardLaunch(setname string)

SetArcadeCardLaunch caches the arcade setname when launching via card.

func (*Platform) SetDB

func (p *Platform) SetDB(uidMap, textMap map[string]string)

func (*Platform) SetTrackedProcess added in v2.6.1

func (p *Platform) SetTrackedProcess(proc *os.Process)

func (*Platform) Settings

func (*Platform) Settings() platforms.Settings

func (*Platform) ShowLoader

func (p *Platform) ShowLoader(
	_ *config.Instance,
	args widgetmodels.NoticeArgs,
) (func() error, error)

func (*Platform) ShowNotice

func (p *Platform) ShowNotice(
	_ *config.Instance,
	args widgetmodels.NoticeArgs,
) (func() error, time.Duration, error)

func (*Platform) ShowPicker

func (p *Platform) ShowPicker(
	_ *config.Instance,
	args widgetmodels.PickerArgs,
) error

func (*Platform) StartPost

func (p *Platform) StartPost(
	cfg *config.Instance,
	launcherManager platforms.LauncherContextManager,
	activeMedia func() *models.ActiveMedia,
	setActiveMedia func(*models.ActiveMedia),
	db *database.Database,
) error

func (*Platform) StartPre

func (p *Platform) StartPre(cfg *config.Instance) error

func (*Platform) Stop

func (p *Platform) Stop() error

func (*Platform) StopActiveLauncher

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

func (*Platform) SupportedReaders

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

type Romset

type Romset struct {
	Name    string `xml:"name,attr"`
	AltName string `xml:"altname,attr"`
}

type Romsets

type Romsets struct {
	XMLName xml.Name `xml:"romsets"`
	Romsets []Romset `xml:"romset"`
}

type ScummVMGame added in v2.7.0

type ScummVMGame struct {
	TargetID    string // Section name, used to launch the game
	Description string // Human-readable game title
}

ScummVMGame represents a game configured in scummvm.ini

type TTYReader added in v2.9.1

type TTYReader interface {
	GetActiveTTY() (string, error)
}

TTYReader provides an interface for reading the active TTY.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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