Documentation ¶
Index ¶
- Constants
- Variables
- func FileExists(path string) bool
- func FilterUniqueFilenames(files []string) []string
- func FindFile(path string) (string, error)
- func GetAllFiles(systemPaths map[string][]string, statusFn func(systemId string, path string)) ([][2]string, error)
- func GetFiles(systemId string, path string) ([]string, error)
- func GetGamesFolders(cfg *config.UserConfig) []string
- func GetPopulatedGamesFolders(cfg *config.UserConfig, systems []System) map[string][]string
- func MatchSystemFile(system System, path string) bool
- func NewFileChecker() *fileChecker
- func RunSystemHook(cfg *config.UserConfig, system System, path string) (string, error)
- func SystemsWithRbf() map[string]RbfInfo
- type MglParams
- type PathResult
- type RbfInfo
- type Slot
- type System
- func AllSystems() []System
- func BestSystemMatch(cfg *config.UserConfig, path string) (System, error)
- func FolderToSystems(cfg *config.UserConfig, path string) []System
- func GetGroup(groupId string) (System, error)
- func GetSystem(id string) (*System, error)
- func LookupSystem(id string) (*System, error)
Constants ¶
const ( CategoryArcade = "Arcade" CategoryConsole = "Console" CategoryComputer = "Computer" CategoryHandheld = "Handheld" CategoryOther = "Other" ManufacturerEntex = "Entex" ManufacturerEmerson = "Emerson" ManufacturerMattel = "Mattel" ManufacturerBally = "Bally" ManufacturerAtari = "Atari" ManufacturerColeco = "Coleco" ManufacturerSega = "Sega" ManufacturerNintendo = "Nintendo" ManufacturerNEC = "NEC" ManufacturerSNK = "SNK" ManufacturerBandai = "Bandai" ManufacturerVTech = "VTech" ManufacturerCasio = "Casio" ManufacturerWatara = "Watara" ManufacturerFairchild = "Fairchild" ManufacturerGCE = "GCE" ManufacturerBitCorp = "Bit Corporation" ManufacturerCommodore = "Commodore" ManufacturerAmstrad = "Amstrad" ManufacturerAcorn = "Acorn" ManufacturerApple = "Apple" ManufacturerBenesse = "Benesse" ManufacturerSony = "Sony" ManufacturerInterton = "Interton" ManufacturerTandy = "Tandy" ManufacturerIBM = "IBM" ManufacturerApogee = "Apogee" ManufacturerElektronika = "Elektronika" ManufacturerCambridge = "Cambridge" ManufacturerInteract = "Interact" ManufacturerJupiter = "Jupiter" ManufacturerVideoTechnology = "Video Technology" ManufacturerMicrosoft = "Microsoft" )
Variables ¶
var CoreGroups = map[string][]System{ "Atari7800": {Systems["Atari7800"], Systems["Atari2600"]}, "Coleco": {Systems["ColecoVision"], Systems["SG1000"]}, "Gameboy": {Systems["Gameboy"], Systems["GameboyColor"]}, "NES": {Systems["NES"], Systems["NESMusic"], Systems["FDS"]}, "SMS": {Systems["MasterSystem"], Systems["GameGear"], System{ Name: "SG-1000", Slots: []Slot{ { Exts: []string{".sg"}, Mgl: &MglParams{ Delay: 1, Method: "f", Index: 1, }, }, }, }}, "SNES": {Systems["SNES"], Systems["SNESMusic"]}, "TGFX16": {Systems["TurboGrafx16"], Systems["SuperGrafx"]}, }
CoreGroups is a list of common MiSTer aliases that map back to a system. First in list takes precendence for simple attributes in case there's a conflict in the future.
var Systems = map[string]System{}/* 102 elements not displayed */
Functions ¶
func FileExists ¶
func FilterUniqueFilenames ¶
func GetAllFiles ¶
func GetFiles ¶
GetFiles searches for all valid games in a given path and return a list of files. This function deep searches .zip files and handles symlinks at all levels.
func GetGamesFolders ¶
func GetGamesFolders(cfg *config.UserConfig) []string
func GetPopulatedGamesFolders ¶
func GetPopulatedGamesFolders(cfg *config.UserConfig, systems []System) map[string][]string
func MatchSystemFile ¶
MatchSystemFile returns true if a given file's extension is valid for a system.
func NewFileChecker ¶
func NewFileChecker() *fileChecker
func RunSystemHook ¶
func SystemsWithRbf ¶
SystemsWithRbf returns a map of all system IDs which have an existing rbf file.
Types ¶
type PathResult ¶
func GetActiveSystemPaths ¶
func GetActiveSystemPaths(cfg *config.UserConfig, systems []System) []PathResult
GetActiveSystemPaths returns the active path for each system.
func GetAllSystemPaths ¶
func GetAllSystemPaths(cfg *config.UserConfig) []PathResult
func GetSystemPaths ¶
func GetSystemPaths(cfg *config.UserConfig, systems []System) []PathResult
GetSystemPaths returns all possible paths for each system.
type RbfInfo ¶
type System ¶
type System struct { Id string Name string // US Category string ReleaseDate string // US Manufacturer string Alias []string SetName string SetNameSameDir bool Folder []string Rbf string Slots []Slot }
func AllSystems ¶
func AllSystems() []System
func BestSystemMatch ¶
func BestSystemMatch(cfg *config.UserConfig, path string) (System, error)
func FolderToSystems ¶
func FolderToSystems(cfg *config.UserConfig, path string) []System
FolderToSystems returns what systems a path could be for.
func LookupSystem ¶
LookupSystem case-insensitively looks up system ID definition including aliases.