mra

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: 8 Imported by: 0

Documentation

Overview

Package mra reads the MAME set name out of a MiSTer arcade descriptor.

An MRA filename is a display title, so the set name inside the descriptor is the only stable identity an arcade row has. Scrapers keying external arcade metadata to indexed media share this reader so they agree on which descriptors are identity sources and which are not.

Index

Constants

View Source
const Ext = ".mra"

Ext is the MiSTer arcade descriptor extension.

View Source
const MaxHeaderBytes = 256 * 1024

MaxHeaderBytes bounds the descriptor header a set name may be read from. It is not a file size limit: MiSTer MRAs embed their ROM payload as base64 <part> data and run to tens of megabytes, and refusing those would leave real arcade games with no identity at all.

Variables

This section is empty.

Functions

func ReadSetName

func ReadSetName(fs afero.Fs, filename string) string

ReadSetName requires one complete, bounded descriptor header. Unlike optional artwork lookup, this identity can select a different title's write target, so malformed documents and repeated setname elements must not select a row. The returned set name is lower-cased; an empty string means no identity.

func SetStem

func SetStem(sourcePath string) string

SetStem treats ZIP paths as identities, never as files to open. Source bundles may contain absolute paths from a different machine, including Windows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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