Documentation
¶
Index ¶
- func ArcadeCatalog(pl platforms.Platform) ([]misterarcade.Entry, error)
- func ArcadeSystemIDs() []string
- func BackupDefinitions(settings platforms.Settings) []platforms.BackupDefinition
- func BackupRestoreRoot(settings platforms.Settings) string
- func CmdIni(_ platforms.Platform, env *platforms.CmdEnv) (platforms.CmdResult, error)
- func CmdLaunchCore(_ platforms.Platform, env *platforms.CmdEnv) (platforms.CmdResult, error)
- func CmdMisterMgl(_ platforms.Platform, env *platforms.CmdEnv) (platforms.CmdResult, error)
- func CmdWallpaper(_ platforms.Platform, env *platforms.CmdEnv) (platforms.CmdResult, error)
- func CreateLaunchers(pl platforms.Platform) []platforms.Launcher
- func LoadCsvMappings() (uidMappings, textMappings map[string]string, err error)
- func NewArcadeScraper(pl platforms.Platform, systems []string) platforms.Scraper
- func NewArcadeSetNameCache(pl platforms.Platform) misterarcade.SetNameCache
- func StartCsvMappingsWatcher(getLoadTime func() time.Time, ...) (func() error, error)
- func StartResourceTopologyManager(ctx context.Context)
- type CoreNameGetter
- type CsvMappingEntry
- type FramebufferChecker
- type MiSTerConsoleManager
- type Platform
- func (p *Platform) ApplyProfile(ref platforms.ProfileRef, enabledItems []string) error
- func (p *Platform) BackupDefinitions() []platforms.BackupDefinition
- func (p *Platform) BackupRestoreRoot() string
- func (p *Platform) CheckAndClearArcadeCardLaunch(setname string) bool
- func (p *Platform) ConsoleManager() platforms.ConsoleManager
- func (p *Platform) DevicePower() (power.Detail, error)
- func (p *Platform) ForwardCmd(env *platforms.CmdEnv) (platforms.CmdResult, error)
- func (p *Platform) GetDBLoadTime() time.Time
- func (p *Platform) HandOffUI(_ context.Context, event *models.UIEvent) (handled bool, minOpen time.Duration)
- func (*Platform) ID() string
- func (*Platform) InputCoverage() platforms.InputClass
- func (p *Platform) KeyboardPressSequence(args []string, interKeyDelay time.Duration) error
- func (p *Platform) LaunchMedia(cfg *config.Instance, path string, launcher *platforms.Launcher, ...) error
- func (p *Platform) LaunchSystem(cfg *config.Instance, id string) error
- func (p *Platform) LaunchSystemLauncher(cfg *config.Instance, systemID string, launcher *platforms.Launcher) error
- func (p *Platform) Launchables(cfg *config.Instance) []launchables.Launchable
- func (*Platform) LauncherRuntime(cfg *config.Instance, l *platforms.Launcher) models.LauncherRuntime
- func (p *Platform) Launchers(cfg *config.Instance) []platforms.Launcher
- func (p *Platform) LookupMapping(t *tokens.Token) (string, bool)
- func (*Platform) ManagedByPackageManager() bool
- func (*Platform) MinimumUIDisplay(kind models.UIEventKind) time.Duration
- func (*Platform) NormalizeLaunchPath(path string) string
- func (*Platform) PowerActions(ctx context.Context) map[hoststatus.PowerAction]hoststatus.Availability
- func (p *Platform) PrepareBackup() (platforms.BackupPlan, func() error, error)
- func (p *Platform) PrepareBackupRestore() (func(bool) error, error)
- func (*Platform) PreparePowerAction(ctx context.Context, action hoststatus.PowerAction) (func() error, error)
- func (p *Platform) PresentUI(ctx context.Context, event *models.UIEvent) (func() error, error)
- func (*Platform) ProfileItems() []platforms.ProfileItem
- func (p *Platform) RefreshLauncherDependencies() error
- func (*Platform) RendersOverMedia() bool
- func (*Platform) RendersUIKind(kind models.UIEventKind) bool
- func (p *Platform) ReturnToMenu() error
- func (*Platform) RootDirs(cfg *config.Instance) []string
- func (p *Platform) ScanHook(token *tokens.Token) error
- func (p *Platform) Scrapers(_ *config.Instance) map[string]platforms.Scraper
- func (*Platform) Screenshot() (*platforms.ScreenshotResult, error)
- func (p *Platform) SetArcadeCardLaunch(setname string)
- func (p *Platform) SetDB(uidMap, textMap map[string]string)
- func (p *Platform) SetTrackedProcess(proc *os.Process)
- func (*Platform) Settings() platforms.Settings
- func (p *Platform) StartPost(ctx context.Context, cfg *config.Instance, ...) error
- func (p *Platform) StartPre(cfg *config.Instance) error
- func (p *Platform) Stop() error
- func (p *Platform) StopActiveLauncher(intent platforms.StopIntent) error
- func (p *Platform) StopCoreLoadedAfterStop(core string) bool
- func (p *Platform) SupportedReaders(cfg *config.Instance) []readers.Reader
- func (*Platform) TTY2OLEDPictureName(media *models.ActiveMedia) string
- func (*Platform) WatchInput(ctx context.Context, responsive bool, onActivity func()) error
- func (*Platform) WatchProfileData(ctx context.Context, onChange func())
- type Romset
- type Romsets
- type ScummVMGame
- type TTYReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArcadeCatalog ¶ added in v2.18.0
func ArcadeCatalog(pl platforms.Platform) ([]misterarcade.Entry, error)
ArcadeCatalog reads the platform's cached or embedded arcade catalog for the scraper.
func ArcadeSystemIDs ¶ added in v2.18.0
func ArcadeSystemIDs() []string
ArcadeSystemIDs returns the systems arcade descriptors are indexed under on this platform: Arcade itself, plus every granular hardware system classification splits out of it.
func BackupDefinitions ¶ added in v2.16.0
func BackupDefinitions(settings platforms.Settings) []platforms.BackupDefinition
func BackupRestoreRoot ¶ added in v2.16.0
func CmdLaunchCore ¶
func CmdMisterMgl ¶
func CmdWallpaper ¶ added in v2.10.0
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
CreateLaunchers creates all standard MiSTer launchers for the given platform. This is exported for use by MiSTeX and other MiSTer variants.
func LoadCsvMappings ¶
func NewArcadeScraper ¶ added in v2.18.0
NewArcadeScraper builds the arcade catalog scraper for a MiSTer platform. systems states which arcade systems that platform indexes.
func NewArcadeSetNameCache ¶ added in v2.18.0
func NewArcadeSetNameCache(pl platforms.Platform) misterarcade.SetNameCache
NewArcadeSetNameCache answers set-name lookups from the classification cache granular arcade indexing already wrote, so a scrape costs a map lookup per descriptor instead of re-reading thousands of them from SD storage. An entry only answers while the file still matches the size and mtime it was parsed at, and a cached empty set name is a real answer: that descriptor had none.
func StartCsvMappingsWatcher ¶
func StartResourceTopologyManager ¶ added in v2.17.0
StartResourceTopologyManager keeps CPU0 available to the software frontend only while frontend holds its kernel-backed activity lease. The lease is released automatically on exit or forced termination, so Core restarts and frontend startup ordering cannot leave topology in a stale state.
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 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 (m *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 (m *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.InputManager
// contains filtered or unexported fields
}
func NewPlatform ¶
func NewPlatform() *Platform
func (*Platform) ApplyProfile ¶ added in v2.16.0
func (p *Platform) ApplyProfile(ref platforms.ProfileRef, enabledItems []string) error
ApplyProfile implements platforms.ProfileDataSwapper.
func (*Platform) BackupDefinitions ¶ added in v2.16.0
func (p *Platform) BackupDefinitions() []platforms.BackupDefinition
func (*Platform) BackupRestoreRoot ¶ added in v2.16.0
func (*Platform) CheckAndClearArcadeCardLaunch ¶ added in v2.7.0
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) DevicePower ¶ added in v2.20.0
DevicePower reports the optional battery board. The board only reports its charge, so the supply and charge state are left unknown.
func (*Platform) ForwardCmd ¶
func (*Platform) GetDBLoadTime ¶
func (*Platform) HandOffUI ¶ added in v2.22.0
func (p *Platform) HandOffUI(_ context.Context, event *models.UIEvent) (handled bool, minOpen time.Duration)
HandOffUI leaves UI events to API clients while the frontend runs, so it draws them instead of the menu widgets. The widgets end running media to show any event that reaches them, so an event raised while media runs returns to the menu, which makes Main start the frontend, and is kept open long enough for the frontend to start. Events the widgets never show over media (the auto-advance switch countdown, the launch guard) are decided before they reach the renderer and are unaffected.
func (*Platform) InputCoverage ¶ added in v2.21.0
func (*Platform) InputCoverage() platforms.InputClass
InputCoverage implements platforms.InputActivitySource. MiSTer Main holds an exclusive grab on every /dev/input/event* node, so the event nodes report nothing there; the SAM source reads the legacy joystick, hidraw and mice nodes, which keep working while grabbed.
func (*Platform) KeyboardPressSequence ¶ added in v2.21.0
KeyboardPressSequence primes Main's virtual keyboard when a core has loaded since the last sequence, so the first typed keys are not lost.
func (*Platform) LaunchMedia ¶
func (*Platform) LaunchSystem ¶
func (*Platform) LaunchSystemLauncher ¶ added in v2.17.0
func (p *Platform) LaunchSystemLauncher(cfg *config.Instance, systemID string, launcher *platforms.Launcher) error
LaunchSystemLauncher implements platforms.SystemLauncherSelector, loading the specific core a launcher maps to (e.g. an alt core) instead of the system's default. The caller (cmdSystem) has already verified launcher belongs to systemID.
func (*Platform) Launchables ¶ added in v2.15.0
func (p *Platform) Launchables(cfg *config.Instance) []launchables.Launchable
Launchables exposes launch-only MiSTer core entries that do not already have media launchers.
func (*Platform) LauncherRuntime ¶ added in v2.17.0
func (*Platform) LauncherRuntime(cfg *config.Instance, l *platforms.Launcher) models.LauncherRuntime
LauncherRuntime implements platforms.LauncherRuntimeProvider, reporting the FPGA core a launcher loads. It never rescans the filesystem — it only reads whatever the RBF cache currently holds, which Launchers keeps fresh.
func (*Platform) ManagedByPackageManager ¶ added in v2.10.0
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) MinimumUIDisplay ¶ added in v2.16.0
func (*Platform) MinimumUIDisplay(kind models.UIEventKind) time.Duration
func (*Platform) NormalizeLaunchPath ¶ added in v2.18.0
func (*Platform) PowerActions ¶ added in v2.20.0
func (*Platform) PowerActions(ctx context.Context) map[hoststatus.PowerAction]hoststatus.Availability
func (*Platform) PrepareBackup ¶ added in v2.17.0
func (p *Platform) PrepareBackup() (platforms.BackupPlan, func() error, error)
func (*Platform) PrepareBackupRestore ¶ added in v2.16.0
func (*Platform) PreparePowerAction ¶ added in v2.20.0
func (*Platform) PreparePowerAction(ctx context.Context, action hoststatus.PowerAction) (func() error, error)
func (*Platform) ProfileItems ¶ added in v2.16.0
func (*Platform) ProfileItems() []platforms.ProfileItem
ProfileItems implements platforms.ProfileDataSwapper.
func (*Platform) RefreshLauncherDependencies ¶ added in v2.16.0
func (*Platform) RendersOverMedia ¶ added in v2.21.0
RendersOverMedia is false: the MiSTer menu widget replaces the running core, so an event shown while a game runs ends that game.
func (*Platform) RendersUIKind ¶ added in v2.21.0
func (*Platform) RendersUIKind(kind models.UIEventKind) bool
RendersUIKind reports the events PresentUI can show, which is every kind.
func (*Platform) ReturnToMenu ¶ added in v2.7.0
ReturnToMenu stops what is running and loads the menu core. A core still being loaded for a launch is stopped once it is up: Main drops the menu request it gets while loading a core.
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
SetArcadeCardLaunch caches the arcade setname when launching via card.
func (*Platform) SetTrackedProcess ¶ added in v2.6.1
func (*Platform) StopActiveLauncher ¶
func (p *Platform) StopActiveLauncher(intent platforms.StopIntent) error
func (*Platform) StopCoreLoadedAfterStop ¶ added in v2.21.0
StopCoreLoadedAfterStop is told by the tracker of each core change. When the core is one a stop was meant for, it returns to the menu and reports true, so the tracker leaves the game unpublished.
func (*Platform) SupportedReaders ¶
func (*Platform) TTY2OLEDPictureName ¶ added in v2.16.1
func (*Platform) TTY2OLEDPictureName(media *models.ActiveMedia) string
TTY2OLEDPictureName returns MiSTer's arcade setname, matching upstream picture filenames.
func (*Platform) WatchInput ¶ added in v2.21.0
WatchInput implements platforms.InputActivitySource.
func (*Platform) WatchProfileData ¶ added in v2.16.0
WatchProfileData implements platforms.ProfileDataWatcher: it invokes onChange whenever the mount table changes (the kernel signals POLLPRI on /proc/self/mountinfo), debounced, until ctx is done. This is how the service notices a cifs boot script mounting over saves after us, a USB root drive appearing late, or a manual unmount.
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
Path string // Configured game directory, used for metadata discovery
GameID string // Engine game ID, shared by every variant of one game
}
ScummVMGame represents a game configured in scummvm.ini
Source Files
¶
- arcade_class_persist.go
- arcade_rbf.go
- arcade_scraper.go
- arcade_systems.go
- audio_scanner.go
- commands.go
- console_launcher.go
- console_lease.go
- console_manager.go
- controls.go
- core_load_stops.go
- csvmappings.go
- device.go
- frontend_ui.go
- inputactivity.go
- launchables.go
- launchers.go
- load_fat.go
- load_image.go
- load_layouts.go
- load_loose.go
- load_mmb.go
- loadmacro.go
- maincommands.go
- mounts.go
- operator_reader.go
- platform.go
- profiledata.go
- profiledata_backup.go
- readiness.go
- resource_topology_linux.go
- screenshot.go
- scripts.go
- scummvm_midi.go
- scummvm_scanner.go
- scummvm_scraper.go
- tty2oled.go
- ui.go
- unstable.go
- wallpaper.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package catalog preserves the original Core import path for the standalone github.com/ZaparooProject/zaparoo-core/mister/catalog module.
|
Package catalog preserves the original Core import path for the standalone github.com/ZaparooProject/zaparoo-core/mister/catalog module. |
|
Package cpcdsk reads the CP/M directory of Amstrad CPC .dsk images in both the standard and extended formats.
|
Package cpcdsk reads the CP/M directory of Amstrad CPC .dsk images in both the standard and extended formats. |
|
Package decb reads the file directory of Tandy CoCo Disk Extended Color BASIC disk images.
|
Package decb reads the file directory of Tandy CoCo Disk Extended Color BASIC disk images. |
|
Package fatimg reads files from FAT12, FAT16 and FAT32 disk images without loading them into memory.
|
Package fatimg reads files from FAT12, FAT16 and FAT32 disk images without loading them into memory. |
|
Package mgl preserves the original Core import path for the standalone github.com/ZaparooProject/zaparoo-core/mister/mgl module.
|
Package mgl preserves the original Core import path for the standalone github.com/ZaparooProject/zaparoo-core/mister/mgl module. |
|
Package mmb reads the disc catalog of a BBC/Acorn MMFS MMB container.
|
Package mmb reads the disc catalog of a BBC/Acorn MMFS MMB container. |
|
Package trs80cas reads program headers from TRS-80 cassette images.
|
Package trs80cas reads program headers from TRS-80 cassette images. |