Mercurial > hg > dmlib
annotate README.txt @ 1266:c43c8e5118a0
Merged.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 25 May 2015 12:58:37 +0300 |
parents | 75e20c34bb6a |
children | 7eedcf1d5af7 |
rev | line source |
---|---|
425 | 1 ----------------------------------------------------------------------- |
2 | |
3 T N S P | |
4 - --==============-- - | |
5 | |
6 ###### ### ## ### ### ###### | |
7 # ### ## #### ### ### ### ### ## # | |
8 # # ### ## ######## ### ### ###### # # | |
9 # ### ## ### # ## ### ### ### ## # | |
10 ###### ### ## ###### ### ###### | |
11 | |
12 Demo engine / development and utility framework | |
13 | |
14 ----------------------------------------------------------------------- | |
862 | 15 |
470 | 16 Programmed and designed by Matti Hämäläinen (ccr/TNSP) |
1251 | 17 (C) Copyright 2015 Tecnic Software productions (TNSP) |
890
6a2a286f3d70
Remove license duplicate from README.
Matti Hamalainen <ccr@tnsp.org>
parents:
882
diff
changeset
|
18 Please see the file "COPYING" for license. |
425 | 19 |
20 Contact | |
21 ======= | |
22 IRC : ccr @ IRCNet, sometimes also Freenode | |
23 e-mail : ccr@tnsp.org | |
24 | |
862 | 25 |
425 | 26 ----------------------------------------------------------------------- |
27 | |
862 | 28 |
425 | 29 So, what is this? |
30 ================= | |
31 Basically .. a bunch of more and/or less random stuff. dmlib in | |
32 itself is a library with various things useful in demo programming. | |
33 There is a resource management subsystem, functions for loading | |
34 PNG and JPEG images. Software blitted and scaled sprites, etc. | |
35 Bitmap font routines. A XM module replayer. | |
36 | |
37 And a work-in-progress timeline-supporting demo framework, with | |
38 a Qt based GUI editor. | |
39 | |
40 And graphics converter and displayer for various restricted formats, | |
41 such as C64/VIC-20 characters, bitmaps, sprites, etc. | |
42 | |
43 .. So, yeah. There are many things in here. It's a junkyard of various | |
882 | 44 demo- or such development related pieces of code and utilities. Many |
45 parts can be disabled during compile-time from config.mak | |
425 | 46 |
47 Most modules can be enabled or disabled, per project basis via | |
48 compile-time configuration in config.mak. | |
49 | |
862 | 50 |
425 | 51 ----------------------------------------------------------------------- |
52 | |
862 | 53 |
425 | 54 Requirements |
55 ============ | |
56 The compilation and usage of these utilities requires following | |
57 software packages or functional equivalents installed: | |
58 | |
59 - GCC 4.x or later (4.6.3 and 4.7.1 used in development.) | |
60 - GNU binutils | |
61 - GNU Make | |
62 - pkg-config | |
63 | |
862 | 64 You will also want these libraries: |
425 | 65 |
862 | 66 - libSDL 1.2, preferably the latest stable version. |
882 | 67 - zlib |
425 | 68 - libPNG 1.2 and development headers (more optional, |
69 only required for PNG write and read support by some | |
70 utilities.) | |
71 - SDL_ttf 2.0 and libfreetype2 | |
72 - Tremor (integer-based Ogg Vorbis decoder) + libogg | |
73 | |
862 | 74 And the demo editor framework requires (but it is not yet |
75 usable anyway, so you may as well skip these): | |
425 | 76 |
77 - Qt 4.x framework libraries (tested with 4.7 and 4.8.2) | |
78 - qmake, moc | |
79 | |
80 | |
81 For Linux -> Win32/64 cross-compilation I have used the standard | |
82 MinGW packages from Debian Testing (wheezy): | |
83 | |
84 gcc-mingw-w64 mingw-w64-i686-dev mingw-w64-x86-64-dev | |
85 | |
86 with the additions of self- cross-compiled libSDL, zlib, Tremor, | |
87 liboff and libPNG. Some of those require a bit of poking to get | |
88 working properly, YMMV. | |
89 | |
90 Please don't ask me for help to get cross-compilation working. | |
91 | |
862 | 92 |
425 | 93 ----------------------------------------------------------------------- |
94 | |
862 | 95 |
425 | 96 How to build |
97 ============ | |
98 1) $ cp config.mak.in config.mak | |
99 | |
100 2) Edit config.mak to enable/disable desired options. | |
101 Make sure you have the required depencies. | |
102 | |
103 3) $ gmake | |
104 or, if cross-compiling to Win32 via MinGW | |
105 $ gmake -f Makefile.w32 | |
106 | |
107 4) If it works -> Happy fun times \:D\ | |
108 | |
862 | 109 |
425 | 110 ----------------------------------------------------------------------- |
111 | |
882 | 112 |
425 | 113 Included utilities |
114 ================== | |
115 | |
116 xm2jss | |
117 ------ | |
118 Convert XM modules to internal JMOD format. You can optionally | |
119 even strip out various parts, such as complete instruments | |
120 (leaving only pattern data), sample data, sample instruments, | |
121 etc. | |
122 | |
123 | |
945
47f111643745
Viewmode utility was renamed to dumpmod, so reflect that change in the
Matti Hamalainen <ccr@tnsp.org>
parents:
890
diff
changeset
|
124 dumpmod |
425 | 125 ------- |
126 Simple XM/JMOD viewer. Dumps selected parts into stdout | |
127 as text format data. | |
128 | |
129 | |
130 ppl | |
131 --- | |
132 A simple XM/JMOD player with SDL-based UI. | |
133 | |
134 testpl | |
135 ------ | |
136 Even simpler player, with no UI at all. Uses SDL for audio. | |
137 | |
138 mod2wav | |
139 ------- | |
140 Render XM/JMOD modules into WAV files. | |
141 | |
142 | |
143 packed | |
144 ------ | |
145 Manipulate DMPACK files. Basically a bit like ZIP archive, | |
146 for glueing resource files into a zlib-compressed blob. | |
147 The dmlib resource subsystem can utilize these files. | |
148 | |
149 fontconv | |
150 -------- | |
151 Convert bitmap fonts. | |
152 | |
153 | |
154 objlink | |
155 ------- | |
156 Simple, but versatile commandline utility for combining binary | |
157 files into one file. Understands 2-byte loading address PRG | |
158 style files, and raw data. "Loading addresses" can be specified | |
159 and overridden. The utility also checks for overlaps, etc. | |
160 | |
161 data2inc | |
162 -------- | |
163 Simple data file to C/ASM source converter. | |
164 | |
165 gfxconv | |
166 ------- | |
450
acea24b77bdc
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
425
diff
changeset
|
167 Utility for "dumping" and converting various graphics in plain |
acea24b77bdc
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
425
diff
changeset
|
168 ASCII, or ANSI colored output, or into various image formats |
458
096dae79ce2e
Add ILBM to supported list.
Matti Hamalainen <ccr@tnsp.org>
parents:
450
diff
changeset
|
169 (including PNG, PCX, PPM, IFF ILBM and ARAW files). |
425 | 170 |
171 Input can be interpreted as bitmap, sprite or character data, | |
172 in multicolor or single color. Colors can be mapped as desired. | |
173 Image file output can be either single image (with chars/sprites | |
174 placed vertically if input is char/sprite data), or in separate | |
175 files. | |
176 | |
177 (Note: PNG support is a compile-time option) | |
178 | |
179 view64 | |
180 ------ | |
181 Compiled only if libSDL support is enabled. Can be used to | |
182 display C64 bitmaps. | |
183 | |
862 | 184 |
425 | 185 ----------------------------------------------------------------------- |
186 | |
862 | 187 |
425 | 188 Examples |
189 ======== | |
190 | |
191 data2inc | |
192 -------- | |
193 To convert a data file to a C structure using 'uint8_t' as type: | |
194 | |
195 $ data2inc -C -n variable_name -t uint8_t input.bin output.h | |
196 | |
197 | |
198 objlink | |
199 ------- | |
200 $ objlink -o intro.tmp -pppp intro.o gfx/dkdlogo2.drp:0x3800 \ | |
201 muzak.prg gfx/chars_4.fnt:0x6800 | |
202 | |
203 - "-o intro.tmp" sets output file | |
204 - As you can see, short options can be combined, like "-pppp". | |
205 However, the next parameters must be the corresponding option | |
206 arguments, in correct order, if any. | |
207 - It is possible to specify a overriding loading address via | |
208 ":<addr>" syntax. See the help for more information. | |
209 | |
210 | |
211 gfxconv | |
212 ------- | |
491 | 213 |
214 Image input to C64 char font conversion: | |
215 | |
216 $ gfxconv font16x16.pcx -f chr -o font16x16.chr | |
217 | |
218 - Input file "font16x16.pcx" is a paletted PCX image (preferably 2-colors), | |
219 containing a 16x16 pixel font. | |
220 - "-f chr" specifies conversion to c64 char memory format, gfxconv | |
221 splits the input image to 8x8 blocks, outputting them in sequence. | |
222 | |
223 | |
224 Convert input image to IFFMaster ARAW + assembler include file, | |
225 while remapping some palette entries: | |
226 | |
227 $ gfxconv -R "#000000:0" -f araw -i image -B 3 input.png -o output.raw | |
228 | |
229 - "-R #000000:0" remaps all input image palette colors matching RGB | |
230 hex triplet #000000 to palette index 0. | |
231 - "-f araw" specifies output format to be IFFMaster ARAW. | |
232 - "-B 3" _clamps_ output to be 3 bitplanes. Any bits above those are | |
233 simply discarded. | |
234 | |
235 | |
236 C64 char font to PNG imge conversion: | |
237 | |
425 | 238 $ gfxconv chars1.fnt -i char -s 2 -S 10 -c 255:1 -f png -o chars1.png |
239 | |
240 - Input file "chars1.fnt" is interpreted as character data (-i char) | |
241 - "-s 2" skips first two bytes of the input file (loading address) | |
242 - "-S 10" scales output image to be 10 times larger | |
243 - "-c 255:1" defines background color (bit value 0) to be transparent | |
244 (255, only works for PNG) and foreground to be C64 color 1 (white) | |
245 - "-f png" sets output format to PNG | |
246 | |
247 | |
491 | 248 Extract sprites from a C64 memory dump, convert to PNG: |
249 | |
425 | 250 $ gfxconv bub_dump.raw -i s -s 0x5800 -n 20 -f png -o bub \ |
251 -q -S 3 -m -c 255:2:5:1 | |
252 | |
253 - Input file "bub_dump.raw" is a raw memory dump of Bubble Bobble | |
254 extracted via VICE in game running mode. | |
255 - "-i s" sets input to be interpreted as sprite data | |
256 - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the | |
257 input is a straight memory dump file. | |
258 - "-n 20" sets max item count to 20, so 20 sprites will be dumped. | |
259 - "-o bub" sets filename prefix to "bub" | |
260 - "-q" selects sequential output (separate files) | |
261 - "-m" selects multicolor input | |
262 - "-c 255:2:5:1" sets the multicolor color mappings | |
263 (255 is the transparency color again) | |
264 | |
491 | 265 |
425 | 266 $ gfxconv chars3.fnt -i c -s 2 -n 3 |
267 | |
268 Dump as character data into stdout, skipping 2 bytes at start, and | |
269 limit output to 3 items (characters). | |
270 | |
271 ---- : -------------- #0 | |
272 0002 : ........ | |
273 0003 : ..####.. | |
274 0004 : .#....#. | |
275 0005 : #..##..# | |
276 0006 : #.#....# | |
277 0007 : #..##..# | |
278 0008 : .#....#. | |
279 0009 : ..####.. | |
280 ---- : -------------- #1 | |
281 000a : ........ | |
282 000b : ...##... | |
283 000c : ..#..#.. | |
284 000d : ..####.. | |
285 000e : .##..#.. | |
286 000f : .##..#.. | |
287 0010 : .##..#.. | |
288 0011 : ........ | |
289 ---- : -------------- #2 | |
290 0012 : ........ | |
291 0013 : ..###... | |
292 0014 : ..#..#.. | |
293 0015 : ..###... | |
294 0016 : .##..#.. | |
295 0017 : .##..#.. | |
296 0018 : .####... | |
297 0019 : ........ | |
298 | |
862 | 299 |
425 | 300 ----------------------------------------------------------------------- |