home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Examples / DriverKit / QVision / QVision_reloc.tproj / QVisionModes.c < prev    next >
C/C++ Source or Header  |  1996-03-26  |  21KB  |  772 lines

  1. /*
  2.  * Copyright (c) 1993-1996 by NeXT Software, Inc. as an unpublished work.
  3.  * All rights reserved.
  4.  *
  5.  * QVisionModes.c -- support for QVision driver modes.
  6.  *
  7.  * 09 Oct 1995    Rakesh Dubey
  8.  *    Added more modes.
  9.  * Author:  Derek B Clegg    21 May 1993
  10.  * Based on work by Joe Pasqua, 30 September 1992.
  11.  */
  12.  
  13. #include "QVisionModes.h"
  14.  
  15. /* Tables of register values for the supported modes. */
  16.  
  17. /* QVision 1024 x 768 x 8 (QVision mode 0x38) @ 60Hz.
  18.  */
  19. static const struct QVisionMode Mode_38_60Hz = {
  20.     "QVision[1024 x 768 x 8] @ 60Hz", QVisionAdapter, NO,
  21.  
  22.     /* Control register 1 value (63CA).  */
  23.     0x03,
  24.  
  25.     /* DAC command register 1 value (13C8). */
  26.     0x40,
  27.  
  28.     /* Overflow register 1 value (3CF.42). */
  29.     0x00,
  30.  
  31.     /* Overflow register 2 value (3CF.51). */
  32.     0x00,
  33.  
  34.     /* Standard VGA data. */
  35.     {
  36.     0xe3,    /* Miscellaneous output register value (3C2). */
  37.     0x00,    /* Feature control register value (3DA). */
  38.  
  39.     /* Sequencer register values. */
  40.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  41.  
  42.     /* CRTC register values (3D5.00 - 3D5.18). */
  43.     {
  44.         0x9b, 0x7f, 0x7f, 0x9e, 0x87, 0x17, 0x31, 0xf5, 0x00, 0x60, 0x00,
  45.         0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x94, 0xff, 0x80, 0x00, 0xff,
  46.         0x31, 0xe3, 0xff,
  47.     },
  48.  
  49.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  50.     {
  51.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  52.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  53.     },
  54.  
  55.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  56.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  57.     }
  58. };
  59.  
  60. /* QVision 1024 x 768 x 8 (QVision mode 0x38) @ 66Hz.
  61.  */
  62. static const struct QVisionMode Mode_38_66Hz = {
  63.     "QVision[1024 x 768 x 8] @ 66Hz", QVisionAdapter, NO,
  64.     
  65.     /* Control register 1 value (63CA).  */
  66.     0x03,
  67.  
  68.     /* DAC command register 1 value (13C8). */
  69.     0x40,
  70.  
  71.     /* Overflow register 1 value (3CF.42). */
  72.     0x00,
  73.  
  74.     /* Overflow register 2 value (3CF.51). */
  75.     0x00,
  76.  
  77.     /* Standard VGA data. */
  78.     {
  79.     0x27,    /* Miscellaneous output register value (3C2). */
  80.     0x00,    /* Feature control register value (3DA). */
  81.  
  82.     /* Sequencer register values. */
  83.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  84.  
  85.     /* CRTC register values (3D5.00 - 3D5.18). */
  86.     {
  87.         0xa1, 0x7f, 0x7f, 0x84, 0x85, 0x9b, 0x2e, 0xf5, 0x00, 0x60, 0x00,
  88.         0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8b, 0xff, 0x80, 0x00, 0xff,
  89.         0x2e, 0xe3, 0xff,
  90.     },
  91.  
  92.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  93.     {
  94.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  95.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  96.     },
  97.  
  98.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  99.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  100.     }
  101. };
  102.  
  103. /* QVision 1024 x 768 x 8 (QVision mode 0x38) @ 72Hz.
  104.  */
  105. static const struct QVisionMode Mode_38_72Hz = {
  106.     "QVision[1024 x 768 x 8] @ 72Hz", QVisionAdapter, NO,
  107.  
  108.     /* Control register 1 value (63CA).  */
  109.     0x03,
  110.  
  111.     /* DAC command register 1 value (13C8). */
  112.     0x40,
  113.  
  114.     /* Overflow register 1 value (3CF.42). */
  115.     0x00,
  116.  
  117.     /* Overflow register 2 value (3CF.51). */
  118.     0x00,
  119.  
  120.     /* Standard VGA data. */
  121.     {
  122.     0x2b,    /* Miscellaneous output register value (3C2). */
  123.     0x00,    /* Feature control register value (3DA). */
  124.  
  125.     /* Sequencer register values. */
  126.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  127.  
  128.     /* CRTC register values (3D5.00 - 3D5.18). */
  129.     {
  130.         0x9e, 0x7f, 0x7f, 0x81, 0x83, 0x93, 0x1e, 0xf1, 0x00, 0x60, 0x00,
  131.         0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x83, 0xff, 0x80, 0x00, 0xff,
  132.         0x1e, 0xe3, 0xff,
  133.     },
  134.  
  135.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  136.     {
  137.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  138.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  139.     },
  140.     
  141.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  142.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  143.     }
  144. };
  145.  
  146. /* Orion12 1024 x 768 x 8 (QVision mode 0x38) @ 76Hz.
  147.  */
  148. static const struct QVisionMode Mode_38_76Hz = {
  149.     "Orion12[1024 x 768 x 8] @ 76Hz", Orion12Adapter, YES,
  150.  
  151.     /* Control register 1 value (63CA).  */
  152.     0x03,
  153.  
  154.     /* DAC command register 1 value (13C8). */
  155.     0x40,
  156.  
  157.     /* Overflow register 1 value (3CF.42). */
  158.     0x00,
  159.  
  160.     /* Overflow register 2 value (3CF.51). */
  161.     0x00,
  162.  
  163.     /* Standard VGA data. */
  164.     {
  165.     0x33,    /* Miscellaneous output register value (3C2). */
  166.     0x00,    /* Feature control register value (3DA). */
  167.  
  168.     /* Sequencer register values. */
  169.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  170.  
  171.     /* CRTC register values (3D5.00 - 3D5.18). */
  172.     {
  173.         0x9c, 0x7f, 0x7f, 0x1f, 0x85, 0x10, 0x26, 0xf5, 0x00, 0x60, 0x00,
  174.         0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x8b, 0xff, 0x80, 0x00, 0xff,
  175.         0x26, 0xe3, 0xff,
  176.     },
  177.     
  178.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  179.     {
  180.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  181.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  182.     },
  183.     
  184.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  185.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  186.     }
  187. };
  188.  
  189. /* QVision 640 x 400 x 24 (QVision mode 0x4E) @ 60Hz.
  190.  */
  191. static const struct QVisionMode Mode_4E_60Hz = {
  192.     "QVision[640 x 400 x 24] @ 60Hz", QVisionAdapter, NO,
  193.  
  194.     /* Control register 1 value (63CA). */
  195.     0x07,
  196.  
  197.     /* DAC command register 1 value (13C8). */
  198.     0x00,
  199.  
  200.     /* Overflow register 1 value (3CF.42). */
  201.     0x01,
  202.  
  203.     /* Overflow register 2 value (3CF.51). */
  204.     0x08,
  205.  
  206.     /* Standard VGA data. */
  207.     {
  208.     0x6f,    /* Miscellaneous output register value (3C2). */
  209.     0x00,    /* Feature control register value (3DA). */
  210.  
  211.     /* Sequencer register values. */
  212.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  213.     
  214.     /* CRTC register values (3D5.00 - 3D5.18). */
  215.     {
  216.         0x5f, 0x4f, 0x50, 0x81, 0x53, 0x9f, 0x0b, 0x3e, 0x00, 0x40, 0x00,
  217.         0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x84, 0x8f, 0x40, 0x00, 0x95,
  218.         0x03, 0xe3, 0xff,
  219.     },
  220.     
  221.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  222.     {
  223.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  224.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  225.     },
  226.     
  227.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  228.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  229.     }    
  230. };
  231.  
  232. /* QVision 640 x 400 x 24 (QVision mode 0x4E) @ 70Hz.
  233.  */
  234. static const struct QVisionMode Mode_4E_70Hz = {
  235.     "QVision[640 x 400 x 24] @ 70Hz", QVisionAdapter, NO,
  236.  
  237.     /* Control register 1 value (63CA). */
  238.     0x07,
  239.  
  240.     /* DAC command register 1 value (13C8). */
  241.     0x00,
  242.  
  243.     /* Overflow register 1 value (3CF.42). */
  244.     0x01,
  245.  
  246.     /* Overflow register 2 value (3CF.51). */
  247.     0x28,
  248.  
  249.     /* Standard VGA data. */
  250.     {
  251.     0x6f,    /* Miscellaneous output register value (3C2). */
  252.     0x00,    /* Feature control register value (3DA). */
  253.  
  254.     /* Sequencer register values. */
  255.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  256.  
  257.     /* CRTC register values (3D5.00 - 3D5.18). */
  258.     {
  259.         0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 0x00, 0x40, 0x00,
  260.         0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x8e, 0x8f, 0x40, 0x00, 0x96,
  261.         0xb9, 0xe3, 0xff,
  262.     },
  263.     
  264.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  265.     {
  266.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  267.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  268.     },
  269.     
  270.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  271.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  272.     }
  273. };
  274.  
  275. /* QVision 800 x 600 x 15 (QVision mode 0x3F) @ 60Hz.
  276.  */
  277. static const struct QVisionMode Mode_3F_60Hz = {
  278.     "QVision[800 x 600 x 15] @ 60Hz", QVisionAdapter, NO,
  279.  
  280.     /* Control register 1 value (63CA). */
  281.     0x05,
  282.  
  283.     /* DAC command register 1 value (13C8). */
  284.     0x20,
  285.  
  286.     /* Overflow register 1 value (3CF.42). */
  287.     0x00,
  288.  
  289.     /* Overflow register 2 value (3CF.51). */
  290.     0x20,
  291.  
  292.     /* Standard VGA data. */
  293.     {
  294.     0xf3,    /* Miscellaneous output register value (3C2). */
  295.     0x00,    /* Feature control register value (3DA). */
  296.  
  297.     /* Sequencer register values. */
  298.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  299.     
  300.     /* CRTC register values (3D5.00 - 3D5.18). */
  301.     {
  302.         0x7f, 0x63, 0x64, 0x80, 0x68, 0x19, 0x73, 0xf0, 0x00, 0x60, 0x00,
  303.         0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x8c, 0x57, 0xc8, 0x00, 0x58,
  304.         0x72, 0xe3, 0xff,
  305.     },
  306.     
  307.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  308.     {
  309.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  310.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  311.     },
  312.     
  313.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  314.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  315.     }
  316. };
  317.  
  318. /* QVision 800 x 600 x 15 (QVision mode 0x3F) @ 72Hz.
  319.  */
  320. static const struct QVisionMode Mode_3F_72Hz = {
  321.     "QVision[800 x 600 x 15] @ 72Hz", QVisionAdapter, NO,
  322.  
  323.     /* Control register 1 value (63CA). */
  324.     0x05,
  325.  
  326.     /* DAC command register 1 value (13C8). */
  327.     0x20,
  328.  
  329.     /* Overflow register 1 value (3CF.42). */
  330.     0x00,
  331.  
  332.     /* Overflow register 2 value (3CF.51). */
  333.     0x20,
  334.  
  335.     /* Standard VGA data. */
  336.     {
  337.     0x23,    /* Miscellaneous output register value (3C2). */
  338.     0x00,    /* Feature control register value (3DA). */
  339.  
  340.     /* Sequencer register values. */
  341.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  342.     
  343.     /* CRTC register values (3D5.00 - 3D5.18). */
  344.     {
  345.         0x84, 0x63, 0x64, 0x83, 0x6b, 0x1c, 0x73, 0xf0, 0x00, 0x60, 0x00,
  346.         0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x5c, 0x57, 0xc8, 0x00, 0x58,
  347.         0x72, 0xe3, 0xff,
  348.     },
  349.  
  350.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  351.     {
  352.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  353.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  354.     },
  355.     
  356.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  357.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  358.     }
  359. };
  360.  
  361. /* Orion12 1280 x 1024 x 8 (QVision mode 0x3A) @ 68Hz.
  362.  */
  363. static const struct QVisionMode Mode_3A_68Hz = {
  364.     "Orion12[1280 x 1024 x 8] @ 68Hz", Orion12Adapter, YES,
  365.  
  366.     /* Control register 1 value (63CA). */
  367.     0x03,
  368.  
  369.     /* DAC command register 1 value (13C8). */
  370.     0x40,
  371.  
  372.     /* Overflow register 1 value (3CF.42). */
  373.     0x81,
  374.  
  375.     /* Overflow Register 2 values (3CF.51h). */
  376.     0xe8,
  377.  
  378.     /* Standard VGA data. */
  379.     {
  380.     0x23,    /* Miscellaneous output register values (3C2). */
  381.     0x00,    /* Feature control register value (3DA). */
  382.  
  383.     /* Sequencer register values. */
  384.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  385.  
  386.     /* CRTC register values (3D5.00 - 3D5.18h) */
  387.     {
  388.         0xcf, 0x9f, 0x9f, 0x12, 0xa4, 0x19, 0x2e, 0x5a, 0x00, 0x60, 0x00,
  389.         0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x8b, 0xff, 0x00, 0x00, 0xff,
  390.         0x2e, 0xe3, 0xff,
  391.     },
  392.     
  393.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  394.     {
  395.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  396.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  397.     },
  398.     
  399.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  400.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  401.     }
  402. };
  403.  
  404. /* Orion 1024 x 768 x 15 (QVision mode 0x40) @ 60Hz.
  405.  */
  406. static const struct QVisionMode Mode_40_60Hz = {
  407.     "Orion[1024 x 768 x 15] @ 60Hz", OrionAdapter, NO,
  408.  
  409.     /* Control register 1 value (63CA). */
  410.     0x05,
  411.  
  412.     /* DAC command register 1 value (13C8). */
  413.     0x20,
  414.  
  415.     /* Overflow register 1 value (3CF.42). */
  416.     0x01,
  417.  
  418.     /* Overflow register 2 value (3CF.51). */
  419.     0x00,
  420.  
  421.     /* Standard VGA data. */
  422.     {
  423.     0xe3,    /* Miscellaneous output register values (3C2). */
  424.     0x00,    /* Feature control register value (3DA). */
  425.  
  426.     /* Sequencer register values. */
  427.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  428.     
  429.     /* CRTC register values (3D5.00 - 3D5.18). */
  430.     {
  431.         0x9b, 0x7f, 0x7f, 0x9e, 0x87, 0x17, 0x31, 0xf5, 0x00, 0x60, 0x00,
  432.         0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x94, 0xff, 0x00, 0x00, 0xff,
  433.         0x31, 0xe3, 0xff,
  434.     },
  435.     
  436.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  437.     {
  438.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  439.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  440.     },
  441.     
  442.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  443.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  444.     }
  445. };
  446.  
  447. /* Orion 1024 x 768 x 15 (QVision mode 0x40) @ 72Hz.
  448.  */
  449. static const struct QVisionMode Mode_40_72Hz = {
  450.     "Orion[1024 x 768 x 15] @ 72Hz", OrionAdapter, NO,
  451.  
  452.     /* Control register 1 value (63CA). */
  453.     0x05,
  454.  
  455.     /* DAC command register 1 value (13C8). */
  456.     0x20,
  457.  
  458.     /* Overflow register 1 value (3CF.42). */
  459.     0x01,
  460.  
  461.     /* Overflow register 2 value (3CF.51). */
  462.     0x00,
  463.  
  464.     /* Standard VGA data. */
  465.     {
  466.     0x2b,    /* Miscellaneous output register value (3C2). */
  467.     0x00,    /* Feature control register value (3DA). */
  468.  
  469.     /* Sequencer register values. */
  470.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  471.     
  472.     /* CRTC register values (3D5.00 - 3D5.18). */
  473.     {
  474.         0x9e, 0x7f, 0x7f, 0x81, 0x83, 0x93, 0x1e, 0xf1, 0x00, 0x60, 0x00,
  475.         0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x83, 0xff, 0x00, 0x00, 0xff,
  476.         0x1e, 0xe3, 0xff,
  477.     },
  478.     
  479.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  480.     {
  481.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  482.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  483.     },
  484.     
  485.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  486.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  487.     }
  488. };
  489.  
  490. /* Orion 640 x 480 x 24 (QVision mode 0x4F) @ 60Hz.
  491.  */
  492. static const struct QVisionMode Mode_4F_60Hz = {
  493.     "Orion[640 x 480 x 24] @ 60Hz", OrionAdapter, NO,
  494.  
  495.     /* Control register 1 values (63CA).  */
  496.     0x07,
  497.  
  498.     /* DAC command register 1 value (13C8). */
  499.     0x00,
  500.  
  501.     /* Overflow register 1 value (3CF.42). */
  502.     0x02,
  503.  
  504.     /* Overflow register 2 value (3CF.51). */
  505.     0x08,
  506.  
  507.     /* Standard VGA data. */
  508.     {
  509.     0xef,    /* Miscellaneous output register value (3C2). */
  510.     0x00,    /* Feature control register value (3DA). */
  511.  
  512.     /* Sequencer register values. */
  513.     { 0x01, 0x01, 0xff, 0x00, 0x0e },
  514.     
  515.     /* CRTC register values (3D5.00 - 3D5.18). */
  516.     {
  517.         0x5f, 0x4f, 0x50, 0x81, 0x53, 0x9f, 0x0b, 0x3e, 0x00, 0x40, 0x00,
  518.         0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x8c, 0xdf, 0x00, 0x00, 0xe5,
  519.         0x03, 0xe3, 0xff,
  520.     },
  521.  
  522.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  523.     {
  524.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  525.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  526.     },
  527.     
  528.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  529.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  530.     }
  531. };
  532.  
  533.  
  534. /*
  535.  * Orion 800 x 600 x 8 (QVision mode 0x34) @ 60Hz.
  536.  */
  537. static const struct QVisionMode Mode_34_60Hz = {
  538.     "Orion[800 x 600 x 8] @ 60Hz", OrionAdapter, NO,
  539.  
  540.     /* Control register 1 values (63CA).  */
  541.     0x03,
  542.  
  543.     /* DAC command register 1 value (13C8). */
  544.     0x40,
  545.  
  546.     /* Overflow register 1 value (3CF.42). */
  547.     0x00,
  548.  
  549.     /* Overflow register 2 value (3CF.51). */
  550.     0x20,
  551.  
  552.     /* Standard VGA data. */
  553.     {
  554.     0xf3,    /* Miscellaneous output register value (3C2). */
  555.     0x00,    /* Feature control register value (3DA). */
  556.  
  557.     /* Sequencer register values. */
  558.     { 0x03, 0x01, 0xff, 0x00, 0x0e },
  559.     
  560.     /* CRTC register values (3D5.00 - 3D5.18). */
  561.     {
  562.         0x7f, 0x63, 0x64, 0x80, 0x68, 0x19, 0x73, 0xf0, 0x00, 0x60, 0x00,
  563.         0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xbc, 0x57, 0x80, 0x00, 0x58,
  564.         0x72, 0xe3, 0xff,
  565.     },
  566.  
  567.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  568.     {
  569.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  570.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  571.     },
  572.     
  573.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  574.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  575.     }
  576. };
  577.  
  578.  
  579. /*
  580.  * Orion 800 x 600 x 8 (QVision mode 0x34) @ 72Hz.
  581.  */
  582. static const struct QVisionMode Mode_34_72Hz = {
  583.     "Orion[800 x 600 x 8] @ 72Hz", OrionAdapter, NO,
  584.  
  585.     /* Control register 1 values (63CA).  */
  586.     0x03,
  587.  
  588.     /* DAC command register 1 value (13C8). */
  589.     0x40,
  590.  
  591.     /* Overflow register 1 value (3CF.42). */
  592.     0x00,
  593.  
  594.     /* Overflow register 2 value (3CF.51). */
  595.     0x20,
  596.  
  597.     /* Standard VGA data. */
  598.     {
  599.     0x3f,    /* Miscellaneous output register value (3C2). */
  600.     0x00,    /* Feature control register value (3DA). */
  601.  
  602.     /* Sequencer register values. */
  603.     { 0x03, 0x01, 0xff, 0x00, 0x0e },
  604.     
  605.     /* CRTC register values (3D5.00 - 3D5.18). */
  606.     {
  607.         0x7d, 0x63, 0x63, 0x00, 0x6d, 0x1c, 0x98, 0xf0, 0x00, 0x60, 0x00,
  608.         0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xb2, 0x57, 0x80, 0x00, 0x57,
  609.         0x98, 0xe3, 0xff,
  610.     },
  611.  
  612.     /* Attribute controller register values (3C0.00 - 3C0.13). */
  613.     {
  614.         0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
  615.         0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00,
  616.     },
  617.     
  618.     /* Graphics controller register values (3CF.00 - 3CF.08). */
  619.     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff },
  620.     }
  621. };
  622.  
  623.  
  624. IODisplayInfo QVisionModeTable[] = {
  625.     /* 0: QVision 1024 x 768 x 8 (Mode 0x38) @ 60Hz. */
  626.     {
  627.     1024, 768, 1024, 1024, 60, 0,
  628.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  629.     0, (void *)&Mode_38_60Hz,
  630.     },
  631.  
  632.     /* 1: QVision 1024 x 768 x 8 (Mode 0x38) @ 66Hz. */
  633.     {
  634.     1024, 768, 1024, 1024, 66, 0,
  635.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  636.     0, (void *)&Mode_38_66Hz,
  637.     },
  638.  
  639.     /* 2: QVision 1024 x 768 x 8 (Mode 0x38) @ 72Hz. */
  640.     {
  641.     1024, 768, 1024, 1024, 72, 0,
  642.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  643.     0, (void *)&Mode_38_72Hz,
  644.     },
  645.  
  646.     /* 3: Orion12 1024 x 768 x 8 (Mode 0x38) @ 76Hz. */
  647.     {
  648.     1024, 768, 1024, 1024, 76, 0,
  649.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  650.     0, (void *)&Mode_38_76Hz,
  651.     },
  652.  
  653.     /* 4: QVision 640 x 400 x 24 (Mode 0x4E) @ 60Hz. */
  654.     {
  655.     640, 400, 640, 2560, 60, 0,
  656.     IO_24BitsPerPixel, IO_RGBColorSpace,"--------RRRRRRRRGGGGGGGGBBBBBBBB",
  657.     0, (void *)&Mode_4E_60Hz,
  658.     },
  659.  
  660.     /* 5: QVision 640 x 400 x 24 (Mode 0x4E) @ 70Hz. */
  661.     {
  662.     640, 400, 640, 2560, 70, 0,
  663.     IO_24BitsPerPixel, IO_RGBColorSpace,"--------RRRRRRRRGGGGGGGGBBBBBBBB",
  664.     0, (void *)&Mode_4E_70Hz,
  665.     },
  666.  
  667.     /* 6: QVision 800 x 600 x 15 (QVision mode 0x3F) @ 60Hz. */
  668.     {
  669.     800, 600, 800, 1600, 60, 0,
  670.     IO_15BitsPerPixel, IO_RGBColorSpace, "-RRRRRGGGGGBBBBB",
  671.     0, (void *)&Mode_3F_60Hz,
  672.     },
  673.  
  674.     /* 7: QVision 800 x 600 x 15 (Mode 0x3F) @ 72Hz. */
  675.     {
  676.     800, 600, 800, 1600, 72, 0,
  677.     IO_15BitsPerPixel, IO_RGBColorSpace, "-RRRRRGGGGGBBBBB",
  678.     0, (void *)&Mode_3F_72Hz,
  679.     },
  680.  
  681.     /* 8: Orion12 1280 x 1024 x 8 (Mode 0x3A) @ 68Hz. */
  682.     {
  683.     1280, 1024, 2048, 2048, 68, 0,
  684.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  685.     0, (void *)&Mode_3A_68Hz,
  686.     },
  687.  
  688.     /* 9: Orion 1024 x 768 x 15 (Mode 0x40) @ 60Hz. */
  689.     {
  690.     1024, 768, 1024, 2048, 60, 0,
  691.     IO_15BitsPerPixel, IO_RGBColorSpace, "-RRRRRGGGGGBBBBB",
  692.     0, (void *)&Mode_40_60Hz,
  693.     },
  694.  
  695.     /* 10: Orion 1024 x 768 x 15 (Mode 0x40) @ 72Hz. */
  696.     {
  697.     1024, 768, 1024, 2048, 72, 0,
  698.     IO_15BitsPerPixel, IO_RGBColorSpace, "-RRRRRGGGGGBBBBB",
  699.     0, (void *)&Mode_40_72Hz,
  700.     },
  701.  
  702.     /* 11: Orion 640 x 480 x 24 (Mode 0x4F) @ 60Hz. */
  703.     {
  704.     640, 480, 1024, 4096, 60, 0,
  705.     IO_24BitsPerPixel, IO_RGBColorSpace,"--------RRRRRRRRGGGGGGGGBBBBBBBB",
  706.     0, (void *)&Mode_4F_60Hz,
  707.     },
  708.  
  709.     /* 8-bit color modes */
  710.     /* 12: QVision 1024 x 768 x 8 (Mode 0x38) @ 60Hz. */
  711.     {
  712.     1024, 768, 1024, 1024, 60, 0,
  713.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  714.     0, (void *)&Mode_38_60Hz,
  715.     },
  716.  
  717.     /* 13: QVision 1024 x 768 x 8 (Mode 0x38) @ 66Hz. */
  718.     {
  719.     1024, 768, 1024, 1024, 66, 0,
  720.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  721.     0, (void *)&Mode_38_66Hz,
  722.     },
  723.  
  724.     /* 14: QVision 1024 x 768 x 8 (Mode 0x38) @ 72Hz. */
  725.     {
  726.     1024, 768, 1024, 1024, 72, 0,
  727.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  728.     0, (void *)&Mode_38_72Hz,
  729.     },
  730.  
  731.     /* 15: Orion12 1024 x 768 x 8 (Mode 0x38) @ 76Hz. */
  732.     {
  733.     1024, 768, 1024, 1024, 76, 0,
  734.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  735.     0, (void *)&Mode_38_76Hz,
  736.     },
  737.  
  738.     /* 16: Orion12 1280 x 1024 x 8 (Mode 0x3A) @ 68Hz. */
  739.     {
  740.     1280, 1024, 2048, 2048, 68, 0,
  741.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  742.     0, (void *)&Mode_3A_68Hz,
  743.     },
  744.     /* 17: Orion12 800 x 600 x 8 (Mode 0x34) @ 60Hz. */
  745.     {
  746.     800, 600, 1024, 1024, 60, 0,
  747.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  748.     0, (void *)&Mode_34_60Hz,
  749.     },
  750.     /* 18: Orion12 800 x 600 x 8 (Mode 0x34) @ 60Hz. */
  751.     {
  752.     800, 600, 1024, 1024, 60, 0,
  753.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  754.     0, (void *)&Mode_34_60Hz,
  755.     },
  756.     /* 19: Orion12 800 x 600 x 8 (Mode 0x34) @ 72Hz. */
  757.     {
  758.     800, 600, 1024, 1024, 72, 0,
  759.     IO_8BitsPerPixel, IO_RGBColorSpace, "PPPPPPPP",
  760.     0, (void *)&Mode_34_72Hz,
  761.     },
  762.     /* 20: Orion12 800 x 600 x 8 (Mode 0x34) @ 72Hz. */
  763.     {
  764.     800, 600, 1024, 1024, 72, 0,
  765.     IO_8BitsPerPixel, IO_OneIsWhiteColorSpace, "WWWWWWWW",
  766.     0, (void *)&Mode_34_72Hz,
  767.     },
  768. };
  769.  
  770. const int QVisionModeTableCount =
  771.     sizeof(QVisionModeTable)/sizeof(QVisionModeTable[0]);
  772.