A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 62 lines 2.4 kB view raw
1This file explains how the database was created an how to update it. 2 3Model list 4========== 5 6The model list (models.txt) was extract from Sony's mptapp on target. This is 7most probably the only reliable way of getting model IDs. It cannot be done 8automatically but it is easy to locate the list using a tool like IDA. It is 9basically a long list of the following structure: 10 struct model_info_t 11 { 12 const char *name; 13 uin32_t mid; 14 }; 15Once identified, it is easy to copy it to a file and grep/sed/awk it to produce 16the textual list. It depends on which tool you use. I decided to keep this list 17because it is an easy format to produce and parse. For consistency, I decided 18to use upper case for the model name and lower case for mid. Keep this when 19you modify the list to keep the diff minimal. 20 21IMPORTANT NOTE: some players have more than one model ID (ie same name) !! 22 23FORMAT (models.txt): list of pairs <mid>,<name> where <name> is upper case 24human name of the player and <mid> is the lower-case hex value of the model ID. 25 26Series list 27=========== 28 29The original series list was semi-automatically generated. Unfortunately, Sony 30does not use a 100% regular naming scheme. It is thus simpler to modify it by 31hand for newer models. To keep consistency, the generator script will make sure 32that the series list only refers to device in the model list and that no device 33in the model list is not refered to. 34 35FORMAT (series.txt): list of <codename>,<name>,<mid1>,<mid2>,... where <codename> 36is the (Rockbox-only) codename of the series (that should match what other tools 37use, like upgtools), always in lower case; where <name> is the humand name of the 38series, and <midX> is the list of models in the series (given by model IDs because 39name are not uniques). 40 41Advise on tooling 42================= 43 44The format of the file was carefully chosen to be easy to use and produce. It 45avoids uses spaces are separators because it breaks easily. The "," separator 46is a good match in this case and shouldn't pose a problem. In most tools, changing 47the separator is easy. For example with awk, you can use the 48 -F "," 49option, or define in the preamble with 50 BEGIN { FS = ","; } 51. Other tools have similar constructs. 52 53NVPs 54==== 55 56See nvps/README 57 58gen_db.py 59========= 60 61This script generates the database (nwz_db.{c,h}) from the various textual files. 62The output must NOT be touched by hand.