rdb

package
v0.0.0-...-c010b7c Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: GPL-3.0, GPL-3.0 Imports: 4 Imported by: 0

README

This module is a modified subset of https://github.com/libretro/ludo

Credit goes to their original authors.

Documentation

Overview

Package rdb is a parser for rdb files, a binary database of games with metadata also used by RetroArch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB map[string]RDB

DB is a database that contains many RDB, mapped to their system name

func (*DB) FindByCRC

func (db *DB) FindByCRC(romPath string, romName string, CRC32 uint32, games chan (Game))

FindByCRC loops over the RDBs in the DB and concurrently matches CRC32 checksums.

func (*DB) FindByROMName

func (db *DB) FindByROMName(romPath string, romName string, CRC32 uint32, games chan (Game))

FindByROMName loops over the RDBs in the DB and concurrently matches ROM names.

type Game

type Game struct {
	Path         string `json:"-"`
	Name         string `json:"name"`
	Description  string `json:"description,omitempty"`
	Genre        string `json:"genre,omitempty"`
	Developer    string `json:"developer,omitempty"`
	Publisher    string `json:"publisher,omitempty"`
	Franchise    string `json:"franchise,omitempty"`
	Origin       string `json:"origin,omitempty"`
	Rumble       bool   `json:"rumble,omitempty"`
	Serial       string `json:"serial,omitempty"`
	ROMName      string `json:"rom_name,omitempty"`
	ReleaseMonth uint   `json:"release_month,omitempty"`
	ReleaseYear  uint   `json:"release_year,omitempty"`
	Size         uint64 `json:"size,omitempty"`
	CRC32        uint32 `json:"crc32,omitempty"`
	System       string `json:"system,omitempty"`
	MD5          string `json:"-"`
}

Game represents a game in the libretro database

func (*Game) SetField

func (g *Game) SetField(key string, value string)

SetField sets a field in the entry

type RDB

type RDB []Game

RDB contains all the game descriptions for a system

func Parse

func Parse(rdb []byte) RDB

Parse parses a .rdb file content and returns an array of Entries

Jump to

Keyboard shortcuts

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