Daniel Borca's new DOS/DJGPP driver.
[mesa.git] / docs / README.DJ
1 Mesa 4.0.1 DOS/DJGPP Port version 0.1
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4
5
6 First of all...
7 ~~~~~~~~~~~~~~~
8
9 This is a DOS port for MESA 4.0.1. I didn't bother to consider any DOS C
10 compiler other than gcc, so this port was written using DJGPP v2. To be more
11 precise:
12 djdev 2.03
13 gcc v3.0.3
14 make v3.79
15
16 Almost all demos were compiled and ran succesfully on my system:
17 CPU: Intel Pentium w/ MMX @166 MHz
18 Mainboard: ViA Apollo VP2 w/ 128 MB SDRAM
19 Video card: Matrox Millenium I w/ 4096 kB WRAM, Matrox BIOS v3.0
20
21 Since I don't have access to any accelerated video hardware, this port is
22 entirely based on VESA/SuperVGA. My little attempt to use FreeBE/AF ended in
23 a failure, but that's another story: it seemed to work fine with my older
24 Matrox Millenium w/ 2MB, and then I got another Matrox Millenium w/ 4MB. The
25 problem with latter was it had a dead BIOS; I hot-flashed it and made it work
26 in all environments (Windows 95, VESA, etc) but FreeBE/AF.
27
28
29
30 Legal:
31 ~~~~~~
32
33 This software is distributed under the terms of the GNU Lesser General Public
34 License.
35
36 Source code written by others is subject to its respective copyright.
37
38
39
40 libGL (the core):
41 ~~~~~~~~~~~~~~~~~
42
43 Of course, MESA 4.0.1 core sources are required. It will probably work with
44 MESA 3.5, but not a chance with earlier versions due to major changes to the
45 MESA driver interface and the directory tree. All should compile succesfully.
46
47 The driver has its origins in ddsample.c, written by Brian Paul and found by
48 me in MESA 3.4.2. I touched almost all the functions, changing the coding
49 style ;-( Sorry!
50
51 Pitfalls:
52 1. The current version supports only RGB[A] modes, for it made no sense to me
53 to endorse color-index (aka palette) modes.
54 2. Only double-buffered is allowed because it was simpler to implement at
55 that moment. Single-buffered will appear soon, especially if I can find a
56 way to use hardware acceleration.
57 3. Another weird "feature" is that buffer width & height must be multiple of
58 4 (I'm a lazy programmer and I found that the easiest way to keep buffer
59 handling at peak performance ;-).
60 4. The video mode selector is tricky: it searches for the smallest mode which
61 will entirely contain the buffer at its current position. If you want a
62 small buffer in a high-res mode, try to position it very far to the right
63 (or down). I'd really use some ideas here!!!
64
65
66
67 libGLU:
68 ~~~~~~~
69
70 Mesa GLU sources are required. Everything should run smooth.
71
72
73
74 libGLUT (the toolkit):
75 ~~~~~~~~~~~~~~~~~~~~~~
76
77 Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
78 Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
79 not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
80 mouse and timer drivers were inspired from an old project of mine (D3Xl) and
81 fixed with some Allegro "infusions"; my deeply thanks to Shawn Hargreaves and
82 co.
83
84 My keyboard driver used only scancodes, but since GLUT requires ASCII values
85 for keys, I borrowed the translation tables (and maybe more) from Allegro.
86 Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
87 engine unconditionally: it will raise SIGINT, which in turn will call the
88 destructors (let's hope), thus cleaning up your/my mess ;-)
89
90 The mouse driver is far from complete (lack of positioning, drawing, etc),
91 but is enough to make almost all the demos work.
92
93 The timer is pretty versatile for it supports multiple timers with different
94 frequencies. It may not be the most accurate timer in the known universe, but
95 I think it's OK. Take this example: you have timer A with a very high rate,
96 and then you have timer B with very low rate compared to A; now, A ticks OK,
97 but timer B will probably loose precision!
98
99 As an addition, stdout and stderr are redirected and dumped upon exit. This
100 means that printf can be safely called during graphics, but all messages come
101 in bulk! A bit of a hack, I know, but I think it's better than to miss them
102 at all.
103
104 Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
105
106
107
108 Installation:
109 ~~~~~~~~~~~~~
110
111 Unzip into the MESA directory, and type "make -f Makefile.DJ" to compile all
112 libraries. Long filename support is required during compilation. The examples
113 are not built automagically (see Pitfalls above).
114
115
116
117 History:
118 ~~~~~~~~
119
120 v0.1 feb-2002 initial release
121 v0.2 ..soon..
122
123
124
125 Contact:
126 ~~~~~~~~
127
128 Name: Borca Daniel
129 E-mail: dborca@yahoo.com
130 WWW: http://www.geocities.com/dborca/