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