rdb

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: GPL-3.0 Imports: 5 Imported by: 4

Documentation

Overview

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

Adapted from github.com/libretro/ludo/rdb Original Copyright (c) libretro team

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDisplayName

func GetDisplayName(name string) string

GetDisplayName extracts a clean display name from a No-Intro name by removing region/version information in parentheses

func GetRegionFromName

func GetRegionFromName(name string) string

GetRegionFromName extracts region information from a No-Intro name Returns "us", "eu", "jp", or "" if unknown

Types

type Game

type Game struct {
	Name         string // Full No-Intro name (e.g., "Sonic the Hedgehog (USA, Europe)")
	Description  string
	Genre        string
	Developer    string
	Publisher    string
	Franchise    string
	ESRBRating   string
	ROMName      string // ROM filename
	ReleaseMonth uint
	ReleaseYear  uint
	Size         uint64
	CRC32        uint32
	Serial       string
	MD5          string // MD5 hash for RetroAchievements lookup
}

Game represents a game entry in the RDB

type RDB

type RDB struct {
	// contains filtered or unexported fields
}

RDB contains all game entries from a parsed RDB file

func LoadRDB

func LoadRDB(path string) (*RDB, error)

LoadRDB loads and parses an RDB file from disk

func Parse

func Parse(data []byte) *RDB

Parse parses RDB file content and returns an RDB database

func (*RDB) FindByCRC32

func (rdb *RDB) FindByCRC32(crc32 uint32) *Game

FindByCRC32 looks up a game by its CRC32 checksum

func (*RDB) FindByMD5

func (rdb *RDB) FindByMD5(md5 string) *Game

FindByMD5 looks up a game by its MD5 hash

func (*RDB) GameCount

func (rdb *RDB) GameCount() int

GameCount returns the number of games in the database

func (*RDB) GetMD5ByCRC32

func (rdb *RDB) GetMD5ByCRC32(crc32 uint32) string

GetMD5ByCRC32 returns the MD5 hash for a game found by CRC32

Jump to

Keyboard shortcuts

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