RetroArch
|
A small read only database Mainly to be used by retroarch
Files specified later in the chain will override earlier ones if the same key exists multiple times.
libretrodb_tool <db file> list
libretrodb_tool <db file> create-index <index name> <field name>
libretrodb_tool <db file> find <index name> <value>
# Compiling a single DAT into a single RDB with c_converter
c_converter
Specify rom.crc
as the second parameter to use CRC as the unique fingerprint.
This approach builds and uses the c_converter
program to compile the databases
To convert a dat file use:
If you want to merge multiple dat files you need to run:
for example:
Some examples of queries you can use with libretrodbtool:
1) Glob pattern matching Usecase : Search for all games starting with 'Street Fighter' in the 'name' field (glob pattern matching)
‘libretrodb_tool <db file>=""> find "{'name’:glob('Street Fighter*')}"`
2) Combined number matching query Usecase: Search for all games released on October 1995.
‘libretrodb_tool <db file>=""> find "{'releasemonth’:10,'releaseyear':1995}"`
3) Names only search Usecase: Search for all games released on October 1995, wont print checksums, filename or rom size, only the game name.
‘libretrodb_tool <db file>=""> get-names "{'releasemonth’:10,'releaseyear':1995}"`
In order to write you own converter you must have a lua file that implements the following functions: