]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/vga
hjfs: add users command, fix newuser ? documentation
[plan9front.git] / sys / man / 8 / vga
1 .TH VGA 8
2 .SH NAME
3 vga \- configure a VGA card
4 .SH SYNOPSIS
5 .B aux/vga
6 [
7 .B -BcdilpvV
8 ]
9 [
10 .B -b
11 .I bios-string
12 ]
13 [
14 .B -m
15 .I monitor
16 ]
17 [
18 .B -x
19 .I file
20 ]
21 [
22 .I mode
23 [
24 .I size
25 ]
26 ]
27 .SH DESCRIPTION
28 .I Vga
29 configures a VGA controller for various display sizes and depths.
30 Using the monitor type specified in
31 .B /env/monitor
32 (default
33 .BR vga )
34 and the
35 .I mode
36 given as argument
37 (default
38 .BR 640x480x1 ), 
39 .I vga
40 uses the database of known VGA controllers and monitors in
41 .B /lib/vgadb
42 (see
43 .IR vgadb (6))
44 to configure
45 the display via the devices provided by
46 .IR vga (3).
47 The options are:
48 .TP
49 .BI -b " bios-string"
50 use the VGA database entry corresponding to
51 .I bios-string
52 (e.g. 
53 \fL0xC0045="Stealth 64 DRAM Vers. 2.02"\fR)
54 rather than looking for identifying strings in the BIOS
55 memory.
56 .TP
57 .B -B
58 dump the BIOS memory (in hex) to standard output and exit.
59 .TP
60 .B -c
61 disable the use of the hardware graphics cursor.
62 .TP
63 .B -d
64 include the color palette in whatever actions are performed,
65 usually printing the contents.
66 .TP
67 .B -i
68 when used with
69 .B -p
70 display the register values that will be loaded.
71 .TP
72 .B -l
73 load the desired mode.
74 .TP
75 .BI -m " monitor"
76 override the
77 .B /env/monitor
78 value.
79 .B /env/monitor
80 is usually set by including it in the
81 .B plan9.ini
82 file read by the PC boot program.
83 .TP
84 .B -p
85 print the current or expected register values at appropriate points depending on
86 other options.
87 .TP
88 .B -v
89 print a trace of the functions called.
90 .TP
91 .B -V
92 print a verbose trace of the functions called.
93 .TP
94 .BI -x " file"
95 use 
96 .I file
97 as the VGA database rather than
98 .BR /lib/vgadb .
99 .PP
100 .I Mode
101 is of the form
102 .IB X x Y x Z
103 , where
104 .IR X ,
105 .IR Y ,
106 and
107 .I Z
108 are numbers specifying the display height, width, and depth respectively.
109 The mode must appear in 
110 .B /lib/vgadb
111 as a value for one of the monitor entries.
112 The usual modes are
113 .BR 640x480x[18] ,
114 .BR 800x600x[18] ,
115 .BR 1024x768x[18][i] ,
116 .BR 1280x1024x[18][i] ,
117 .BR 1376x1024x8 ,
118 and
119 .BR 1600x1200x8 .
120 A trailing
121 .L i
122 indicates interlaced operation.
123 The default mode is
124 .BR 640x480x8 .
125 .I Size
126 is of the form
127 .I X x Y
128 and configures the display to have a virtual
129 screen of the given size.
130 The physical screen will pan to follow the mouse.
131 This is useful on displays with small screens,
132 such as laptops, but can be confusing.
133 .PP
134 Using the monitor name
135 .B vesa
136 instructs
137 .I vga
138 to use VESA BIOS calls to configure the display.
139 Also, if our VGA controller can't be found in
140 .IR vgadb ,
141 .I vga
142 will try the VESA calls.
143 There are no entries for the
144 .B vesa
145 monitor in 
146 .IR vgadb .
147 For a list of available VESA modes, use
148 .IP
149 .EX
150 aux/vga -m vesa -p
151 .EE
152 .PP
153 Loading the special mode
154 .BR text :
155 .IP
156 .EX
157 aux/vga -l text
158 .EE
159 .PP
160 switches out of graphics mode back into text mode.
161 It uses the VESA BIOS.
162 .SH EXAMPLES
163 Change the display resolution:
164 .IP
165 .EX
166 aux/vga -l 1600x1200x8
167 .EE
168 .PP
169 Print the current VGA controller registers.
170 It is usually best to redirect the output of a
171 .B -p
172 command to a file to prevent confusion caused by using the VGA
173 controller while trying to dump its state:
174 .IP
175 .EX
176 aux/vga -p >/tmp/x
177 .EE
178 .PP
179 Force the VGA controller to a known state:
180 .IP
181 .EX
182 aux/vga -m vga -l
183 .EE
184 .PP
185 Print the current VGA controller state and what would be loaded
186 into it for a new resolution, but don't do the load:
187 .IP
188 .EX
189 aux/vga -ip 1376x1024x8 >/tmp/x
190 .EE
191 .PP
192 .SH FILES
193 .TF /env/monitor
194 .TP
195 .B /env/monitor
196 display type (default
197 .IR vga ).
198 .TP
199 .B /lib/vgadb
200 VGA configuration file.
201 .SH SOURCE
202 .B /sys/src/cmd/aux/vga
203 .SH SEE ALSO
204 .IR vga (3),
205 .IR vgadb (6),
206 .SH BUGS
207 .B Aux/vga
208 makes every effort possible to verify that the mode it is about
209 to load is valid and will bail out with an error message 
210 before setting any registers if it encounters a problem.
211 However, things can go wrong, especially when playing with a
212 new VGA controller or monitor setting.
213 It is useful in such cases to have
214 the above command for setting the controller to a known state
215 at your fingertips.