Mercurial > hg > dmlib
annotate README.txt @ 1557:5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 May 2018 06:00:50 +0300 |
parents | e55426a0a010 |
children | 48dcde220a2e |
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) |
1277 | 17 (C) Copyright 2002-2017 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 | |
1354
a333081090ea
Documentation adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
59 - GCC 4.6 or later |
425 | 60 - GNU binutils |
61 - GNU Make | |
62 - pkg-config | |
63 | |
862 | 64 You will also want these libraries: |
425 | 65 |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1356
diff
changeset
|
66 - libSDL 2.0 |
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.) | |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1356
diff
changeset
|
71 - SDL_ttf for libSDL2 (optional, required for some things) |
425 | 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 |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1356
diff
changeset
|
77 - Qt 5.x framework libraries (tested with 5.7) |
425 | 78 |
79 | |
80 For Linux -> Win32/64 cross-compilation I have used the standard | |
81 MinGW packages from Debian Testing (wheezy): | |
82 | |
83 gcc-mingw-w64 mingw-w64-i686-dev mingw-w64-x86-64-dev | |
84 | |
85 with the additions of self- cross-compiled libSDL, zlib, Tremor, | |
86 liboff and libPNG. Some of those require a bit of poking to get | |
87 working properly, YMMV. | |
88 | |
89 Please don't ask me for help to get cross-compilation working. | |
90 | |
862 | 91 |
425 | 92 ----------------------------------------------------------------------- |
93 | |
862 | 94 |
425 | 95 How to build |
96 ============ | |
97 1) $ cp config.mak.in config.mak | |
98 | |
99 2) Edit config.mak to enable/disable desired options. | |
100 Make sure you have the required depencies. | |
101 | |
102 3) $ gmake | |
103 or, if cross-compiling to Win32 via MinGW | |
104 $ gmake -f Makefile.w32 | |
105 | |
106 4) If it works -> Happy fun times \:D\ | |
107 | |
862 | 108 |
425 | 109 ----------------------------------------------------------------------- |
110 | |
882 | 111 |
425 | 112 Included utilities |
113 ================== | |
114 | |
115 xm2jss | |
116 ------ | |
117 Convert XM modules to internal JMOD format. You can optionally | |
1354
a333081090ea
Documentation adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
118 optimize the module and even strip out various parts, such as |
a333081090ea
Documentation adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
119 complete instruments (leaving only pattern data), sample data, |
a333081090ea
Documentation adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1277
diff
changeset
|
120 sample instruments, etc. |
425 | 121 |
122 | |
945
47f111643745
Viewmode utility was renamed to dumpmod, so reflect that change in the
Matti Hamalainen <ccr@tnsp.org>
parents:
890
diff
changeset
|
123 dumpmod |
425 | 124 ------- |
125 Simple XM/JMOD viewer. Dumps selected parts into stdout | |
126 as text format data. | |
127 | |
128 | |
129 ppl | |
130 --- | |
131 A simple XM/JMOD player with SDL-based UI. | |
132 | |
133 testpl | |
134 ------ | |
135 Even simpler player, with no UI at all. Uses SDL for audio. | |
136 | |
137 mod2wav | |
138 ------- | |
139 Render XM/JMOD modules into WAV files. | |
140 | |
141 | |
142 packed | |
143 ------ | |
144 Manipulate DMPACK files. Basically a bit like ZIP archive, | |
145 for glueing resource files into a zlib-compressed blob. | |
146 The dmlib resource subsystem can utilize these files. | |
147 | |
148 fontconv | |
149 -------- | |
150 Convert bitmap fonts. | |
151 | |
152 | |
153 objlink | |
154 ------- | |
155 Simple, but versatile commandline utility for combining binary | |
156 files into one file. Understands 2-byte loading address PRG | |
157 style files, and raw data. "Loading addresses" can be specified | |
158 and overridden. The utility also checks for overlaps, etc. | |
159 | |
160 data2inc | |
161 -------- | |
162 Simple data file to C/ASM source converter. | |
163 | |
164 gfxconv | |
165 ------- | |
450
acea24b77bdc
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
425
diff
changeset
|
166 Utility for "dumping" and converting various graphics in plain |
acea24b77bdc
Update documentation a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
425
diff
changeset
|
167 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
|
168 (including PNG, PCX, PPM, IFF ILBM and ARAW files). |
425 | 169 |
170 Input can be interpreted as bitmap, sprite or character data, | |
171 in multicolor or single color. Colors can be mapped as desired. | |
172 Image file output can be either single image (with chars/sprites | |
173 placed vertically if input is char/sprite data), or in separate | |
174 files. | |
175 | |
176 (Note: PNG support is a compile-time option) | |
177 | |
178 view64 | |
179 ------ | |
180 Compiled only if libSDL support is enabled. Can be used to | |
181 display C64 bitmaps. | |
182 | |
862 | 183 |
425 | 184 ----------------------------------------------------------------------- |
185 | |
862 | 186 |
425 | 187 Examples |
188 ======== | |
189 | |
190 data2inc | |
191 -------- | |
192 To convert a data file to a C structure using 'uint8_t' as type: | |
193 | |
194 $ data2inc -C -n variable_name -t uint8_t input.bin output.h | |
195 | |
196 | |
197 objlink | |
198 ------- | |
199 $ objlink -o intro.tmp -pppp intro.o gfx/dkdlogo2.drp:0x3800 \ | |
200 muzak.prg gfx/chars_4.fnt:0x6800 | |
201 | |
202 - "-o intro.tmp" sets output file | |
203 - As you can see, short options can be combined, like "-pppp". | |
204 However, the next parameters must be the corresponding option | |
205 arguments, in correct order, if any. | |
206 - It is possible to specify a overriding loading address via | |
207 ":<addr>" syntax. See the help for more information. | |
208 | |
209 | |
210 gfxconv | |
211 ------- | |
491 | 212 |
1356
e55426a0a010
Add another gfxconv example.
Matti Hamalainen <ccr@tnsp.org>
parents:
1354
diff
changeset
|
213 Convert ILBM IFF to PNG: |
e55426a0a010
Add another gfxconv example.
Matti Hamalainen <ccr@tnsp.org>
parents:
1354
diff
changeset
|
214 |
e55426a0a010
Add another gfxconv example.
Matti Hamalainen <ccr@tnsp.org>
parents:
1354
diff
changeset
|
215 $ gfxconv -f png -o output.png input.lbm |
e55426a0a010
Add another gfxconv example.
Matti Hamalainen <ccr@tnsp.org>
parents:
1354
diff
changeset
|
216 |
e55426a0a010
Add another gfxconv example.
Matti Hamalainen <ccr@tnsp.org>
parents:
1354
diff
changeset
|
217 |
491 | 218 Image input to C64 char font conversion: |
219 | |
220 $ gfxconv font16x16.pcx -f chr -o font16x16.chr | |
221 | |
222 - Input file "font16x16.pcx" is a paletted PCX image (preferably 2-colors), | |
223 containing a 16x16 pixel font. | |
224 - "-f chr" specifies conversion to c64 char memory format, gfxconv | |
225 splits the input image to 8x8 blocks, outputting them in sequence. | |
226 | |
227 | |
228 Convert input image to IFFMaster ARAW + assembler include file, | |
229 while remapping some palette entries: | |
230 | |
231 $ gfxconv -R "#000000:0" -f araw -i image -B 3 input.png -o output.raw | |
232 | |
233 - "-R #000000:0" remaps all input image palette colors matching RGB | |
234 hex triplet #000000 to palette index 0. | |
235 - "-f araw" specifies output format to be IFFMaster ARAW. | |
236 - "-B 3" _clamps_ output to be 3 bitplanes. Any bits above those are | |
237 simply discarded. | |
238 | |
239 | |
240 C64 char font to PNG imge conversion: | |
241 | |
425 | 242 $ gfxconv chars1.fnt -i char -s 2 -S 10 -c 255:1 -f png -o chars1.png |
243 | |
244 - Input file "chars1.fnt" is interpreted as character data (-i char) | |
245 - "-s 2" skips first two bytes of the input file (loading address) | |
246 - "-S 10" scales output image to be 10 times larger | |
247 - "-c 255:1" defines background color (bit value 0) to be transparent | |
248 (255, only works for PNG) and foreground to be C64 color 1 (white) | |
249 - "-f png" sets output format to PNG | |
250 | |
251 | |
491 | 252 Extract sprites from a C64 memory dump, convert to PNG: |
253 | |
425 | 254 $ gfxconv bub_dump.raw -i s -s 0x5800 -n 20 -f png -o bub \ |
255 -q -S 3 -m -c 255:2:5:1 | |
256 | |
257 - Input file "bub_dump.raw" is a raw memory dump of Bubble Bobble | |
258 extracted via VICE in game running mode. | |
259 - "-i s" sets input to be interpreted as sprite data | |
260 - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the | |
261 input is a straight memory dump file. | |
262 - "-n 20" sets max item count to 20, so 20 sprites will be dumped. | |
263 - "-o bub" sets filename prefix to "bub" | |
264 - "-q" selects sequential output (separate files) | |
265 - "-m" selects multicolor input | |
266 - "-c 255:2:5:1" sets the multicolor color mappings | |
267 (255 is the transparency color again) | |
268 | |
491 | 269 |
425 | 270 $ gfxconv chars3.fnt -i c -s 2 -n 3 |
271 | |
272 Dump as character data into stdout, skipping 2 bytes at start, and | |
273 limit output to 3 items (characters). | |
274 | |
275 ---- : -------------- #0 | |
276 0002 : ........ | |
277 0003 : ..####.. | |
278 0004 : .#....#. | |
279 0005 : #..##..# | |
280 0006 : #.#....# | |
281 0007 : #..##..# | |
282 0008 : .#....#. | |
283 0009 : ..####.. | |
284 ---- : -------------- #1 | |
285 000a : ........ | |
286 000b : ...##... | |
287 000c : ..#..#.. | |
288 000d : ..####.. | |
289 000e : .##..#.. | |
290 000f : .##..#.. | |
291 0010 : .##..#.. | |
292 0011 : ........ | |
293 ---- : -------------- #2 | |
294 0012 : ........ | |
295 0013 : ..###... | |
296 0014 : ..#..#.. | |
297 0015 : ..###... | |
298 0016 : .##..#.. | |
299 0017 : .##..#.. | |
300 0018 : .####... | |
301 0019 : ........ | |
302 | |
862 | 303 |
425 | 304 ----------------------------------------------------------------------- |