1
0

vga 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. .IR 9load (8).
  84. .TP
  85. .B -p
  86. print the current or expected register values at appropriate points depending on
  87. other options.
  88. .TP
  89. .B -v
  90. print a trace of the functions called.
  91. .TP
  92. .B -V
  93. print a verbose trace of the functions called.
  94. .TP
  95. .B -x " file"
  96. use
  97. .I file
  98. as the VGA database rather than
  99. .BR /lib/vgadb .
  100. .PP
  101. .I Mode
  102. is of the form
  103. .IB X x Y x Z
  104. , where
  105. .IR X ,
  106. .IR Y ,
  107. and
  108. .I Z
  109. are numbers specifying the display height, width, and depth respectively.
  110. The mode must appear in
  111. .B /lib/vgadb
  112. as a value for one of the monitor entries.
  113. The usual modes are
  114. .BR 640x480x[18] ,
  115. .BR 800x600x[18] ,
  116. .BR 1024x768x[18][i] ,
  117. .BR 1280x1024x[18][i] ,
  118. .BR 1376x1024x8 ,
  119. and
  120. .BR 1600x1200x8 .
  121. A trailing
  122. .L i
  123. indicates interlaced operation.
  124. The default mode is
  125. .BR 640x480x8 .
  126. .I Size
  127. is of the form
  128. .I X x Y
  129. and configures the display to have a virtual
  130. screen of the given size.
  131. The physical screen will pan to follow the mouse.
  132. This is useful on displays with small screens,
  133. such as laptops, but can be confusing.
  134. .PP
  135. Using the monitor name
  136. .B vesa
  137. instructs
  138. .I vga
  139. to use VESA BIOS calls to configure the display.
  140. There are no entries for the
  141. .B vesa
  142. monitor in
  143. .IR vgadb .
  144. For a list of available VESA modes, use
  145. .IP
  146. .EX
  147. aux/vga -m vesa -p
  148. .EE
  149. .PP
  150. Loading the special mode
  151. .BR text :
  152. .IP
  153. .EX
  154. aux/vga -l text
  155. .EE
  156. .PP
  157. switches out of graphics mode back into text mode.
  158. It uses the VESA BIOS.
  159. .SH EXAMPLES
  160. Change the display resolution:
  161. .IP
  162. .EX
  163. aux/vga -l 1600x1200x8
  164. .EE
  165. .PP
  166. Print the current VGA controller registers.
  167. It is usually best to redirect the output of a
  168. .B -p
  169. command to a file to prevent confusion caused by using the VGA
  170. controller while trying to dump its state:
  171. .IP
  172. .EX
  173. aux/vga -p >/tmp/x
  174. .EE
  175. .PP
  176. Force the VGA controller to a known state:
  177. .IP
  178. .EX
  179. aux/vga -m vga -l
  180. .EE
  181. .PP
  182. Print the current VGA controller state and what would be loaded
  183. into it for a new resolution, but don't do the load:
  184. .IP
  185. .EX
  186. aux/vga -ip 1376x1024x8 >/tmp/x
  187. .EE
  188. .PP
  189. .SH FILES
  190. .TF /env/monitor
  191. .TP
  192. .B /env/monitor
  193. display type (default
  194. .IR vga ).
  195. .TP
  196. .B /lib/vgadb
  197. VGA configuration file.
  198. .SH SOURCE
  199. .B /sys/src/cmd/aux/vga
  200. .SH SEE ALSO
  201. .IR vga (3),
  202. .IR vgadb (6),
  203. .IR 9load (8)
  204. .SH BUGS
  205. .B Aux/vga
  206. makes every effort possible to verify that the mode it is about
  207. to load is valid and will bail out with an error message
  208. before setting any registers if it encounters a problem.
  209. However, things can go wrong, especially when playing with a
  210. new VGA controller or monitor setting.
  211. It is useful in such cases to have
  212. the above command for setting the controller to a known state
  213. at your fingertips.