home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / spea / mirage / w95mip23 / w95mip23.exe / rar / V7I6T68.SDD / V7I6T68.SDD
Text File  |  1995-09-07  |  46KB  |  1,494 lines

  1. // 
  2. //  Copyright (c) 1995 SPEA Software AG All Rights Reserved
  3. // 
  4. //# @(#)v7i6t68.sdd  3.00   95/06/02 SPEA   (BIOS 5.03)
  5. // 
  6. //  v7i6t68.sdd  -  SVPMI File for V7-MIRAGE P-64 2MB
  7. // 
  8. //  1600x1200x8  62.1 / 49  kHz / Hz
  9. //  1280x1024x8  63.8 / 60  kHz / Hz
  10. //  1280x1024x4  63.8 / 60  kHz / Hz
  11. //  1152x864x8   55.4 / 60  kHz / Hz
  12. //  1024x768x16  60.5 / 75  kHz / Hz
  13. //  1024x768x8   60.3 / 75  kHz / Hz
  14. //  1024x768x4   60.3 / 75  kHz / Hz
  15. //  800x600x32   46.9 / 75  kHz / Hz
  16. //  800x600x16   46.8 / 75  kHz / Hz
  17. //  800x600x8    46.9 / 75  kHz / Hz
  18. //  800x600x4    46.9 / 75  kHz / Hz
  19. //  640x480x32   37.7 / 75  kHz / Hz
  20. //  640x480x16   37.3 / 75  kHz / Hz
  21. //  640x480x8    37.7 / 75  kHz / Hz
  22. //  640x400x32   31.4 / 70  kHz / Hz
  23. //  640x400x8    31.4 / 70  kHz / Hz
  24.  
  25. [VERSION]
  26.  1.0;
  27.  
  28. [ACTIVE_ADAPTER]
  29.  V7-MIRAGE P-64 2MB (bis 68 kHz Multiscan);
  30.  
  31. [ADAPTER]
  32.  V7-MIRAGE P-64 2MB (bis 68 kHz Multiscan);
  33.  
  34. [ADAPTER_INFO]
  35.  BoardType = VGA;
  36.  SaveSize = 100;
  37.  PaletteSize = 768;
  38.  //# MemorySize = 2048;
  39.  
  40. // ***********************************
  41. // 0x007C
  42. // ***********************************
  43. [MODE]
  44.  0x007C;
  45. [MODEINFO]
  46.     ModeAttributes      = 0x1b;
  47.     WinAAttributes      = 7;
  48.     WinBAttributes      = 0;
  49.     WinAGranularity     = 64;
  50.     WinBGranularity     = 64;
  51.     WinASize            = 64;
  52.     WinBSize            = 64;
  53.     WinABase            = 0xa0000;
  54.     WinBBase            = 0xa0000;
  55.     BytesPerScanline    = 1600;
  56.     XResolution         = 1600;
  57.     YResolution         = 1200;
  58.     XCharSize           = 8;
  59.     YCharSize           = 16;
  60.     Colormodel          = 1;
  61.     BitsPerPixel        = 8;
  62.     NumberOfColors      = 256;
  63.     BitsRGB             = 6;
  64.     NumberOfBanks       = 1;
  65.     BankSize            = 0;
  66.     MemoryModel         = 0x4;
  67.     NumberOfImagePages  = 0;
  68.  
  69. [SETMODE]
  70.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  71.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  72.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  73.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  74.  
  75.  r0  = 0x01; r1  = 0xc7; r2  = 0xc8; r3  = 0x81; r4  = 0xd3;
  76.  r5  = 0x13; r6  = 0x74; r7  = 0xe0; r8  = 0x00; r9  = 0x60;
  77.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  78.  r15 = 0x00; r16 = 0x58; r17 = 0x00; r18 = 0x57; r19 = 0xc8;
  79.  r20 = 0x00; r21 = 0x58; r22 = 0x00; r23 = 0xa3; r24 = 0xff;
  80.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  81.  
  82.  outb(0x3d4,0x3b);outb(0x3d5,0xfa);
  83.  outb(0x3d4,0x3c);outb(0x3d5,0x80);
  84.  outb(0x3d4,0x42);outb(0x3d5,0x20);
  85.  outb(0x3d4,0x54);outb(0x3d5,0x00);
  86.  outb(0x3d4,0x5d);outb(0x3d5,0x01);
  87.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  88.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  89.  outb(0x3d4,0x67);outb(0x3d5,0x10);
  90.  
  91.  
  92. // TRIO64 internal clock synthesis
  93.  
  94.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  95.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  96.  
  97. // M/N value: 246b, DCLK
  98.  
  99.  outb(0x3c4,0x12); outb(0x3c5,0x24);
  100.  outb(0x3c4,0x13); outb(0x3c5,0x6b);
  101.  outb(0x3c4,0x18); outb(0x3c5,0xc0);
  102.  outb(0x3c4,0x15); outb(0x3c5,0x12);
  103.  
  104. // Bit 2&3 set enable loading of DCLK parameters
  105.  outb(0x3c2,0x2f);
  106.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  107.  
  108.  
  109. //# [SPEA]
  110.  //# SerialWord = 0x246b;
  111.  //# DacMode = 0x5;
  112.  //# Cr42 = 0x29;
  113.  
  114. // ***********************************
  115. // 0x006F
  116. // ***********************************
  117. [MODE]
  118.  0x006F;
  119. [MODEINFO]
  120.     ModeAttributes      = 0x1b;
  121.     WinAAttributes      = 7;
  122.     WinBAttributes      = 0;
  123.     WinAGranularity     = 64;
  124.     WinBGranularity     = 64;
  125.     WinASize            = 64;
  126.     WinBSize            = 64;
  127.     WinABase            = 0xa0000;
  128.     WinBBase            = 0xa0000;
  129.     BytesPerScanline    = 1280;
  130.     XResolution         = 1280;
  131.     YResolution         = 1024;
  132.     XCharSize           = 8;
  133.     YCharSize           = 16;
  134.     Colormodel          = 1;
  135.     BitsPerPixel        = 8;
  136.     NumberOfColors      = 256;
  137.     BitsRGB             = 6;
  138.     NumberOfBanks       = 1;
  139.     BankSize            = 0;
  140.     MemoryModel         = 0x4;
  141.     NumberOfImagePages  = 0;
  142.  
  143. [SETMODE]
  144.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  145.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  146.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  147.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  148.  
  149.  r0  = 0xd7; r1  = 0x9f; r2  = 0xa0; r3  = 0x1a; r4  = 0xa5;
  150.  r5  = 0x1d; r6  = 0x1e; r7  = 0x52; r8  = 0x00; r9  = 0x40;
  151.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  152.  r15 = 0x00; r16 = 0x03; r17 = 0x86; r18 = 0xff; r19 = 0xa0;
  153.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xe3; r24 = 0xff;
  154.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  155.  
  156.  outb(0x3d4,0x3b);outb(0x3d5,0xd0);
  157.  outb(0x3d4,0x3c);outb(0x3d5,0x6b);
  158.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  159.  outb(0x3d4,0x54);outb(0x3d5,0x70);
  160.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  161.  outb(0x3d4,0x5e);outb(0x3d5,0x55);
  162.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  163.  outb(0x3d4,0x67);outb(0x3d5,0x10);
  164.  
  165.  
  166. // TRIO64 internal clock synthesis
  167.  
  168.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  169.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  170.  
  171. // M/N value: 212d, DCLK
  172.  
  173.  outb(0x3c4,0x12); outb(0x3c5,0x21);
  174.  outb(0x3c4,0x13); outb(0x3c5,0x2d);
  175.  outb(0x3c4,0x18); outb(0x3c5,0xc0);
  176.  outb(0x3c4,0x15); outb(0x3c5,0x12);
  177.  
  178. // Bit 2&3 set enable loading of DCLK parameters
  179.  outb(0x3c2,0xef);
  180.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  181.  
  182.  
  183. //# [SPEA]
  184.  //# SerialWord = 0x212d;
  185.  //# DacMode = 0x5;
  186.  //# Cr42 = 0xc;
  187.  
  188. // ***********************************
  189. // 0x004F
  190. // ***********************************
  191. [MODE]
  192.  0x004F;
  193. [MODEINFO]
  194.     ModeAttributes      = 0x1b;
  195.     WinAAttributes      = 7;
  196.     WinBAttributes      = 0;
  197.     WinAGranularity     = 64;
  198.     WinBGranularity     = 64;
  199.     WinASize            = 64;
  200.     WinBSize            = 64;
  201.     WinABase            = 0xa0000;
  202.     WinBBase            = 0xa0000;
  203.     BytesPerScanline    = 1024;
  204.     XResolution         = 1280;
  205.     YResolution         = 1024;
  206.     XCharSize           = 8;
  207.     YCharSize           = 16;
  208.     Colormodel          = 1;
  209.     BitsPerPixel        = 4;
  210.     NumberOfColors      = 16;
  211.     BitsRGB             = 6;
  212.     NumberOfBanks       = 1;
  213.     BankSize            = 0;
  214.     MemoryModel         = 0x4;
  215.     NumberOfImagePages  = 0;
  216.  
  217. [SETMODE]
  218.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  219.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  220.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  221.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  222.  
  223.  r0  = 0xd7; r1  = 0x9f; r2  = 0x9f; r3  = 0x1a; r4  = 0xa7;
  224.  r5  = 0x1f; r6  = 0x1e; r7  = 0x52; r8  = 0x00; r9  = 0x40;
  225.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  226.  r15 = 0x00; r16 = 0x03; r17 = 0x86; r18 = 0xff; r19 = 0x80;
  227.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xe3; r24 = 0xff;
  228.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  229.  
  230.  outb(0x3d4,0x3b);outb(0x3d5,0xd0);
  231.  outb(0x3d4,0x3c);outb(0x3d5,0x6b);
  232.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  233.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  234.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  235.  outb(0x3d4,0x5e);outb(0x3d5,0x55);
  236.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  237.  outb(0x3d4,0x67);outb(0x3d5,0x10);
  238.  
  239.  
  240. // TRIO64 internal clock synthesis
  241.  
  242.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  243.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  244.  
  245. // M/N value: 212d, DCLK
  246.  
  247.  outb(0x3c4,0x12); outb(0x3c5,0x21);
  248.  outb(0x3c4,0x13); outb(0x3c5,0x2d);
  249.  outb(0x3c4,0x18); outb(0x3c5,0xc0);
  250.  outb(0x3c4,0x15); outb(0x3c5,0x12);
  251.  
  252. // Bit 2&3 set enable loading of DCLK parameters
  253.  outb(0x3c2,0xef);
  254.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  255.  
  256.  
  257. //# [SPEA]
  258.  //# SerialWord = 0x212d;
  259.  //# DacMode = 0x5;
  260.  //# Cr42 = 0xc;
  261.  
  262. // ***********************************
  263. // 0x004E
  264. // ***********************************
  265. [MODE]
  266.  0x004E;
  267. [MODEINFO]
  268.     ModeAttributes      = 0x1b;
  269.     WinAAttributes      = 7;
  270.     WinBAttributes      = 0;
  271.     WinAGranularity     = 64;
  272.     WinBGranularity     = 64;
  273.     WinASize            = 64;
  274.     WinBSize            = 64;
  275.     WinABase            = 0xa0000;
  276.     WinBBase            = 0xa0000;
  277.     BytesPerScanline    = 1152;
  278.     XResolution         = 1152;
  279.     YResolution         = 864;
  280.     XCharSize           = 8;
  281.     YCharSize           = 16;
  282.     Colormodel          = 1;
  283.     BitsPerPixel        = 8;
  284.     NumberOfColors      = 256;
  285.     BitsRGB             = 6;
  286.     NumberOfBanks       = 1;
  287.     BankSize            = 0;
  288.     MemoryModel         = 0x4;
  289.     NumberOfImagePages  = 0;
  290.  
  291. [SETMODE]
  292.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  293.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  294.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  295.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  296.  
  297.  r0  = 0xb1; r1  = 0x8f; r2  = 0x90; r3  = 0x14; r4  = 0x93;
  298.  r5  = 0x9f; r6  = 0x9a; r7  = 0xff; r8  = 0x00; r9  = 0x60;
  299.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  300.  r15 = 0x00; r16 = 0x70; r17 = 0x83; r18 = 0x5f; r19 = 0x90;
  301.  r20 = 0x60; r21 = 0x6f; r22 = 0x8d; r23 = 0xeb; r24 = 0xff;
  302.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  303.  
  304.  outb(0x3d4,0x3b);outb(0x3d5,0xaa);
  305.  outb(0x3d4,0x3c);outb(0x3d5,0x58);
  306.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  307.  outb(0x3d4,0x54);outb(0x3d5,0xb0);
  308.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  309.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  310.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  311.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  312.  
  313.  
  314. // TRIO64 internal clock synthesis
  315.  
  316.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  317.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  318.  
  319. // M/N value: 222b, DCLK
  320.  
  321.  outb(0x3c4,0x12); outb(0x3c5,0x22);
  322.  outb(0x3c4,0x13); outb(0x3c5,0x2b);
  323.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  324.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  325.  
  326. // Bit 2&3 set enable loading of DCLK parameters
  327.  outb(0x3c2,0xef);
  328.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  329.  
  330.  
  331. //# [SPEA]
  332.  //# SerialWord = 0x222b;
  333.  //# DacMode = 0x0;
  334.  //# Cr42 = 0xa;
  335.  
  336. // ***********************************
  337. // 0x0077
  338. // ***********************************
  339. [MODE]
  340.  0x0077;
  341. [MODEINFO]
  342.     ModeAttributes      = 0x1b;
  343.     WinAAttributes      = 7;
  344.     WinBAttributes      = 0;
  345.     WinAGranularity     = 64;
  346.     WinBGranularity     = 64;
  347.     WinASize            = 64;
  348.     WinBSize            = 64;
  349.     WinABase            = 0xa0000;
  350.     WinBBase            = 0xa0000;
  351.     BytesPerScanline    = 2048;
  352.     XResolution         = 1024;
  353.     YResolution         = 768;
  354.     XCharSize           = 8;
  355.     YCharSize           = 16;
  356.     Colormodel          = 2;
  357.     BitsPerPixel        = 16;
  358.     NumberOfColors      = 65536;
  359.     BitsRGB             = 6;
  360.     RedSize             = 5;
  361.     RedPosition         = 11;
  362.     GreenSize           = 6;
  363.     GreenPosition       = 5;
  364.     BlueSize            = 5;
  365.     BluePosition        = 0;
  366.     ReservedSize        = 0;
  367.     ReservedPosition    = 0;
  368.     NumberOfBanks       = 1;
  369.     BankSize            = 0;
  370.     MemoryModel         = 0x6;
  371.     NumberOfImagePages  = 0;
  372.  
  373. [SETMODE]
  374.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  375.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  376.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  377.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  378.  
  379.  r0  = 0x48; r1  = 0xff; r2  = 0x00; r3  = 0x08; r4  = 0x05;
  380.  r5  = 0x1d; r6  = 0x1f; r7  = 0xfd; r8  = 0x00; r9  = 0x60;
  381.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  382.  r15 = 0x00; r16 = 0x01; r17 = 0x84; r18 = 0xff; r19 = 0x00;
  383.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xeb; r24 = 0xff;
  384.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  385.  
  386.  outb(0x3d4,0x3b);outb(0x3d5,0x41);
  387.  outb(0x3d4,0x3c);outb(0x3d5,0xa4);
  388.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  389.  outb(0x3d4,0x54);outb(0x3d5,0x28);
  390.  outb(0x3d4,0x5d);outb(0x3d5,0x5d);
  391.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  392.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  393.  outb(0x3d4,0x67);outb(0x3d5,0x50);
  394.  
  395.  
  396. // TRIO64 internal clock synthesis
  397.  
  398.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  399.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  400.  
  401. // M/N value: 222b, DCLK
  402.  
  403.  outb(0x3c4,0x12); outb(0x3c5,0x22);
  404.  outb(0x3c4,0x13); outb(0x3c5,0x2b);
  405.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  406.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  407.  
  408. // Bit 2&3 set enable loading of DCLK parameters
  409.  outb(0x3c2,0x2f);
  410.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  411.  
  412.  
  413. //# [SPEA]
  414.  //# SerialWord = 0x222b;
  415.  //# DacMode = 0x2;
  416.  //# Cr42 = 0xa;
  417.  
  418. // ***********************************
  419. // 0x004D
  420. // ***********************************
  421. [MODE]
  422.  0x004D;
  423. [MODEINFO]
  424.     ModeAttributes      = 0x1b;
  425.     WinAAttributes      = 7;
  426.     WinBAttributes      = 0;
  427.     WinAGranularity     = 64;
  428.     WinBGranularity     = 64;
  429.     WinASize            = 64;
  430.     WinBSize            = 64;
  431.     WinABase            = 0xa0000;
  432.     WinBBase            = 0xa0000;
  433.     BytesPerScanline    = 1024;
  434.     XResolution         = 1024;
  435.     YResolution         = 768;
  436.     XCharSize           = 8;
  437.     YCharSize           = 16;
  438.     Colormodel          = 1;
  439.     BitsPerPixel        = 8;
  440.     NumberOfColors      = 256;
  441.     BitsRGB             = 6;
  442.     NumberOfBanks       = 1;
  443.     BankSize            = 0;
  444.     MemoryModel         = 0x4;
  445.     NumberOfImagePages  = 0;
  446.  
  447. [SETMODE]
  448.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  449.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  450.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  451.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  452.  
  453.  r0  = 0xa2; r1  = 0x7f; r2  = 0x7f; r3  = 0x83; r4  = 0x82;
  454.  r5  = 0x8e; r6  = 0x1f; r7  = 0xfd; r8  = 0x00; r9  = 0x60;
  455.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  456.  r15 = 0x00; r16 = 0x01; r17 = 0x84; r18 = 0xff; r19 = 0x80;
  457.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xeb; r24 = 0xff;
  458.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  459.  
  460.  outb(0x3d4,0x3b);outb(0x3d5,0x9b);
  461.  outb(0x3d4,0x3c);outb(0x3d5,0x51);
  462.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  463.  outb(0x3d4,0x54);outb(0x3d5,0xc0);
  464.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  465.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  466.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  467.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  468.  
  469.  
  470. // TRIO64 internal clock synthesis
  471.  
  472.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  473.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  474.  
  475. // M/N value: 222b, DCLK
  476.  
  477.  outb(0x3c4,0x12); outb(0x3c5,0x22);
  478.  outb(0x3c4,0x13); outb(0x3c5,0x2b);
  479.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  480.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  481.  
  482. // Bit 2&3 set enable loading of DCLK parameters
  483.  outb(0x3c2,0x2f);
  484.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  485.  
  486.  
  487. //# [SPEA]
  488.  //# SerialWord = 0x222b;
  489.  //# DacMode = 0x0;
  490.  //# Cr42 = 0xa;
  491.  
  492. // ***********************************
  493. // 0x006D
  494. // ***********************************
  495. [MODE]
  496.  0x006D;
  497. [MODEINFO]
  498.     ModeAttributes      = 0x1b;
  499.     WinAAttributes      = 7;
  500.     WinBAttributes      = 0;
  501.     WinAGranularity     = 64;
  502.     WinBGranularity     = 64;
  503.     WinASize            = 64;
  504.     WinBSize            = 64;
  505.     WinABase            = 0xa0000;
  506.     WinBBase            = 0xa0000;
  507.     BytesPerScanline    = 1024;
  508.     XResolution         = 1024;
  509.     YResolution         = 768;
  510.     XCharSize           = 8;
  511.     YCharSize           = 16;
  512.     Colormodel          = 1;
  513.     BitsPerPixel        = 8;
  514.     NumberOfColors      = 256;
  515.     BitsRGB             = 6;
  516.     NumberOfBanks       = 1;
  517.     BankSize            = 0;
  518.     MemoryModel         = 0x4;
  519.     NumberOfImagePages  = 0;
  520.  
  521. [SETMODE]
  522.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  523.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  524.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  525.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  526.  
  527.  r0  = 0xa2; r1  = 0x7f; r2  = 0x7f; r3  = 0x83; r4  = 0x82;
  528.  r5  = 0x8e; r6  = 0x1f; r7  = 0xfd; r8  = 0x00; r9  = 0x60;
  529.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  530.  r15 = 0x00; r16 = 0x01; r17 = 0x84; r18 = 0xff; r19 = 0x80;
  531.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xeb; r24 = 0xff;
  532.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  533.  
  534.  outb(0x3d4,0x3b);outb(0x3d5,0x9b);
  535.  outb(0x3d4,0x3c);outb(0x3d5,0x51);
  536.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  537.  outb(0x3d4,0x54);outb(0x3d5,0xc0);
  538.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  539.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  540.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  541.  outb(0x3d4,0x67);outb(0x3d5,0x01);
  542.  
  543.  
  544. // TRIO64 internal clock synthesis
  545.  
  546.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  547.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  548.  
  549. // M/N value: 222b, DCLK
  550.  
  551.  outb(0x3c4,0x12); outb(0x3c5,0x22);
  552.  outb(0x3c4,0x13); outb(0x3c5,0x2b);
  553.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  554.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  555.  
  556. // Bit 2&3 set enable loading of DCLK parameters
  557.  outb(0x3c2,0x2f);
  558.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  559.  
  560.  
  561. //# [SPEA]
  562.  //# SerialWord = 0x222b;
  563.  //# DacMode = 0x0;
  564.  //# Cr42 = 0xa;
  565.  
  566. // ***********************************
  567. // 0x004C
  568. // ***********************************
  569. [MODE]
  570.  0x004C;
  571. [MODEINFO]
  572.     ModeAttributes      = 0x1b;
  573.     WinAAttributes      = 7;
  574.     WinBAttributes      = 0;
  575.     WinAGranularity     = 64;
  576.     WinBGranularity     = 64;
  577.     WinASize            = 64;
  578.     WinBSize            = 64;
  579.     WinABase            = 0xa0000;
  580.     WinBBase            = 0xa0000;
  581.     BytesPerScanline    = 1024;
  582.     XResolution         = 1024;
  583.     YResolution         = 768;
  584.     XCharSize           = 8;
  585.     YCharSize           = 16;
  586.     Colormodel          = 1;
  587.     BitsPerPixel        = 4;
  588.     NumberOfColors      = 16;
  589.     BitsRGB             = 6;
  590.     NumberOfBanks       = 1;
  591.     BankSize            = 0;
  592.     MemoryModel         = 0x4;
  593.     NumberOfImagePages  = 0;
  594.  
  595. [SETMODE]
  596.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  597.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  598.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  599.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  600.  
  601.  r0  = 0xa2; r1  = 0x7f; r2  = 0x7f; r3  = 0x83; r4  = 0x84;
  602.  r5  = 0x90; r6  = 0x1f; r7  = 0xfd; r8  = 0x00; r9  = 0x60;
  603.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  604.  r15 = 0x00; r16 = 0x01; r17 = 0x84; r18 = 0xff; r19 = 0x80;
  605.  r20 = 0x00; r21 = 0x00; r22 = 0x00; r23 = 0xeb; r24 = 0xff;
  606.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  607.  
  608.  outb(0x3d4,0x3b);outb(0x3d5,0x9b);
  609.  outb(0x3d4,0x3c);outb(0x3d5,0x51);
  610.  outb(0x3d4,0x42);outb(0x3d5,0x92);
  611.  outb(0x3d4,0x54);outb(0x3d5,0xc0);
  612.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  613.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  614.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  615.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  616.  
  617.  
  618. // TRIO64 internal clock synthesis
  619.  
  620.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  621.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  622.  
  623. // M/N value: 222b, DCLK
  624.  
  625.  outb(0x3c4,0x12); outb(0x3c5,0x22);
  626.  outb(0x3c4,0x13); outb(0x3c5,0x2b);
  627.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  628.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  629.  
  630. // Bit 2&3 set enable loading of DCLK parameters
  631.  outb(0x3c2,0x2f);
  632.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  633.  
  634.  
  635. //# [SPEA]
  636.  //# SerialWord = 0x222b;
  637.  //# DacMode = 0x0;
  638.  //# Cr42 = 0xa;
  639.  
  640. // ***********************************
  641. // 0x0075
  642. // ***********************************
  643. [MODE]
  644.  0x0075;
  645. [MODEINFO]
  646.     ModeAttributes      = 0x1b;
  647.     WinAAttributes      = 7;
  648.     WinBAttributes      = 0;
  649.     WinAGranularity     = 64;
  650.     WinBGranularity     = 64;
  651.     WinASize            = 64;
  652.     WinBSize            = 64;
  653.     WinABase            = 0xa0000;
  654.     WinBBase            = 0xa0000;
  655.     BytesPerScanline    = 3200;
  656.     XResolution         = 800;
  657.     YResolution         = 600;
  658.     XCharSize           = 8;
  659.     YCharSize           = 8;
  660.     Colormodel          = 2;
  661.     BitsPerPixel        = 32;
  662.     NumberOfColors      = 16777216;
  663.     BitsRGB             = 6;
  664.     RedSize             = 8;
  665.     RedPosition         = 16;
  666.     GreenSize           = 8;
  667.     GreenPosition       = 8;
  668.     BlueSize            = 8;
  669.     BluePosition        = 0;
  670.     ReservedSize        = 8;
  671.     ReservedPosition    = 24;
  672.     NumberOfBanks       = 1;
  673.     BankSize            = 0;
  674.     MemoryModel         = 0x6;
  675.     NumberOfImagePages  = 0;
  676.  
  677. [SETMODE]
  678.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  679.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  680.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  681.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  682.  
  683.  r0  = 0x7f; r1  = 0x63; r2  = 0x64; r3  = 0x00; r4  = 0x66;
  684.  r5  = 0x10; r6  = 0x6f; r7  = 0xe0; r8  = 0x00; r9  = 0x60;
  685.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  686.  r15 = 0x00; r16 = 0x58; r17 = 0x8b; r18 = 0x57; r19 = 0x90;
  687.  r20 = 0x00; r21 = 0x57; r22 = 0x00; r23 = 0xe3; r24 = 0xff;
  688.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  689.  
  690.  outb(0x3d4,0x3b);outb(0x3d5,0x78);
  691.  outb(0x3d4,0x3c);outb(0x3d5,0x3f);
  692.  outb(0x3d4,0x42);outb(0x3d5,0x4d);
  693.  outb(0x3d4,0x54);outb(0x3d5,0x18);
  694.  outb(0x3d4,0x5d);outb(0x3d5,0x08);
  695.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  696.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  697.  outb(0x3d4,0x67);outb(0x3d5,0xd0);
  698.  
  699.  
  700. // TRIO64 internal clock synthesis
  701.  
  702.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  703.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  704.  
  705. // M/N value: 4451, DCLK
  706.  
  707.  outb(0x3c4,0x12); outb(0x3c5,0x44);
  708.  outb(0x3c4,0x13); outb(0x3c5,0x51);
  709.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  710.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  711.  
  712. // Bit 2&3 set enable loading of DCLK parameters
  713.  outb(0x3c2,0x2f);
  714.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  715.  
  716.  
  717. //# [SPEA]
  718.  //# SerialWord = 0x4451;
  719.  //# DacMode = 0x4;
  720.  //# Cr42 = 0x10;
  721.  
  722. // ***********************************
  723. // 0x0074
  724. // ***********************************
  725. [MODE]
  726.  0x0074;
  727. [MODEINFO]
  728.     ModeAttributes      = 0x1b;
  729.     WinAAttributes      = 7;
  730.     WinBAttributes      = 0;
  731.     WinAGranularity     = 64;
  732.     WinBGranularity     = 64;
  733.     WinASize            = 64;
  734.     WinBSize            = 64;
  735.     WinABase            = 0xa0000;
  736.     WinBBase            = 0xa0000;
  737.     BytesPerScanline    = 1600;
  738.     XResolution         = 800;
  739.     YResolution         = 600;
  740.     XCharSize           = 8;
  741.     YCharSize           = 8;
  742.     Colormodel          = 2;
  743.     BitsPerPixel        = 16;
  744.     NumberOfColors      = 65536;
  745.     BitsRGB             = 6;
  746.     RedSize             = 5;
  747.     RedPosition         = 11;
  748.     GreenSize           = 6;
  749.     GreenPosition       = 5;
  750.     BlueSize            = 5;
  751.     BluePosition        = 0;
  752.     ReservedSize        = 0;
  753.     ReservedPosition    = 0;
  754.     NumberOfBanks       = 1;
  755.     BankSize            = 0;
  756.     MemoryModel         = 0x6;
  757.     NumberOfImagePages  = 0;
  758.  
  759. [SETMODE]
  760.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  761.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  762.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  763.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  764.  
  765.  r0  = 0xff; r1  = 0xc7; r2  = 0xc8; r3  = 0x02; r4  = 0xd4;
  766.  r5  = 0x12; r6  = 0x7e; r7  = 0xf0; r8  = 0x00; r9  = 0x60;
  767.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  768.  r15 = 0x00; r16 = 0x5f; r17 = 0x89; r18 = 0x57; r19 = 0xc8;
  769.  r20 = 0x00; r21 = 0x57; r22 = 0x7e; r23 = 0xa3; r24 = 0xff;
  770.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  771.  
  772.  outb(0x3d4,0x3b);outb(0x3d5,0xfd);
  773.  outb(0x3d4,0x3c);outb(0x3d5,0x82);
  774.  outb(0x3d4,0x42);outb(0x3d5,0x4d);
  775.  outb(0x3d4,0x54);outb(0x3d5,0x38);
  776.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  777.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  778.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  779.  outb(0x3d4,0x67);outb(0x3d5,0x50);
  780.  
  781.  
  782. // TRIO64 internal clock synthesis
  783.  
  784.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  785.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  786.  
  787. // M/N value: 4574, DCLK
  788.  
  789.  outb(0x3c4,0x12); outb(0x3c5,0x45);
  790.  outb(0x3c4,0x13); outb(0x3c5,0x74);
  791.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  792.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  793.  
  794. // Bit 2&3 set enable loading of DCLK parameters
  795.  outb(0x3c2,0x2f);
  796.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  797.  
  798.  
  799. //# [SPEA]
  800.  //# SerialWord = 0x4574;
  801.  //# DacMode = 0x2;
  802.  //# Cr42 = 0x10;
  803.  
  804. // ***********************************
  805. // 0x004B
  806. // ***********************************
  807. [MODE]
  808.  0x004B;
  809. [MODEINFO]
  810.     ModeAttributes      = 0x1b;
  811.     WinAAttributes      = 7;
  812.     WinBAttributes      = 0;
  813.     WinAGranularity     = 64;
  814.     WinBGranularity     = 64;
  815.     WinASize            = 64;
  816.     WinBSize            = 64;
  817.     WinABase            = 0xa0000;
  818.     WinBBase            = 0xa0000;
  819.     BytesPerScanline    = 1024;
  820.     XResolution         = 800;
  821.     YResolution         = 600;
  822.     XCharSize           = 8;
  823.     YCharSize           = 8;
  824.     Colormodel          = 1;
  825.     BitsPerPixel        = 8;
  826.     NumberOfColors      = 256;
  827.     BitsRGB             = 6;
  828.     NumberOfBanks       = 1;
  829.     BankSize            = 0;
  830.     MemoryModel         = 0x4;
  831.     NumberOfImagePages  = 0;
  832.  
  833. [SETMODE]
  834.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  835.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  836.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  837.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  838.  
  839.  r0  = 0x88; r1  = 0x63; r2  = 0x64; r3  = 0x8b; r4  = 0x6d;
  840.  r5  = 0x01; r6  = 0x7e; r7  = 0xf0; r8  = 0x00; r9  = 0x60;
  841.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  842.  r15 = 0x00; r16 = 0x5f; r17 = 0x89; r18 = 0x57; r19 = 0x80;
  843.  r20 = 0x00; r21 = 0x57; r22 = 0x7e; r23 = 0xe3; r24 = 0xff;
  844.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  845.  
  846.  outb(0x3d4,0x3b);outb(0x3d5,0x83);
  847.  outb(0x3d4,0x3c);outb(0x3d5,0x3f);
  848.  outb(0x3d4,0x42);outb(0x3d5,0x4d);
  849.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  850.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  851.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  852.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  853.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  854.  
  855.  
  856. // TRIO64 internal clock synthesis
  857.  
  858.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  859.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  860.  
  861. // M/N value: 4359, DCLK
  862.  
  863.  outb(0x3c4,0x12); outb(0x3c5,0x43);
  864.  outb(0x3c4,0x13); outb(0x3c5,0x59);
  865.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  866.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  867.  
  868. // Bit 2&3 set enable loading of DCLK parameters
  869.  outb(0x3c2,0x2f);
  870.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  871.  
  872.  
  873. //# [SPEA]
  874.  //# SerialWord = 0x4359;
  875.  //# DacMode = 0x0;
  876.  //# Cr42 = 0x10;
  877.  
  878. // ***********************************
  879. // 0x006B
  880. // ***********************************
  881. [MODE]
  882.  0x006B;
  883. [MODEINFO]
  884.     ModeAttributes      = 0x1b;
  885.     WinAAttributes      = 7;
  886.     WinBAttributes      = 0;
  887.     WinAGranularity     = 64;
  888.     WinBGranularity     = 64;
  889.     WinASize            = 64;
  890.     WinBSize            = 64;
  891.     WinABase            = 0xa0000;
  892.     WinBBase            = 0xa0000;
  893.     BytesPerScanline    = 800;
  894.     XResolution         = 800;
  895.     YResolution         = 600;
  896.     XCharSize           = 8;
  897.     YCharSize           = 8;
  898.     Colormodel          = 1;
  899.     BitsPerPixel        = 8;
  900.     NumberOfColors      = 256;
  901.     BitsRGB             = 6;
  902.     NumberOfBanks       = 1;
  903.     BankSize            = 0;
  904.     MemoryModel         = 0x4;
  905.     NumberOfImagePages  = 0;
  906.  
  907. [SETMODE]
  908.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  909.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  910.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  911.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  912.  
  913.  r0  = 0x88; r1  = 0x63; r2  = 0x64; r3  = 0x8b; r4  = 0x6d;
  914.  r5  = 0x01; r6  = 0x7e; r7  = 0xf0; r8  = 0x00; r9  = 0x60;
  915.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  916.  r15 = 0x00; r16 = 0x5f; r17 = 0x89; r18 = 0x57; r19 = 0x64;
  917.  r20 = 0x00; r21 = 0x57; r22 = 0x7e; r23 = 0xe3; r24 = 0xff;
  918.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  919.  
  920.  outb(0x3d4,0x3b);outb(0x3d5,0x83);
  921.  outb(0x3d4,0x3c);outb(0x3d5,0x3f);
  922.  outb(0x3d4,0x42);outb(0x3d5,0x4d);
  923.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  924.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  925.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  926.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  927.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  928.  
  929.  
  930. // TRIO64 internal clock synthesis
  931.  
  932.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  933.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  934.  
  935. // M/N value: 4359, DCLK
  936.  
  937.  outb(0x3c4,0x12); outb(0x3c5,0x43);
  938.  outb(0x3c4,0x13); outb(0x3c5,0x59);
  939.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  940.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  941.  
  942. // Bit 2&3 set enable loading of DCLK parameters
  943.  outb(0x3c2,0x2f);
  944.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  945.  
  946.  
  947. //# [SPEA]
  948.  //# SerialWord = 0x4359;
  949.  //# DacMode = 0x0;
  950.  //# Cr42 = 0x10;
  951.  
  952. // ***********************************
  953. // 0x004A
  954. // ***********************************
  955. [MODE]
  956.  0x004A;
  957. [MODEINFO]
  958.     ModeAttributes      = 0x1b;
  959.     WinAAttributes      = 7;
  960.     WinBAttributes      = 0;
  961.     WinAGranularity     = 64;
  962.     WinBGranularity     = 64;
  963.     WinASize            = 64;
  964.     WinBSize            = 64;
  965.     WinABase            = 0xa0000;
  966.     WinBBase            = 0xa0000;
  967.     BytesPerScanline    = 1024;
  968.     XResolution         = 800;
  969.     YResolution         = 600;
  970.     XCharSize           = 8;
  971.     YCharSize           = 8;
  972.     Colormodel          = 1;
  973.     BitsPerPixel        = 4;
  974.     NumberOfColors      = 16;
  975.     BitsRGB             = 6;
  976.     NumberOfBanks       = 1;
  977.     BankSize            = 0;
  978.     MemoryModel         = 0x4;
  979.     NumberOfImagePages  = 0;
  980.  
  981. [SETMODE]
  982.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  983.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  984.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  985.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  986.  
  987.  r0  = 0x88; r1  = 0x63; r2  = 0x64; r3  = 0x8b; r4  = 0x6d;
  988.  r5  = 0x01; r6  = 0x7e; r7  = 0xf0; r8  = 0x00; r9  = 0x60;
  989.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  990.  r15 = 0x00; r16 = 0x5f; r17 = 0x89; r18 = 0x57; r19 = 0x80;
  991.  r20 = 0x00; r21 = 0x57; r22 = 0x7e; r23 = 0xe3; r24 = 0xff;
  992.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  993.  
  994.  outb(0x3d4,0x3b);outb(0x3d5,0x83);
  995.  outb(0x3d4,0x3c);outb(0x3d5,0x3f);
  996.  outb(0x3d4,0x42);outb(0x3d5,0x4d);
  997.  outb(0x3d4,0x54);outb(0x3d5,0x60);
  998.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  999.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1000.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1001.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  1002.  
  1003.  
  1004. // TRIO64 internal clock synthesis
  1005.  
  1006.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1007.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1008.  
  1009. // M/N value: 4359, DCLK
  1010.  
  1011.  outb(0x3c4,0x12); outb(0x3c5,0x43);
  1012.  outb(0x3c4,0x13); outb(0x3c5,0x59);
  1013.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1014.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1015.  
  1016. // Bit 2&3 set enable loading of DCLK parameters
  1017.  outb(0x3c2,0x2f);
  1018.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1019.  
  1020.  
  1021. //# [SPEA]
  1022.  //# SerialWord = 0x4359;
  1023.  //# DacMode = 0x0;
  1024.  //# Cr42 = 0x10;
  1025.  
  1026. // ***********************************
  1027. // 0x0072
  1028. // ***********************************
  1029. [MODE]
  1030.  0x0072;
  1031. [MODEINFO]
  1032.     ModeAttributes      = 0x1b;
  1033.     WinAAttributes      = 7;
  1034.     WinBAttributes      = 0;
  1035.     WinAGranularity     = 64;
  1036.     WinBGranularity     = 64;
  1037.     WinASize            = 64;
  1038.     WinBSize            = 64;
  1039.     WinABase            = 0xa0000;
  1040.     WinBBase            = 0xa0000;
  1041.     BytesPerScanline    = 2560;
  1042.     XResolution         = 640;
  1043.     YResolution         = 480;
  1044.     XCharSize           = 8;
  1045.     YCharSize           = 16;
  1046.     Colormodel          = 2;
  1047.     BitsPerPixel        = 32;
  1048.     NumberOfColors      = 16777216;
  1049.     BitsRGB             = 6;
  1050.     RedSize             = 8;
  1051.     RedPosition         = 16;
  1052.     GreenSize           = 8;
  1053.     GreenPosition       = 8;
  1054.     BlueSize            = 8;
  1055.     BluePosition        = 0;
  1056.     ReservedSize        = 8;
  1057.     ReservedPosition    = 24;
  1058.     NumberOfBanks       = 1;
  1059.     BankSize            = 0;
  1060.     MemoryModel         = 0x6;
  1061.     NumberOfImagePages  = 0;
  1062.  
  1063. [SETMODE]
  1064.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1065.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1066.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1067.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1068.  
  1069.  r0  = 0x5f; r1  = 0x4f; r2  = 0x50; r3  = 0x82; r4  = 0x55;
  1070.  r5  = 0x98; r6  = 0x0b; r7  = 0x3e; r8  = 0x00; r9  = 0x40;
  1071.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1072.  r15 = 0x00; r16 = 0xea; r17 = 0x8c; r18 = 0xdf; r19 = 0x40;
  1073.  r20 = 0x60; r21 = 0xdf; r22 = 0x0b; r23 = 0xab; r24 = 0xff;
  1074.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1075.  
  1076.  outb(0x3d4,0x3b);outb(0x3d5,0x5d);
  1077.  outb(0x3d4,0x3c);outb(0x3d5,0x32);
  1078.  outb(0x3d4,0x42);outb(0x3d5,0x49);
  1079.  outb(0x3d4,0x54);outb(0x3d5,0x38);
  1080.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1081.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1082.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1083.  outb(0x3d4,0x67);outb(0x3d5,0xd0);
  1084.  
  1085.  
  1086. // TRIO64 internal clock synthesis
  1087.  
  1088.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1089.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1090.  
  1091. // M/N value: 497f, DCLK
  1092.  
  1093.  outb(0x3c4,0x12); outb(0x3c5,0x49);
  1094.  outb(0x3c4,0x13); outb(0x3c5,0x7f);
  1095.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1096.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1097.  
  1098. // Bit 2&3 set enable loading of DCLK parameters
  1099.  outb(0x3c2,0xef);
  1100.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1101.  
  1102.  
  1103. //# [SPEA]
  1104.  //# SerialWord = 0x497f;
  1105.  //# DacMode = 0x4;
  1106.  //# Cr42 = 0xb;
  1107.  
  1108. // ***********************************
  1109. // 0x0071
  1110. // ***********************************
  1111. [MODE]
  1112.  0x0071;
  1113. [MODEINFO]
  1114.     ModeAttributes      = 0x1b;
  1115.     WinAAttributes      = 7;
  1116.     WinBAttributes      = 0;
  1117.     WinAGranularity     = 64;
  1118.     WinBGranularity     = 64;
  1119.     WinASize            = 64;
  1120.     WinBSize            = 64;
  1121.     WinABase            = 0xa0000;
  1122.     WinBBase            = 0xa0000;
  1123.     BytesPerScanline    = 1280;
  1124.     XResolution         = 640;
  1125.     YResolution         = 480;
  1126.     XCharSize           = 8;
  1127.     YCharSize           = 16;
  1128.     Colormodel          = 2;
  1129.     BitsPerPixel        = 16;
  1130.     NumberOfColors      = 65536;
  1131.     BitsRGB             = 6;
  1132.     RedSize             = 5;
  1133.     RedPosition         = 11;
  1134.     GreenSize           = 6;
  1135.     GreenPosition       = 5;
  1136.     BlueSize            = 5;
  1137.     BluePosition        = 0;
  1138.     ReservedSize        = 0;
  1139.     ReservedPosition    = 0;
  1140.     NumberOfBanks       = 1;
  1141.     BankSize            = 0;
  1142.     MemoryModel         = 0x6;
  1143.     NumberOfImagePages  = 0;
  1144.  
  1145. [SETMODE]
  1146.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1147.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1148.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1149.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1150.  
  1151.  r0  = 0xc3; r1  = 0x9f; r2  = 0xa0; r3  = 0x86; r4  = 0xad;
  1152.  r5  = 0x1c; r6  = 0x0b; r7  = 0x3e; r8  = 0x00; r9  = 0x40;
  1153.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1154.  r15 = 0x00; r16 = 0xea; r17 = 0x8c; r18 = 0xdf; r19 = 0xa0;
  1155.  r20 = 0x60; r21 = 0xdf; r22 = 0x0b; r23 = 0xab; r24 = 0xff;
  1156.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1157.  
  1158.  outb(0x3d4,0x3b);outb(0x3d5,0xbe);
  1159.  outb(0x3d4,0x3c);outb(0x3d5,0x67);
  1160.  outb(0x3d4,0x42);outb(0x3d5,0x49);
  1161.  outb(0x3d4,0x54);outb(0x3d5,0xc0);
  1162.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1163.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1164.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1165.  outb(0x3d4,0x67);outb(0x3d5,0x50);
  1166.  
  1167.  
  1168. // TRIO64 internal clock synthesis
  1169.  
  1170.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1171.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1172.  
  1173. // M/N value: 497f, DCLK
  1174.  
  1175.  outb(0x3c4,0x12); outb(0x3c5,0x49);
  1176.  outb(0x3c4,0x13); outb(0x3c5,0x7f);
  1177.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1178.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1179.  
  1180. // Bit 2&3 set enable loading of DCLK parameters
  1181.  outb(0x3c2,0xef);
  1182.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1183.  
  1184.  
  1185. //# [SPEA]
  1186.  //# SerialWord = 0x497f;
  1187.  //# DacMode = 0x2;
  1188.  //# Cr42 = 0xb;
  1189.  
  1190. // ***********************************
  1191. // 0x0049
  1192. // ***********************************
  1193. [MODE]
  1194.  0x0049;
  1195. [MODEINFO]
  1196.     ModeAttributes      = 0x1b;
  1197.     WinAAttributes      = 7;
  1198.     WinBAttributes      = 0;
  1199.     WinAGranularity     = 64;
  1200.     WinBGranularity     = 64;
  1201.     WinASize            = 64;
  1202.     WinBSize            = 64;
  1203.     WinABase            = 0xa0000;
  1204.     WinBBase            = 0xa0000;
  1205.     BytesPerScanline    = 1024;
  1206.     XResolution         = 640;
  1207.     YResolution         = 480;
  1208.     XCharSize           = 8;
  1209.     YCharSize           = 16;
  1210.     Colormodel          = 1;
  1211.     BitsPerPixel        = 8;
  1212.     NumberOfColors      = 256;
  1213.     BitsRGB             = 6;
  1214.     NumberOfBanks       = 1;
  1215.     BankSize            = 0;
  1216.     MemoryModel         = 0x4;
  1217.     NumberOfImagePages  = 0;
  1218.  
  1219. [SETMODE]
  1220.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1221.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1222.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1223.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1224.  
  1225.  r0  = 0x5f; r1  = 0x4f; r2  = 0x50; r3  = 0x82; r4  = 0x55;
  1226.  r5  = 0x98; r6  = 0x0b; r7  = 0x3e; r8  = 0x00; r9  = 0x40;
  1227.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1228.  r15 = 0x00; r16 = 0xea; r17 = 0x8c; r18 = 0xdf; r19 = 0x80;
  1229.  r20 = 0x60; r21 = 0xdf; r22 = 0x0b; r23 = 0xab; r24 = 0xff;
  1230.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1231.  
  1232.  outb(0x3d4,0x3b);outb(0x3d5,0x5d);
  1233.  outb(0x3d4,0x3c);outb(0x3d5,0x32);
  1234.  outb(0x3d4,0x42);outb(0x3d5,0x49);
  1235.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  1236.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1237.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1238.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1239.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  1240.  
  1241.  
  1242. // TRIO64 internal clock synthesis
  1243.  
  1244.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1245.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1246.  
  1247. // M/N value: 497f, DCLK
  1248.  
  1249.  outb(0x3c4,0x12); outb(0x3c5,0x49);
  1250.  outb(0x3c4,0x13); outb(0x3c5,0x7f);
  1251.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1252.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1253.  
  1254. // Bit 2&3 set enable loading of DCLK parameters
  1255.  outb(0x3c2,0xef);
  1256.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1257.  
  1258.  
  1259. //# [SPEA]
  1260.  //# SerialWord = 0x497f;
  1261.  //# DacMode = 0x0;
  1262.  //# Cr42 = 0xb;
  1263.  
  1264. // ***********************************
  1265. // 0x0069
  1266. // ***********************************
  1267. [MODE]
  1268.  0x0069;
  1269. [MODEINFO]
  1270.     ModeAttributes      = 0x1b;
  1271.     WinAAttributes      = 7;
  1272.     WinBAttributes      = 0;
  1273.     WinAGranularity     = 64;
  1274.     WinBGranularity     = 64;
  1275.     WinASize            = 64;
  1276.     WinBSize            = 64;
  1277.     WinABase            = 0xa0000;
  1278.     WinBBase            = 0xa0000;
  1279.     BytesPerScanline    = 640;
  1280.     XResolution         = 640;
  1281.     YResolution         = 480;
  1282.     XCharSize           = 8;
  1283.     YCharSize           = 16;
  1284.     Colormodel          = 1;
  1285.     BitsPerPixel        = 8;
  1286.     NumberOfColors      = 256;
  1287.     BitsRGB             = 6;
  1288.     NumberOfBanks       = 1;
  1289.     BankSize            = 0;
  1290.     MemoryModel         = 0x4;
  1291.     NumberOfImagePages  = 0;
  1292.  
  1293. [SETMODE]
  1294.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1295.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1296.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1297.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1298.  
  1299.  r0  = 0x5f; r1  = 0x4f; r2  = 0x50; r3  = 0x82; r4  = 0x55;
  1300.  r5  = 0x98; r6  = 0x0b; r7  = 0x3e; r8  = 0x00; r9  = 0x40;
  1301.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1302.  r15 = 0x00; r16 = 0xea; r17 = 0x8c; r18 = 0xdf; r19 = 0x50;
  1303.  r20 = 0x60; r21 = 0xdf; r22 = 0x0b; r23 = 0xab; r24 = 0xff;
  1304.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1305.  
  1306.  outb(0x3d4,0x3b);outb(0x3d5,0x5d);
  1307.  outb(0x3d4,0x3c);outb(0x3d5,0x32);
  1308.  outb(0x3d4,0x42);outb(0x3d5,0x49);
  1309.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  1310.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1311.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1312.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1313.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  1314.  
  1315.  
  1316. // TRIO64 internal clock synthesis
  1317.  
  1318.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1319.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1320.  
  1321. // M/N value: 497f, DCLK
  1322.  
  1323.  outb(0x3c4,0x12); outb(0x3c5,0x49);
  1324.  outb(0x3c4,0x13); outb(0x3c5,0x7f);
  1325.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1326.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1327.  
  1328. // Bit 2&3 set enable loading of DCLK parameters
  1329.  outb(0x3c2,0xef);
  1330.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1331.  
  1332.  
  1333. //# [SPEA]
  1334.  //# SerialWord = 0x497f;
  1335.  //# DacMode = 0x0;
  1336.  //# Cr42 = 0xb;
  1337.  
  1338. // ***********************************
  1339. // 0x0052
  1340. // ***********************************
  1341. [MODE]
  1342.  0x0052;
  1343. [MODEINFO]
  1344.     ModeAttributes      = 0x1b;
  1345.     WinAAttributes      = 7;
  1346.     WinBAttributes      = 0;
  1347.     WinAGranularity     = 64;
  1348.     WinBGranularity     = 64;
  1349.     WinASize            = 64;
  1350.     WinBSize            = 64;
  1351.     WinABase            = 0xa0000;
  1352.     WinBBase            = 0xa0000;
  1353.     BytesPerScanline    = 2560;
  1354.     XResolution         = 640;
  1355.     YResolution         = 400;
  1356.     XCharSize           = 8;
  1357.     YCharSize           = 16;
  1358.     Colormodel          = 2;
  1359.     BitsPerPixel        = 32;
  1360.     NumberOfColors      = 16777216;
  1361.     BitsRGB             = 6;
  1362.     RedSize             = 8;
  1363.     RedPosition         = 16;
  1364.     GreenSize           = 8;
  1365.     GreenPosition       = 8;
  1366.     BlueSize            = 8;
  1367.     BluePosition        = 0;
  1368.     ReservedSize        = 8;
  1369.     ReservedPosition    = 24;
  1370.     NumberOfBanks       = 1;
  1371.     BankSize            = 0;
  1372.     MemoryModel         = 0x6;
  1373.     NumberOfImagePages  = 0;
  1374.  
  1375. [SETMODE]
  1376.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1377.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1378.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1379.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1380.  
  1381.  r0  = 0x5f; r1  = 0x4f; r2  = 0x51; r3  = 0x82; r4  = 0x54;
  1382.  r5  = 0x80; r6  = 0xbf; r7  = 0x1f; r8  = 0x00; r9  = 0x40;
  1383.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1384.  r15 = 0x00; r16 = 0x9c; r17 = 0x8e; r18 = 0x8f; r19 = 0x40;
  1385.  r20 = 0x40; r21 = 0x96; r22 = 0xb9; r23 = 0xa3; r24 = 0xff;
  1386.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1387.  
  1388.  outb(0x3d4,0x3b);outb(0x3d5,0x58);
  1389.  outb(0x3d4,0x3c);outb(0x3d5,0x2f);
  1390.  outb(0x3d4,0x42);outb(0x3d5,0x04);
  1391.  outb(0x3d4,0x54);outb(0x3d5,0x08);
  1392.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1393.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1394.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1395.  outb(0x3d4,0x67);outb(0x3d5,0xd0);
  1396.  
  1397.  
  1398. // TRIO64 internal clock synthesis
  1399.  
  1400.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1401.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1402.  
  1403. // M/N value: 6128, DCLK
  1404.  
  1405.  outb(0x3c4,0x12); outb(0x3c5,0x61);
  1406.  outb(0x3c4,0x13); outb(0x3c5,0x28);
  1407.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1408.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1409.  
  1410. // Bit 2&3 set enable loading of DCLK parameters
  1411.  outb(0x3c2,0xef);
  1412.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1413.  
  1414.  
  1415. //# [SPEA]
  1416.  //# SerialWord = 0x6128;
  1417.  //# DacMode = 0x4;
  1418.  //# Cr42 = 0x0;
  1419.  
  1420. // ***********************************
  1421. // 0x0068
  1422. // ***********************************
  1423. [MODE]
  1424.  0x0068;
  1425. [MODEINFO]
  1426.     ModeAttributes      = 0x1b;
  1427.     WinAAttributes      = 7;
  1428.     WinBAttributes      = 0;
  1429.     WinAGranularity     = 64;
  1430.     WinBGranularity     = 64;
  1431.     WinASize            = 64;
  1432.     WinBSize            = 64;
  1433.     WinABase            = 0xa0000;
  1434.     WinBBase            = 0xa0000;
  1435.     BytesPerScanline    = 640;
  1436.     XResolution         = 640;
  1437.     YResolution         = 400;
  1438.     XCharSize           = 8;
  1439.     YCharSize           = 16;
  1440.     Colormodel          = 1;
  1441.     BitsPerPixel        = 8;
  1442.     NumberOfColors      = 256;
  1443.     BitsRGB             = 6;
  1444.     NumberOfBanks       = 1;
  1445.     BankSize            = 0;
  1446.     MemoryModel         = 0x4;
  1447.     NumberOfImagePages  = 0;
  1448.  
  1449. [SETMODE]
  1450.  outb(0x3d4,0x38);outb(0x3d5,0x48);      // unlock S3 registers (30..3c);
  1451.  outb(0x3d4,0x39);outb(0x3d5,0xa5);      // unlock system + extension (40..5f);
  1452.  outb(0x3d4,0x35);outb(0x3d5,0x00);      // unlock timing regs;
  1453.  outb(0x3d4,0x11);outb(0x3d5,0x00);      // unlock timing regs;
  1454.  
  1455.  r0  = 0x5f; r1  = 0x4f; r2  = 0x50; r3  = 0x82; r4  = 0x54;
  1456.  r5  = 0x80; r6  = 0xbf; r7  = 0x1f; r8  = 0x00; r9  = 0x40;
  1457.  r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff;
  1458.  r15 = 0x00; r16 = 0x9c; r17 = 0x8e; r18 = 0x8f; r19 = 0x50;
  1459.  r20 = 0x40; r21 = 0x96; r22 = 0xb9; r23 = 0xa3; r24 = 0xff;
  1460.  boutb(25,0x3d4,0x3d5);// forced display start address to 0,0
  1461.  
  1462.  outb(0x3d4,0x3b);outb(0x3d5,0x58);
  1463.  outb(0x3d4,0x3c);outb(0x3d5,0x2f);
  1464.  outb(0x3d4,0x42);outb(0x3d5,0x00);
  1465.  outb(0x3d4,0x54);outb(0x3d5,0xf8);
  1466.  outb(0x3d4,0x5d);outb(0x3d5,0x00);
  1467.  outb(0x3d4,0x5e);outb(0x3d5,0x00);
  1468.  outb(0x3d4,0x60);outb(0x3d5,0xff);
  1469.  outb(0x3d4,0x67);outb(0x3d5,0x00);
  1470.  
  1471.  
  1472. // TRIO64 internal clock synthesis
  1473.  
  1474.  outb(0x3c4,0x08); outb(0x3c5,0x06);
  1475.  outb(0x3c4,0x15); outb(0x3c5,0x00);
  1476.  
  1477. // M/N value: 6128, DCLK
  1478.  
  1479.  outb(0x3c4,0x12); outb(0x3c5,0x61);
  1480.  outb(0x3c4,0x13); outb(0x3c5,0x28);
  1481.  outb(0x3c4,0x18); outb(0x3c5,0x40);
  1482.  outb(0x3c4,0x15); outb(0x3c5,0x02);
  1483.  
  1484. // Bit 2&3 set enable loading of DCLK parameters
  1485.  outb(0x3c2,0xef);
  1486.  outb(0x3c4,0x08); outb(0x3c5,0x00);
  1487.  
  1488.  
  1489. //# [SPEA]
  1490.  //# SerialWord = 0x6128;
  1491.  //# DacMode = 0x0;
  1492.  //# Cr42 = 0x0;
  1493.  
  1494.