home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / spea / fire_gl / fglsdupp / fglsddup.exe / FIGLV97.SDD < prev   
Encoding:
Text File  |  1995-09-14  |  53.5 KB  |  1,545 lines

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