Mercurial > hg > sidinfo
annotate README.txt @ 282:5936a3dc9755
Document the STIL related issues of -F formatting with few words.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 08 Jan 2020 01:40:52 +0200 |
parents | a8605886579d |
children | 5dfe7846e902 |
rev | line source |
---|---|
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 SIDInfo - PSID/RSID information displayer |
119 | 2 Programmed and designed by Matti 'ccr' Hämäläinen |
233 | 3 (C) Copyright 2014-2020 Tecnic Software productions (TNSP) |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 See COPYING for license information. |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 |
248 | 7 For contacting the author, e-mail is preferred: ccr@tnsp.org |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 ----------------------------------------------------------------------- |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 Requirements |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 ============ |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 The compilation and usage of these utilities requires following |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 software packages or functional equivalents installed: |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 |
233 | 16 - GCC or some other C99 compatible C compiler like Clang. |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 - GNU Make |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
18 |
43 | 19 - th-libs library (included in the tar/zip packages, |
20 for building from mercurial repo, see "how to build") | |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 |
157
8fc887cb56d0
Implement iconv support for converting from PSID de-facto latin-1/ISO-8859-*
Matti Hamalainen <ccr@tnsp.org>
parents:
153
diff
changeset
|
22 - libiconv (optional, for converting ISO-8859/Latin-1 encoded |
8fc887cb56d0
Implement iconv support for converting from PSID de-facto latin-1/ISO-8859-*
Matti Hamalainen <ccr@tnsp.org>
parents:
153
diff
changeset
|
23 text used in HVSC SID files and STIL database to whatever |
8fc887cb56d0
Implement iconv support for converting from PSID de-facto latin-1/ISO-8859-*
Matti Hamalainen <ccr@tnsp.org>
parents:
153
diff
changeset
|
24 character set your system is using, like UTF-8.) |
8fc887cb56d0
Implement iconv support for converting from PSID de-facto latin-1/ISO-8859-*
Matti Hamalainen <ccr@tnsp.org>
parents:
153
diff
changeset
|
25 |
8fc887cb56d0
Implement iconv support for converting from PSID de-facto latin-1/ISO-8859-*
Matti Hamalainen <ccr@tnsp.org>
parents:
153
diff
changeset
|
26 |
233 | 27 For Linux -> Win32/64 cross-compilation I have used the MinGW packages |
28 from Debian Testing (wheezy), installable via "apt-get mingw-w64". | |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 Please don't ask me for help to get cross-compilation working. |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 ----------------------------------------------------------------------- |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 How to build |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 ============ |
30 | 36 0) If building from Mercurial repo, you need th-libs: |
37 | |
38 $ hg clone http://tnsp.org/hg/th-libs | |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 |
30 | 40 1) Possibly edit Makefile / Makefile.w32 |
41 | |
76 | 42 2) $ make |
30 | 43 |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 or, if cross-compiling to Win32 via MinGW |
30 | 45 |
76 | 46 $ make -f Makefile.w32 |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 |
30 | 48 3) ??? |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 |
30 | 50 4) If it works -> Happy fun times \:D\ |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 |
96
b6bf182bd37f
Add line about 'make install'.
Matti Hamalainen <ccr@tnsp.org>
parents:
76
diff
changeset
|
52 5) sudo make install |
b6bf182bd37f
Add line about 'make install'.
Matti Hamalainen <ccr@tnsp.org>
parents:
76
diff
changeset
|
53 |
b6bf182bd37f
Add line about 'make install'.
Matti Hamalainen <ccr@tnsp.org>
parents:
76
diff
changeset
|
54 |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 ----------------------------------------------------------------------- |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 Usage |
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 ===== |
40 | 59 For more information about options, see 'sidinfo --help'. |
60 | |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
61 --- --- --- --- --- --- --- --- --- --- |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 |
193 | 63 Display all information about one file in "entry per row" format: |
64 | |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
65 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
17 | 66 Filename : /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
67 Type : PSID | |
68 Version : 2.0 | |
69 Data offset : 124 | |
70 Data size : 7154 | |
71 Load address : 0 | |
72 Init address : 4017 | |
73 Play address : 4027 | |
74 Songs : 1 | |
75 Start song : 1 | |
76 Name : Anal'ogue | |
119 | 77 Author : Søren Lund (Jeff) |
17 | 78 Copyright : 1996 Jeff |
79 Hash : 6d5b7f0ff092e55abf27c37c8bc3fc64 | |
11
20bcf214b282
Add some "documentation" and a license.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
80 |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
81 --- --- --- --- --- --- --- --- --- --- |
17 | 82 |
193 | 83 Display in "parseable" INI-style format, with hexadecimal values: |
84 | |
67 | 85 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid -p -x |
17 | 86 Filename=/misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
87 Type=PSID | |
88 Version=2.0 | |
89 DataOffs=$0000007c | |
90 DataSize=$00001bf2 | |
91 LoadAddr=$0000 | |
92 InitAddr=$0fb1 | |
93 PlayAddr=$0fbb | |
94 Songs=$0001 | |
95 StartSong=$0001 | |
96 Name=Anal'ogue | |
119 | 97 Author=Søren Lund (Jeff) |
17 | 98 Copyright=1996 Jeff |
99 Hash=6d5b7f0ff092e55abf27c37c8bc3fc64 | |
40 | 100 |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
101 --- --- --- --- --- --- --- --- --- --- |
40 | 102 |
193 | 103 One-line format with "|" as field separator, and specify |
104 which fields to display: | |
105 | |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
106 $ sidinfo -l \| -f type,ver,hash,name,author,copyright Anal_ogue.sid |
194
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
107 |
119 | 108 PSID|2.0|Anal'ogue|Søren Lund (Jeff)|1996 Jeff|6d5b7f0ff092e55abf27c37c8bc3fc64| |
40 | 109 |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
110 --- --- --- --- --- --- --- --- --- --- |
40 | 111 |
193 | 112 By using the format string functionality you can control |
113 the output very specifically: | |
67 | 114 |
115 $ sidinfo Anal_ogue.sid -F 'NAME="@name@"\nHASH=@hash@\n' | |
194
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
116 |
64 | 117 NAME="Anal'ogue" |
118 HASH=6d5b7f0ff092e55abf27c37c8bc3fc64 | |
152
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
119 |
153
e3be2ae6120e
Delete trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents:
152
diff
changeset
|
120 --- --- --- --- --- --- --- --- --- --- |
152
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
121 |
193 | 122 You could, for example create SQL INSERT statements: |
123 | |
124 $ sidinfo Anal_ogue.sid -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n" | |
125 | |
126 INSERT INTO sometable (filename,name,author) VALUES ('./Anal_ogue.sid', 'Anal\'ogue', 'Søren Lund (Jeff)', '1996 Jeff') | |
127 | |
128 --- --- --- --- --- --- --- --- --- --- | |
129 | |
152
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
130 Furthermore, you can use "printf"-style format specifiers for |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
131 formatting each @field@, see this example: |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
132 |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
133 $ sidinfo Anal_ogue.sid -F 'NAME=@name:"%-64s"@\nHASH=@hash:"%64s"@\nLOAD_ADDR=@loadaddr:$%04x@\n' |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
134 NAME="Anal'ogue " |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
135 HASH=" 6d5b7f0ff092e55abf27c37c8bc3fc64" |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
136 LOAD_ADDR=$0fb0 |
44e1c1555d87
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
136
diff
changeset
|
137 |
194
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
138 Many of the format specifiers are supported, but not all, and obviously |
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
139 only integer/string formats are supported. |
193 | 140 |
141 --- --- --- --- --- --- --- --- --- --- | |
142 | |
143 Since sidinfo v0.7.6 it is also possible to automatically scan | |
144 and recurse directories via '-R' option, for example: | |
145 | |
146 $ sidinfo -R /misc/C64Music/*.sid | |
147 | |
194
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
148 The above will start from /misc/C64Music/ and scan any accessible |
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
149 subdirectories for files that match "*.sid" pattern and handle them. |
193 | 150 |
151 Using previous example about SQL inserts: | |
152 | |
153 $ sidinfo /misc/C64Music/*.sid -R -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n" | |
194
05e2332070a7
Fix some typos and cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
193
diff
changeset
|
154 |
282
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
155 --- --- --- --- --- --- --- --- --- --- |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
156 |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
157 SIDInfo 0.9 adds support for STIL database. Unfortunately controlling |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
158 the output of STIL information in the -F format string option is quite |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
159 limited, as all fields will be concatenated into one string. |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
160 |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
161 You can control field separator by specifying the -l -option and also |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
162 omit the field names by using -n option. |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
163 |
5936a3dc9755
Document the STIL related issues of -F formatting with few words.
Matti Hamalainen <ccr@tnsp.org>
parents:
248
diff
changeset
|
164 |