misterarcade

package
v2.18.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package misterarcade imports the MiSTer arcade catalog's metadata onto indexed .mra rows.

MiSTer platforms already download, cache and classify that catalog; this scraper performs the join they stop short of, keying each indexed descriptor to its catalog row by the MAME set name declared inside it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlatformScraper

func NewPlatformScraper(systems []string, catalog Catalog, cache SetNameCache) platforms.Scraper

NewPlatformScraper returns the arcade catalog scraper.

systems are the indexed systems whose media this catalog describes: the platform states them because MiSTer classifies arcade descriptors into granular hardware systems while MiSTeX indexes them all as Arcade. catalog reads the platform's cached or embedded copy of the catalog. cache is an optional set-name fast path and may be nil.

Types

type Catalog

type Catalog func(platforms.Platform) ([]Entry, error)

Catalog supplies the arcade metadata rows for one run. The catalog itself is platform-owned — MiSTer and MiSTeX cache and embed it — so the platform injects its reader rather than this package reaching into their build.

type Entry

type Entry struct {
	SetName         string
	Region          string
	Version         string
	Alternative     string
	ParentTitle     string
	Platform        string
	Series          string
	Homebrew        string
	Bootleg         string
	Year            string
	Manufacturer    string
	Category        string
	Resolution      string
	Rotation        string
	Players         string
	MoveInputs      string
	SpecialControls string
	NumButtons      string
	Flip            string
}

Entry is one catalog row. Field names follow the catalog's own columns rather than Core's tag vocabulary, so a mapping change never looks like a source change. The catalog's display name and layout spacer columns are not read: arcade titles come from the descriptor filename, which the indexer owns.

type SetNameCache

type SetNameCache func(path string) (setName string, ok bool)

SetNameCache is an optional fast path for resolving an indexed descriptor to its set name. MiSTer already reads every set name while classifying granular arcade systems and keeps the result in a size/mtime-validated cache; reusing it means a scrape costs a map lookup per row instead of thousands of reads from SD storage. ok=false falls back to reading the descriptor. A nil cache is valid and means every row is read.

Jump to

Keyboard shortcuts

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