misterarcade

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: GPL-3.0 Imports: 25 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 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, identities IdentityCache,
) 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 and identities are optional fast paths for reading a descriptor 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 IdentityCache added in v2.23.0

type IdentityCache func(path string) (setName, parent string, ok bool)

IdentityCache is the same fast path for a descriptor's set name together with the set it is a clone of. ok=false means the platform holds no parent answer for that descriptor; the scraper then leaves the parent unknown rather than read the file, since the point of the cache is not to. A nil cache is valid.

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