home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / actix.zip / svgadata.pmi < prev    next >
Text File  |  1993-12-15  |  44KB  |  1,990 lines

  1. /*
  2.  *    OS/2 2.1 SVGA PMI-File Generator
  3.  */
  4.  
  5. /*
  6.  *    Lock Extended Registers
  7.  */
  8.  
  9. [Lock]
  10. outb(0x3d4, 0x38);
  11. outb(0x3d5, 0x00);
  12. outb(0x3d4, 0x39);
  13. outb(0x3d5, 0x00);
  14.  
  15. /*
  16.  *    Unlock Extended Registers
  17.  */
  18.  
  19. [UnLock]
  20. outb(0x3d4, 0x38);
  21. outb(0x3d5, 0x48);
  22. outb(0x3d4, 0x39);
  23. outb(0x3d5, 0xa0);
  24. outb(0x3b4, 0x38);
  25. outb(0x3b5, 0x48);
  26. outb(0x3b4, 0x39);
  27. outb(0x3b5, 0xa0);
  28.  
  29. [Cleanup]
  30.  
  31. rmww(0x4ae8, 0x4ae8, 0x00, 0x00);
  32. rmwb(0x3d4, 0x3d5, 0x31, 0xf7, 0x00);
  33. rmwb(0x3d4, 0x3d5, 0x34, 0x00, 0x00);
  34. rmwb(0x3d4, 0x3d5, 0x3a, 0xef, 0x00);
  35. rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00);
  36. rmwb(0x3d4, 0x3d5, 0x45, 0xfe, 0x00);
  37. rmwb(0x3d4, 0x3d5, 0x51, 0xf3, 0x00);
  38. rmwb(0x3d4, 0x3d5, 0x58, 0xec, 0x00);
  39. rmwb(0x3d4, 0x3d5, 0x60, 0x00, 0x07);
  40. rmwb(0x3d4, 0x3d5, 0x61, 0x00, 0x80);
  41. rmwb(0x3d4, 0x3d5, 0x62, 0x00, 0xa1);
  42.  
  43. /*
  44.  *    HI-COLOR DAC by AT&T Microelectronics, Inc.
  45.  */
  46.  
  47. [comment]
  48.     Graphics Mode: 640 x 480 x 16 colors.
  49.  
  50. [AdapterType]
  51.         S3
  52.  
  53. [ChipSet]
  54.         S386C80X
  55.  
  56. [ModeInfo]
  57.         ModeAttributes   = 0x18
  58.         BytesPerScanLine = 80
  59.         XResolution      = 640
  60.         YResolution      = 480
  61.         TextRows         = 24
  62.         BitsPerPixel     = 4
  63.         NumberOfPlanes   = 4
  64.         PageLength       = 38400
  65.         SaveSize         = 153600
  66.         TotalMemory      = 1048576
  67.         InterlaceMode    = 1
  68.         BufferAddress    = 0x0a0000
  69.  
  70. [TrapRegs]
  71.     0x3c2;
  72.     0x3c4, 0x00-0x04;
  73.     0x3c5;
  74.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  75.     0x3d5;
  76.     0x3c0, 0x00-0x14;
  77.     0x3c1;
  78.     0x3ce, 0x00-0x08;
  79.     0x3cf;
  80.     0x4ae8;
  81.     0xbee8;
  82.     0x96e8;
  83.     0x86e8;
  84.     0x82e8;
  85.  
  86. [SetMode]
  87.  
  88. /*
  89.  *    Set Hi Color DAC
  90.  */
  91.  
  92. inb(r0, 0x3c7);
  93. inb(r0, 0x3c6);
  94. inb(r0, 0x3c6);
  95. inb(r0, 0x3c6);
  96. inb(r0, 0x3c6);
  97. r1    = 0x00;
  98. outb(0x3c6, r1);
  99. inb(r0, 0x3c7);
  100. outb(0x3c6, 0xff);
  101.  
  102. /*
  103.  *    Set Miscellaneous Output Register
  104.  */
  105.  
  106. outb(0x3c2, 0xe3);
  107.  
  108.  
  109. /*
  110.  *    Set Sequencer Registers
  111.  */
  112.  
  113. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x06;
  114. boutb(5, 0x00, 0x3c4, 0x3c5);
  115.  
  116. outw(0x3c4, 0x0300);
  117. /*
  118.  *    Set CRT Registers
  119.  */
  120.  
  121. outw(0x3d4, 0x0e11);
  122. r0   = 0x5f; r1   = 0x4f; r2   = 0x50; r3   = 0x82; r4   = 0x54;
  123. r5   = 0x80; r6   = 0x0b; r7   = 0x3e; r8   = 0x00; r9   = 0x40;
  124. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0x00;
  125. r15  = 0x00; r16  = 0xea; r17  = 0x8c; r18  = 0xdf; r19  = 0x28;
  126. r20  = 0x00; r21  = 0xe7; r22  = 0x04; r23  = 0xe3; r24  = 0xff;
  127. boutb(25, 0x00, 0x3d4, 0x3d5);
  128.  
  129. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  130. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  131. r90  = 0x0a; 
  132. boutb(11, 0x50, 0x3d4, 0x3d5);
  133.  
  134. r92  = 0x00; r93  = 0x00; r94  = 0x00; 
  135. boutb(3, 0x5c, 0x3d4, 0x3d5);
  136.  
  137. r96  = 0x07; r97  = 0x80; r98  = 0xa1; 
  138. boutb(3, 0x60, 0x3d4, 0x3d5);
  139.  
  140. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  141. boutb(5, 0x31, 0x3d4, 0x3d5);
  142.  
  143. r58  = 0x85; r59  = 0x5a; r60  = 0x10; 
  144. boutb(3, 0x3a, 0x3d4, 0x3d5);
  145.  
  146. r64  = 0x0d; 
  147. boutb(1, 0x40, 0x3d4, 0x3d5);
  148.  
  149. r67  = 0x00; 
  150. boutb(1, 0x43, 0x3d4, 0x3d5);
  151.  
  152. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  153. boutb(5, 0x45, 0x3d4, 0x3d5);
  154.  
  155. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  156. boutb(4, 0x4c, 0x3d4, 0x3d5);
  157.  
  158. r66  = 0x04; 
  159. boutb(1, 0x42, 0x3d4, 0x3d5);
  160.  
  161. /*
  162.  *    Set Attribute Registers
  163.  */
  164.  
  165. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  166. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  167. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  168. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  169. r20  = 0x00; 
  170. boutb(21, 0x00, 0x3c0, 0x3c1);
  171.  
  172. /*
  173.  *    Set GDC Registers
  174.  */
  175.  
  176. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  177. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  178. boutb(9, 0x00, 0x3ce, 0x3cf);
  179.  
  180. /*
  181.  *    Set Enhanced Command Registers
  182.  */
  183.  
  184. outw(0x4ae8, 0x0007);
  185. outw(0xbee8, 0x1000);
  186. outw(0xbee8, 0x33ff);
  187. outw(0xbee8, 0x2000);
  188. outw(0xbee8, 0x43ff);
  189. outw(0xbee8, 0xa000);
  190. outw(0xbee8, 0x03ff);
  191. outw(0x96e8, 0x03ff);
  192. outw(0x86e8, 0x0000);
  193. outw(0x82e8, 0x0000);
  194. [comment]
  195.     Graphics Mode: 640 x 480 x 256 colors.
  196.  
  197. [AdapterType]
  198.         S3
  199.  
  200. [ChipSet]
  201.         S386C80X
  202.  
  203. [ModeInfo]
  204.         ModeAttributes   = 0x18
  205.         BytesPerScanLine = 80
  206.         XResolution      = 640
  207.         YResolution      = 480
  208.         TextRows         = 30
  209.         BitsPerPixel     = 8
  210.         NumberOfPlanes   = 1
  211.         PageLength       = 491520
  212.         SaveSize         = 491520
  213.         TotalMemory      = 1048576
  214.         InterlaceMode    = 1
  215.         BufferAddress    = 0x0a0000
  216.  
  217. [TrapRegs]
  218.     0x3c2;
  219.     0x3c4, 0x00-0x04;
  220.     0x3c5;
  221.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  222.     0x3d5;
  223.     0x3c0, 0x00-0x14;
  224.     0x3c1;
  225.     0x3ce, 0x00-0x08;
  226.     0x3cf;
  227.     0x4ae8;
  228.     0xbee8;
  229.     0x96e8;
  230.     0x86e8;
  231.     0x82e8;
  232.  
  233. [SetMode]
  234.  
  235. /*
  236.  *    Set Hi Color DAC
  237.  */
  238.  
  239. inb(r0, 0x3c7);
  240. inb(r0, 0x3c6);
  241. inb(r0, 0x3c6);
  242. inb(r0, 0x3c6);
  243. inb(r0, 0x3c6);
  244. r1    = 0x00;
  245. outb(0x3c6, r1);
  246. inb(r0, 0x3c7);
  247. outb(0x3c6, 0xff);
  248.  
  249. /*
  250.  *    Set Miscellaneous Output Register
  251.  */
  252.  
  253. outb(0x3c2, 0xef);
  254.  
  255.  
  256. /*
  257.  *    Set Sequencer Registers
  258.  */
  259.  
  260. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  261. boutb(5, 0x00, 0x3c4, 0x3c5);
  262.  
  263. outw(0x3c4, 0x0300);
  264. /*
  265.  *    Set CRT Registers
  266.  */
  267.  
  268. outw(0x3d4, 0x0e11);
  269. r0   = 0x67; r1   = 0x4f; r2   = 0x50; r3   = 0x8a; r4   = 0x55;
  270. r5   = 0x9a; r6   = 0x07; r7   = 0x3e; r8   = 0x00; r9   = 0x40;
  271. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  272. r15  = 0x00; r16  = 0xe8; r17  = 0x8b; r18  = 0xdf; r19  = 0x50;
  273. r20  = 0x60; r21  = 0xdf; r22  = 0x07; r23  = 0xab; r24  = 0xff;
  274. boutb(25, 0x00, 0x3d4, 0x3d5);
  275.  
  276. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  277. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  278. r90  = 0x0a; 
  279. boutb(11, 0x50, 0x3d4, 0x3d5);
  280.  
  281. r92  = 0x0b; r93  = 0x00; r94  = 0x00; 
  282. boutb(3, 0x5c, 0x3d4, 0x3d5);
  283.  
  284. r96  = 0x07; r97  = 0x80; r98  = 0xa1; 
  285. boutb(3, 0x60, 0x3d4, 0x3d5);
  286.  
  287. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  288. boutb(5, 0x31, 0x3d4, 0x3d5);
  289.  
  290. r58  = 0x95; r59  = 0x5e; r60  = 0x40; 
  291. boutb(3, 0x3a, 0x3d4, 0x3d5);
  292.  
  293. r64  = 0x01; 
  294. boutb(1, 0x40, 0x3d4, 0x3d5);
  295.  
  296. r67  = 0x00; 
  297. boutb(1, 0x43, 0x3d4, 0x3d5);
  298.  
  299. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  300. boutb(5, 0x45, 0x3d4, 0x3d5);
  301.  
  302. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  303. boutb(4, 0x4c, 0x3d4, 0x3d5);
  304.  
  305. r66  = 0x0b; 
  306. boutb(1, 0x42, 0x3d4, 0x3d5);
  307.  
  308. /*
  309.  *    Set Attribute Registers
  310.  */
  311.  
  312. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  313. r5   = 0x05; r6   = 0x06; r7   = 0x07; r8   = 0x10; r9   = 0x11;
  314. r10  = 0x12; r11  = 0x13; r12  = 0x14; r13  = 0x15; r14  = 0x16;
  315. r15  = 0x17; r16  = 0x41; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  316. r20  = 0x00; 
  317. boutb(21, 0x00, 0x3c0, 0x3c1);
  318.  
  319. /*
  320.  *    Set GDC Registers
  321.  */
  322.  
  323. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  324. r5   = 0x40; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  325. boutb(9, 0x00, 0x3ce, 0x3cf);
  326.  
  327. /*
  328.  *    Set Enhanced Command Registers
  329.  */
  330.  
  331. outw(0x4ae8, 0x0001);
  332. outw(0xbee8, 0x1000);
  333. outw(0xbee8, 0x33ff);
  334. outw(0xbee8, 0x2000);
  335. outw(0xbee8, 0x43ff);
  336. outw(0xbee8, 0xa000);
  337. outw(0xbee8, 0x03ff);
  338. outw(0x96e8, 0x03ff);
  339. outw(0x86e8, 0x0000);
  340. outw(0x82e8, 0x0000);
  341. [comment]
  342.     Graphics Mode: 640 x 480 x 64K colors.
  343.  
  344. [AdapterType]
  345.         S3
  346.  
  347. [ChipSet]
  348.         S386C80X
  349.  
  350. [ModeInfo]
  351.         ModeAttributes   = 0x18
  352.         BytesPerScanLine = 80
  353.         XResolution      = 640
  354.         YResolution      = 480
  355.         TextRows         = 30
  356.         BitsPerPixel     = 16
  357.         NumberOfPlanes   = 1
  358.         PageLength       = 614400
  359.         SaveSize         = 614400
  360.         TotalMemory      = 1048576
  361.         InterlaceMode    = 1
  362.         BufferAddress    = 0x0a0000
  363.  
  364. [TrapRegs]
  365.     0x3c2;
  366.     0x3c4, 0x00-0x04;
  367.     0x3c5;
  368.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  369.     0x3d5;
  370.     0x3c0, 0x00-0x14;
  371.     0x3c1;
  372.     0x3ce, 0x00-0x08;
  373.     0x3cf;
  374.     0x4ae8;
  375.     0xbee8;
  376.     0x96e8;
  377.     0x86e8;
  378.     0x82e8;
  379.  
  380. [SetMode]
  381.  
  382. /*
  383.  *    Set Hi Color DAC
  384.  */
  385.  
  386. inb(r0, 0x3c7);
  387. inb(r0, 0x3c6);
  388. inb(r0, 0x3c6);
  389. inb(r0, 0x3c6);
  390. inb(r0, 0x3c6);
  391. r1    = 0x00;
  392. outb(0x3c6, r1);
  393. inb(r0, 0x3c7);
  394. outb(0x3c6, 0xff);
  395.  
  396. /*
  397.  *    Set Miscellaneous Output Register
  398.  */
  399.  
  400. outb(0x3c2, 0xef);
  401.  
  402.  
  403. /*
  404.  *    Set Sequencer Registers
  405.  */
  406.  
  407. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  408. boutb(5, 0x00, 0x3c4, 0x3c5);
  409.  
  410. outw(0x3c4, 0x0300);
  411. /*
  412.  *    Set CRT Registers
  413.  */
  414.  
  415. outw(0x3d4, 0x0e11);
  416. r0   = 0xc5; r1   = 0x9f; r2   = 0xa2; r3   = 0x86; r4   = 0xa5;
  417. r5   = 0x1d; r6   = 0x0c; r7   = 0x3e; r8   = 0x00; r9   = 0x40;
  418. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  419. r15  = 0x00; r16  = 0xea; r17  = 0x8c; r18  = 0xdf; r19  = 0xa0;
  420. r20  = 0x60; r21  = 0xe7; r22  = 0x05; r23  = 0xab; r24  = 0xff;
  421. boutb(25, 0x00, 0x3d4, 0x3d5);
  422.  
  423. r80  = 0x50; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x48;
  424. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  425. r90  = 0x0a; 
  426. boutb(11, 0x50, 0x3d4, 0x3d5);
  427.  
  428. r92  = 0x04; r93  = 0x00; r94  = 0x00; 
  429. boutb(3, 0x5c, 0x3d4, 0x3d5);
  430.  
  431. r96  = 0x2f; r97  = 0x81; r98  = 0x40; 
  432. boutb(3, 0x60, 0x3d4, 0x3d5);
  433.  
  434. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  435. boutb(5, 0x31, 0x3d4, 0x3d5);
  436.  
  437. r58  = 0x95; r59  = 0xbe; r60  = 0x40; 
  438. boutb(3, 0x3a, 0x3d4, 0x3d5);
  439.  
  440. r64  = 0x01; 
  441. boutb(1, 0x40, 0x3d4, 0x3d5);
  442.  
  443. r67  = 0x00; 
  444. boutb(1, 0x43, 0x3d4, 0x3d5);
  445.  
  446. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  447. boutb(5, 0x45, 0x3d4, 0x3d5);
  448.  
  449. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  450. boutb(4, 0x4c, 0x3d4, 0x3d5);
  451.  
  452. r66  = 0x04; 
  453. boutb(1, 0x42, 0x3d4, 0x3d5);
  454.  
  455. /*
  456.  *    Set Attribute Registers
  457.  */
  458.  
  459. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  460. r5   = 0x05; r6   = 0x06; r7   = 0x07; r8   = 0x10; r9   = 0x11;
  461. r10  = 0x12; r11  = 0x13; r12  = 0x14; r13  = 0x15; r14  = 0x16;
  462. r15  = 0x17; r16  = 0x41; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  463. r20  = 0x00; 
  464. boutb(21, 0x00, 0x3c0, 0x3c1);
  465.  
  466. /*
  467.  *    Set GDC Registers
  468.  */
  469.  
  470. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  471. r5   = 0x40; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  472. boutb(9, 0x00, 0x3ce, 0x3cf);
  473.  
  474. /*
  475.  *    Set Enhanced Command Registers
  476.  */
  477.  
  478. outw(0x4ae8, 0x0001);
  479. outw(0xbee8, 0x1000);
  480. outw(0xbee8, 0x33ff);
  481. outw(0xbee8, 0x2000);
  482. outw(0xbee8, 0x43ff);
  483. outw(0xbee8, 0xa000);
  484. outw(0xbee8, 0x03ff);
  485. outw(0x96e8, 0x03ff);
  486. outw(0x86e8, 0x0000);
  487. outw(0x82e8, 0x0000);
  488. /*
  489.  *    Set Hi Color DAC
  490.  */
  491.  
  492. inb(r0, 0x3c7);
  493. inb(r0, 0x3c6);
  494. inb(r0, 0x3c6);
  495. inb(r0, 0x3c6);
  496. inb(r0, 0x3c6);
  497. r1    = 0xc0;
  498. outb(0x3c6, r1);
  499. inb(r0, 0x3c7);
  500. outb(0x3c6, 0xff);
  501.  
  502. [comment]
  503.     Graphics Mode: 640 x 480 x 16.7M colors.
  504.  
  505. [AdapterType]
  506.         S3
  507.  
  508. [ChipSet]
  509.         S386C80X
  510.  
  511. [ModeInfo]
  512.         ModeAttributes   = 0x18
  513.         BytesPerScanLine = 80
  514.         XResolution      = 640
  515.         YResolution      = 480
  516.         TextRows         = 30
  517.         BitsPerPixel     = 24
  518.         NumberOfPlanes   = 1
  519.         PageLength       = 921600
  520.         SaveSize         = 921600
  521.         TotalMemory      = 1048576
  522.         InterlaceMode    = 1
  523.         BufferAddress    = 0x0a0000
  524.  
  525. [TrapRegs]
  526.     0x3c2;
  527.     0x3c4, 0x00-0x04;
  528.     0x3c5;
  529.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  530.     0x3d5;
  531.     0x3c0, 0x00-0x14;
  532.     0x3c1;
  533.     0x3ce, 0x00-0x08;
  534.     0x3cf;
  535.     0x4ae8;
  536.     0xbee8;
  537.     0x96e8;
  538.     0x86e8;
  539.     0x82e8;
  540.  
  541. [SetMode]
  542.  
  543. /*
  544.  *    Set Hi Color DAC
  545.  */
  546.  
  547. inb(r0, 0x3c7);
  548. inb(r0, 0x3c6);
  549. inb(r0, 0x3c6);
  550. inb(r0, 0x3c6);
  551. inb(r0, 0x3c6);
  552. r1    = 0x00;
  553. outb(0x3c6, r1);
  554. inb(r0, 0x3c7);
  555. outb(0x3c6, 0xff);
  556.  
  557. /*
  558.  *    Set Miscellaneous Output Register
  559.  */
  560.  
  561. outb(0x3c2, 0xef);
  562.  
  563.  
  564. /*
  565.  *    Set Sequencer Registers
  566.  */
  567.  
  568. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  569. boutb(5, 0x00, 0x3c4, 0x3c5);
  570.  
  571. outw(0x3c4, 0x0300);
  572. /*
  573.  *    Set CRT Registers
  574.  */
  575.  
  576. outw(0x3d4, 0x0e11);
  577. r0   = 0x90; r1   = 0x77; r2   = 0x78; r3   = 0x91; r4   = 0x78;
  578. r5   = 0x0a; r6   = 0x0a; r7   = 0x3e; r8   = 0x00; r9   = 0x40;
  579. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  580. r15  = 0x00; r16  = 0xea; r17  = 0x8c; r18  = 0xdf; r19  = 0x00;
  581. r20  = 0x60; r21  = 0xe7; r22  = 0x03; r23  = 0xab; r24  = 0xff;
  582. boutb(25, 0x00, 0x3d4, 0x3d5);
  583.  
  584. r80  = 0x40; r81  = 0x10; r82  = 0xaa; r83  = 0x00; r84  = 0x00;
  585. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  586. r90  = 0x0a; 
  587. boutb(11, 0x50, 0x3d4, 0x3d5);
  588.  
  589. r92  = 0x0c; r93  = 0x00; r94  = 0x00; 
  590. boutb(3, 0x5c, 0x3d4, 0x3d5);
  591.  
  592. r96  = 0x7b; r97  = 0x81; r98  = 0xe0; 
  593. boutb(3, 0x60, 0x3d4, 0x3d5);
  594.  
  595. r49  = 0x8f; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  596. boutb(5, 0x31, 0x3d4, 0x3d5);
  597.  
  598. r58  = 0x95; r59  = 0x92; r60  = 0x40; 
  599. boutb(3, 0x3a, 0x3d4, 0x3d5);
  600.  
  601. r64  = 0x01; 
  602. boutb(1, 0x40, 0x3d4, 0x3d5);
  603.  
  604. r67  = 0x80; 
  605. boutb(1, 0x43, 0x3d4, 0x3d5);
  606.  
  607. r69  = 0x80; r70  = 0x80; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  608. boutb(5, 0x45, 0x3d4, 0x3d5);
  609.  
  610. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  611. boutb(4, 0x4c, 0x3d4, 0x3d5);
  612.  
  613. r66  = 0x0c; 
  614. boutb(1, 0x42, 0x3d4, 0x3d5);
  615.  
  616. /*
  617.  *    Set Attribute Registers
  618.  */
  619.  
  620. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  621. r5   = 0x05; r6   = 0x06; r7   = 0x07; r8   = 0x10; r9   = 0x11;
  622. r10  = 0x12; r11  = 0x13; r12  = 0x14; r13  = 0x15; r14  = 0x16;
  623. r15  = 0x17; r16  = 0x41; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  624. r20  = 0x00; 
  625. boutb(21, 0x00, 0x3c0, 0x3c1);
  626.  
  627. /*
  628.  *    Set GDC Registers
  629.  */
  630.  
  631. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  632. r5   = 0x40; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  633. boutb(9, 0x00, 0x3ce, 0x3cf);
  634.  
  635. /*
  636.  *    Set Enhanced Command Registers
  637.  */
  638.  
  639. outw(0x4ae8, 0x0001);
  640. outw(0xbee8, 0x1000);
  641. outw(0xbee8, 0x33ff);
  642. outw(0xbee8, 0x2000);
  643. outw(0xbee8, 0x43ff);
  644. outw(0xbee8, 0xa000);
  645. outw(0xbee8, 0x03ff);
  646. outw(0x96e8, 0x03ff);
  647. outw(0x86e8, 0x0000);
  648. outw(0x82e8, 0x0000);
  649. /*
  650.  *    Set Hi Color DAC
  651.  */
  652.  
  653. inb(r0, 0x3c7);
  654. inb(r0, 0x3c6);
  655. inb(r0, 0x3c6);
  656. inb(r0, 0x3c6);
  657. inb(r0, 0x3c6);
  658. r1    = 0xe0;
  659. outb(0x3c6, r1);
  660. inb(r0, 0x3c7);
  661. outb(0x3c6, 0xff);
  662.  
  663. [comment]
  664.     Graphics Mode: 800 x 600 x 16 colors.
  665.  
  666. [AdapterType]
  667.         S3
  668.  
  669. [ChipSet]
  670.         S386C80X
  671.  
  672. [ModeInfo]
  673.         ModeAttributes   = 0x18
  674.         BytesPerScanLine = 100
  675.         XResolution      = 800
  676.         YResolution      = 600
  677.         TextRows         = 37
  678.         BitsPerPixel     = 4
  679.         NumberOfPlanes   = 4
  680.         PageLength       = 76800
  681.         SaveSize         = 307200
  682.         TotalMemory      = 1048576
  683.         InterlaceMode    = 1
  684.         BufferAddress    = 0x0a0000
  685.  
  686. [TrapRegs]
  687.     0x3c2;
  688.     0x3c4, 0x00-0x04;
  689.     0x3c5;
  690.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  691.     0x3d5;
  692.     0x3c0, 0x00-0x14;
  693.     0x3c1;
  694.     0x3ce, 0x00-0x08;
  695.     0x3cf;
  696.     0x4ae8;
  697.     0xbee8;
  698.     0x96e8;
  699.     0x86e8;
  700.     0x82e8;
  701.  
  702. [SetMode]
  703.  
  704. /*
  705.  *    Set Hi Color DAC
  706.  */
  707.  
  708. inb(r0, 0x3c7);
  709. inb(r0, 0x3c6);
  710. inb(r0, 0x3c6);
  711. inb(r0, 0x3c6);
  712. inb(r0, 0x3c6);
  713. r1    = 0x00;
  714. outb(0x3c6, r1);
  715. inb(r0, 0x3c7);
  716. outb(0x3c6, 0xff);
  717.  
  718. /*
  719.  *    Set Miscellaneous Output Register
  720.  */
  721.  
  722. outb(0x3c2, 0xef);
  723.  
  724.  
  725. /*
  726.  *    Set Sequencer Registers
  727.  */
  728.  
  729. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x06;
  730. boutb(5, 0x00, 0x3c4, 0x3c5);
  731.  
  732. outw(0x3c4, 0x0300);
  733. /*
  734.  *    Set CRT Registers
  735.  */
  736.  
  737. outw(0x3d4, 0x0e11);
  738. r0   = 0x7d; r1   = 0x63; r2   = 0x64; r3   = 0x80; r4   = 0x6a;
  739. r5   = 0x19; r6   = 0x98; r7   = 0xf0; r8   = 0x00; r9   = 0x60;
  740. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  741. r15  = 0x00; r16  = 0x60; r17  = 0x86; r18  = 0x57; r19  = 0x32;
  742. r20  = 0x00; r21  = 0x57; r22  = 0x98; r23  = 0xe3; r24  = 0xff;
  743. boutb(25, 0x00, 0x3d4, 0x3d5);
  744.  
  745. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x48;
  746. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  747. r90  = 0x0a; 
  748. boutb(11, 0x50, 0x3d4, 0x3d5);
  749.  
  750. r92  = 0x04; r93  = 0x00; r94  = 0x00; 
  751. boutb(3, 0x5c, 0x3d4, 0x3d5);
  752.  
  753. r96  = 0x2f; r97  = 0x80; r98  = 0xa1; 
  754. boutb(3, 0x60, 0x3d4, 0x3d5);
  755.  
  756. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x02; r53  = 0x00;
  757. boutb(5, 0x31, 0x3d4, 0x3d5);
  758.  
  759. r58  = 0x85; r59  = 0x78; r60  = 0x10; 
  760. boutb(3, 0x3a, 0x3d4, 0x3d5);
  761.  
  762. r64  = 0x01; 
  763. boutb(1, 0x40, 0x3d4, 0x3d5);
  764.  
  765. r67  = 0x00; 
  766. boutb(1, 0x43, 0x3d4, 0x3d5);
  767.  
  768. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  769. boutb(5, 0x45, 0x3d4, 0x3d5);
  770.  
  771. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  772. boutb(4, 0x4c, 0x3d4, 0x3d5);
  773.  
  774. r66  = 0x04; 
  775. boutb(1, 0x42, 0x3d4, 0x3d5);
  776.  
  777. /*
  778.  *    Set Attribute Registers
  779.  */
  780.  
  781. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  782. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  783. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  784. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  785. r20  = 0x00; 
  786. boutb(21, 0x00, 0x3c0, 0x3c1);
  787.  
  788. /*
  789.  *    Set GDC Registers
  790.  */
  791.  
  792. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  793. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  794. boutb(9, 0x00, 0x3ce, 0x3cf);
  795.  
  796. /*
  797.  *    Set Enhanced Command Registers
  798.  */
  799.  
  800. outw(0x4ae8, 0x0007);
  801. outw(0xbee8, 0x1000);
  802. outw(0xbee8, 0x33ff);
  803. outw(0xbee8, 0x2000);
  804. outw(0xbee8, 0x43ff);
  805. outw(0xbee8, 0xa000);
  806. outw(0xbee8, 0x03ff);
  807. outw(0x96e8, 0x03ff);
  808. outw(0x86e8, 0x0000);
  809. outw(0x82e8, 0x0000);
  810. [comment]
  811.     Graphics Mode: 800 x 600 x 256 colors.
  812.  
  813. [AdapterType]
  814.         S3
  815.  
  816. [ChipSet]
  817.         S386C80X
  818.  
  819. [ModeInfo]
  820.         ModeAttributes   = 0x18
  821.         BytesPerScanLine = 100
  822.         XResolution      = 800
  823.         YResolution      = 600
  824.         TextRows         = 37
  825.         BitsPerPixel     = 8
  826.         NumberOfPlanes   = 1
  827.         PageLength       = 614400
  828.         SaveSize         = 614400
  829.         TotalMemory      = 1048576
  830.         InterlaceMode    = 1
  831.         BufferAddress    = 0x0a0000
  832.  
  833. [TrapRegs]
  834.     0x3c2;
  835.     0x3c4, 0x00-0x04;
  836.     0x3c5;
  837.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  838.     0x3d5;
  839.     0x3c0, 0x00-0x14;
  840.     0x3c1;
  841.     0x3ce, 0x00-0x08;
  842.     0x3cf;
  843.     0x4ae8;
  844.     0xbee8;
  845.     0x96e8;
  846.     0x86e8;
  847.     0x82e8;
  848.  
  849. [SetMode]
  850.  
  851. /*
  852.  *    Set Hi Color DAC
  853.  */
  854.  
  855. inb(r0, 0x3c7);
  856. inb(r0, 0x3c6);
  857. inb(r0, 0x3c6);
  858. inb(r0, 0x3c6);
  859. inb(r0, 0x3c6);
  860. r1    = 0x00;
  861. outb(0x3c6, r1);
  862. inb(r0, 0x3c7);
  863. outb(0x3c6, 0xff);
  864.  
  865. /*
  866.  *    Set Miscellaneous Output Register
  867.  */
  868.  
  869. outb(0x3c2, 0xef);
  870.  
  871.  
  872. /*
  873.  *    Set Sequencer Registers
  874.  */
  875.  
  876. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  877. boutb(5, 0x00, 0x3c4, 0x3c5);
  878.  
  879. outw(0x3c4, 0x0300);
  880. /*
  881.  *    Set CRT Registers
  882.  */
  883.  
  884. outw(0x3d4, 0x0e11);
  885. r0   = 0x7d; r1   = 0x63; r2   = 0x64; r3   = 0x80; r4   = 0x6a;
  886. r5   = 0x19; r6   = 0x98; r7   = 0xf0; r8   = 0x00; r9   = 0x60;
  887. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  888. r15  = 0x00; r16  = 0x60; r17  = 0x86; r18  = 0x57; r19  = 0x64;
  889. r20  = 0x00; r21  = 0x57; r22  = 0x98; r23  = 0xe3; r24  = 0xff;
  890. boutb(25, 0x00, 0x3d4, 0x3d5);
  891.  
  892. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x08;
  893. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  894. r90  = 0x0a; 
  895. boutb(11, 0x50, 0x3d4, 0x3d5);
  896.  
  897. r92  = 0x04; r93  = 0x00; r94  = 0x00; 
  898. boutb(3, 0x5c, 0x3d4, 0x3d5);
  899.  
  900. r96  = 0x2f; r97  = 0x80; r98  = 0xc9; 
  901. boutb(3, 0x60, 0x3d4, 0x3d5);
  902.  
  903. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  904. boutb(5, 0x31, 0x3d4, 0x3d5);
  905.  
  906. r58  = 0x95; r59  = 0x78; r60  = 0x40; 
  907. boutb(3, 0x3a, 0x3d4, 0x3d5);
  908.  
  909. r64  = 0x01; 
  910. boutb(1, 0x40, 0x3d4, 0x3d5);
  911.  
  912. r67  = 0x00; 
  913. boutb(1, 0x43, 0x3d4, 0x3d5);
  914.  
  915. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  916. boutb(5, 0x45, 0x3d4, 0x3d5);
  917.  
  918. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  919. boutb(4, 0x4c, 0x3d4, 0x3d5);
  920.  
  921. r66  = 0x04; 
  922. boutb(1, 0x42, 0x3d4, 0x3d5);
  923.  
  924. /*
  925.  *    Set Attribute Registers
  926.  */
  927.  
  928. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  929. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  930. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  931. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  932. r20  = 0x00; 
  933. boutb(21, 0x00, 0x3c0, 0x3c1);
  934.  
  935. /*
  936.  *    Set GDC Registers
  937.  */
  938.  
  939. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  940. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  941. boutb(9, 0x00, 0x3ce, 0x3cf);
  942.  
  943. /*
  944.  *    Set Enhanced Command Registers
  945.  */
  946.  
  947. outw(0x4ae8, 0x0007);
  948. outw(0xbee8, 0x1000);
  949. outw(0xbee8, 0x33ff);
  950. outw(0xbee8, 0x2000);
  951. outw(0xbee8, 0x43ff);
  952. outw(0xbee8, 0xa000);
  953. outw(0xbee8, 0x03ff);
  954. outw(0x96e8, 0x03ff);
  955. outw(0x86e8, 0x0000);
  956. outw(0x82e8, 0x0000);
  957. [comment]
  958.     Graphics Mode: 800 x 600 x 64K colors.
  959.  
  960. [AdapterType]
  961.         S3
  962.  
  963. [ChipSet]
  964.         S386C80X
  965.  
  966. [ModeInfo]
  967.         ModeAttributes   = 0x18
  968.         BytesPerScanLine = 100
  969.         XResolution      = 800
  970.         YResolution      = 600
  971.         TextRows         = 37
  972.         BitsPerPixel     = 16
  973.         NumberOfPlanes   = 1
  974.         PageLength       = 960000
  975.         SaveSize         = 960000
  976.         TotalMemory      = 1048576
  977.         InterlaceMode    = 1
  978.         BufferAddress    = 0x0a0000
  979.  
  980. [TrapRegs]
  981.     0x3c2;
  982.     0x3c4, 0x00-0x04;
  983.     0x3c5;
  984.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  985.     0x3d5;
  986.     0x3c0, 0x00-0x14;
  987.     0x3c1;
  988.     0x3ce, 0x00-0x08;
  989.     0x3cf;
  990.     0x4ae8;
  991.     0xbee8;
  992.     0x96e8;
  993.     0x86e8;
  994.     0x82e8;
  995.  
  996. [SetMode]
  997.  
  998. /*
  999.  *    Set Hi Color DAC
  1000.  */
  1001.  
  1002. inb(r0, 0x3c7);
  1003. inb(r0, 0x3c6);
  1004. inb(r0, 0x3c6);
  1005. inb(r0, 0x3c6);
  1006. inb(r0, 0x3c6);
  1007. r1    = 0x00;
  1008. outb(0x3c6, r1);
  1009. inb(r0, 0x3c7);
  1010. outb(0x3c6, 0xff);
  1011.  
  1012. /*
  1013.  *    Set Miscellaneous Output Register
  1014.  */
  1015.  
  1016. outb(0x3c2, 0xef);
  1017.  
  1018.  
  1019. /*
  1020.  *    Set Sequencer Registers
  1021.  */
  1022.  
  1023. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  1024. boutb(5, 0x00, 0x3c4, 0x3c5);
  1025.  
  1026. outw(0x3c4, 0x0300);
  1027. /*
  1028.  *    Set CRT Registers
  1029.  */
  1030.  
  1031. outw(0x3d4, 0x0e11);
  1032. r0   = 0xff; r1   = 0xc7; r2   = 0xc7; r3   = 0x82; r4   = 0xcc;
  1033. r5   = 0x00; r6   = 0x8e; r7   = 0xf0; r8   = 0x00; r9   = 0x60;
  1034. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  1035. r15  = 0x00; r16  = 0x66; r17  = 0x8c; r18  = 0x57; r19  = 0xc8;
  1036. r20  = 0x00; r21  = 0x63; r22  = 0x80; r23  = 0xa3; r24  = 0xff;
  1037. boutb(25, 0x00, 0x3d4, 0x3d5);
  1038.  
  1039. r80  = 0x90; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x10;
  1040. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  1041. r90  = 0x0a; 
  1042. boutb(11, 0x50, 0x3d4, 0x3d5);
  1043.  
  1044. r92  = 0x0f; r93  = 0x00; r94  = 0x00; 
  1045. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1046.  
  1047. r96  = 0x40; r97  = 0x81; r98  = 0x92; 
  1048. boutb(3, 0x60, 0x3d4, 0x3d5);
  1049.  
  1050. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1051. boutb(5, 0x31, 0x3d4, 0x3d5);
  1052.  
  1053. r58  = 0x95; r59  = 0xf8; r60  = 0x00; 
  1054. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1055.  
  1056. r64  = 0x01; 
  1057. boutb(1, 0x40, 0x3d4, 0x3d5);
  1058.  
  1059. r67  = 0x00; 
  1060. boutb(1, 0x43, 0x3d4, 0x3d5);
  1061.  
  1062. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1063. boutb(5, 0x45, 0x3d4, 0x3d5);
  1064.  
  1065. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1066. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1067.  
  1068. r66  = 0x0f; 
  1069. boutb(1, 0x42, 0x3d4, 0x3d5);
  1070.  
  1071. /*
  1072.  *    Set Attribute Registers
  1073.  */
  1074.  
  1075. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1076. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1077. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1078. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  1079. r20  = 0x00; 
  1080. boutb(21, 0x00, 0x3c0, 0x3c1);
  1081.  
  1082. /*
  1083.  *    Set GDC Registers
  1084.  */
  1085.  
  1086. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1087. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  1088. boutb(9, 0x00, 0x3ce, 0x3cf);
  1089.  
  1090. /*
  1091.  *    Set Enhanced Command Registers
  1092.  */
  1093.  
  1094. outw(0x4ae8, 0x0003);
  1095. outw(0xbee8, 0x1000);
  1096. outw(0xbee8, 0x33ff);
  1097. outw(0xbee8, 0x2000);
  1098. outw(0xbee8, 0x43ff);
  1099. outw(0xbee8, 0xa000);
  1100. outw(0xbee8, 0x03ff);
  1101. outw(0x96e8, 0x03ff);
  1102. outw(0x86e8, 0x0000);
  1103. outw(0x82e8, 0x0000);
  1104. /*
  1105.  *    Set Hi Color DAC
  1106.  */
  1107.  
  1108. inb(r0, 0x3c7);
  1109. inb(r0, 0x3c6);
  1110. inb(r0, 0x3c6);
  1111. inb(r0, 0x3c6);
  1112. inb(r0, 0x3c6);
  1113. r1    = 0xc0;
  1114. outb(0x3c6, r1);
  1115. inb(r0, 0x3c7);
  1116. outb(0x3c6, 0xff);
  1117.  
  1118. [comment]
  1119.     Graphics Mode: 1024 x 768 x 16 colors.
  1120.  
  1121. [AdapterType]
  1122.         S3
  1123.  
  1124. [ChipSet]
  1125.         S386C80X
  1126.  
  1127. [ModeInfo]
  1128.         ModeAttributes   = 0x18
  1129.         BytesPerScanLine = 128
  1130.         XResolution      = 1024
  1131.         YResolution      = 768
  1132.         TextRows         = 48
  1133.         BitsPerPixel     = 4
  1134.         NumberOfPlanes   = 4
  1135.         PageLength       = 98304
  1136.         SaveSize         = 393216
  1137.         TotalMemory      = 1048576
  1138.         InterlaceMode    = 1
  1139.         BufferAddress    = 0x0a0000
  1140.  
  1141. [TrapRegs]
  1142.     0x3c2;
  1143.     0x3c4, 0x00-0x04;
  1144.     0x3c5;
  1145.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1146.     0x3d5;
  1147.     0x3c0, 0x00-0x14;
  1148.     0x3c1;
  1149.     0x3ce, 0x00-0x08;
  1150.     0x3cf;
  1151.     0x4ae8;
  1152.     0xbee8;
  1153.     0x96e8;
  1154.     0x86e8;
  1155.     0x82e8;
  1156.  
  1157. [SetMode]
  1158.  
  1159. /*
  1160.  *    Set Hi Color DAC
  1161.  */
  1162.  
  1163. inb(r0, 0x3c7);
  1164. inb(r0, 0x3c6);
  1165. inb(r0, 0x3c6);
  1166. inb(r0, 0x3c6);
  1167. inb(r0, 0x3c6);
  1168. r1    = 0x00;
  1169. outb(0x3c6, r1);
  1170. inb(r0, 0x3c7);
  1171. outb(0x3c6, 0xff);
  1172.  
  1173. /*
  1174.  *    Set Miscellaneous Output Register
  1175.  */
  1176.  
  1177. outb(0x3c2, 0x2f);
  1178.  
  1179.  
  1180. /*
  1181.  *    Set Sequencer Registers
  1182.  */
  1183.  
  1184. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x06;
  1185. boutb(5, 0x00, 0x3c4, 0x3c5);
  1186.  
  1187. outw(0x3c4, 0x0300);
  1188. /*
  1189.  *    Set CRT Registers
  1190.  */
  1191.  
  1192. outw(0x3d4, 0x0e11);
  1193. r0   = 0xa1; r1   = 0x7f; r2   = 0x80; r3   = 0x84; r4   = 0x82;
  1194. r5   = 0x93; r6   = 0x24; r7   = 0xf5; r8   = 0x00; r9   = 0x60;
  1195. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  1196. r15  = 0x00; r16  = 0x02; r17  = 0x88; r18  = 0xff; r19  = 0x40;
  1197. r20  = 0x60; r21  = 0xff; r22  = 0x24; r23  = 0xeb; r24  = 0xff;
  1198. boutb(25, 0x00, 0x3d4, 0x3d5);
  1199.  
  1200. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x48;
  1201. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  1202. r90  = 0x0a; 
  1203. boutb(11, 0x50, 0x3d4, 0x3d5);
  1204.  
  1205. r92  = 0x0e; r93  = 0x00; r94  = 0x00; 
  1206. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1207.  
  1208. r96  = 0x2f; r97  = 0x80; r98  = 0x80; 
  1209. boutb(3, 0x60, 0x3d4, 0x3d5);
  1210.  
  1211. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x02; r53  = 0x00;
  1212. boutb(5, 0x31, 0x3d4, 0x3d5);
  1213.  
  1214. r58  = 0x85; r59  = 0x9d; r60  = 0x40; 
  1215. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1216.  
  1217. r64  = 0x01; 
  1218. boutb(1, 0x40, 0x3d4, 0x3d5);
  1219.  
  1220. r67  = 0x00; 
  1221. boutb(1, 0x43, 0x3d4, 0x3d5);
  1222.  
  1223. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1224. boutb(5, 0x45, 0x3d4, 0x3d5);
  1225.  
  1226. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1227. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1228.  
  1229. r66  = 0x0e; 
  1230. boutb(1, 0x42, 0x3d4, 0x3d5);
  1231.  
  1232. /*
  1233.  *    Set Attribute Registers
  1234.  */
  1235.  
  1236. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1237. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1238. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1239. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  1240. r20  = 0x00; 
  1241. boutb(21, 0x00, 0x3c0, 0x3c1);
  1242.  
  1243. /*
  1244.  *    Set GDC Registers
  1245.  */
  1246.  
  1247. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1248. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  1249. boutb(9, 0x00, 0x3ce, 0x3cf);
  1250.  
  1251. /*
  1252.  *    Set Enhanced Command Registers
  1253.  */
  1254.  
  1255. outw(0x4ae8, 0x0007);
  1256. outw(0xbee8, 0x1000);
  1257. outw(0xbee8, 0x33ff);
  1258. outw(0xbee8, 0x2000);
  1259. outw(0xbee8, 0x43ff);
  1260. outw(0xbee8, 0xa000);
  1261. outw(0xbee8, 0x03ff);
  1262. outw(0x96e8, 0x03ff);
  1263. outw(0x86e8, 0x0000);
  1264. outw(0x82e8, 0x0000);
  1265. [comment]
  1266.     Graphics Mode: 1024 x 768 x 256 colors.
  1267.  
  1268. [AdapterType]
  1269.         S3
  1270.  
  1271. [ChipSet]
  1272.         S386C80X
  1273.  
  1274. [ModeInfo]
  1275.         ModeAttributes   = 0x18
  1276.         BytesPerScanLine = 128
  1277.         XResolution      = 1024
  1278.         YResolution      = 768
  1279.         TextRows         = 48
  1280.         BitsPerPixel     = 8
  1281.         NumberOfPlanes   = 1
  1282.         PageLength       = 786432
  1283.         SaveSize         = 786432
  1284.         TotalMemory      = 1048576
  1285.         InterlaceMode    = 1
  1286.         BufferAddress    = 0x0a0000
  1287.  
  1288. [TrapRegs]
  1289.     0x3c2;
  1290.     0x3c4, 0x00-0x04;
  1291.     0x3c5;
  1292.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1293.     0x3d5;
  1294.     0x3c0, 0x00-0x14;
  1295.     0x3c1;
  1296.     0x3ce, 0x00-0x08;
  1297.     0x3cf;
  1298.     0x4ae8;
  1299.     0xbee8;
  1300.     0x96e8;
  1301.     0x86e8;
  1302.     0x82e8;
  1303.  
  1304. [SetMode]
  1305.  
  1306. /*
  1307.  *    Set Hi Color DAC
  1308.  */
  1309.  
  1310. inb(r0, 0x3c7);
  1311. inb(r0, 0x3c6);
  1312. inb(r0, 0x3c6);
  1313. inb(r0, 0x3c6);
  1314. inb(r0, 0x3c6);
  1315. r1    = 0x00;
  1316. outb(0x3c6, r1);
  1317. inb(r0, 0x3c7);
  1318. outb(0x3c6, 0xff);
  1319.  
  1320. /*
  1321.  *    Set Miscellaneous Output Register
  1322.  */
  1323.  
  1324. outb(0x3c2, 0x2f);
  1325.  
  1326.  
  1327. /*
  1328.  *    Set Sequencer Registers
  1329.  */
  1330.  
  1331. r0   = 0x00; r1   = 0x01; r2   = 0x0f; r3   = 0x00; r4   = 0x0e;
  1332. boutb(5, 0x00, 0x3c4, 0x3c5);
  1333.  
  1334. outw(0x3c4, 0x0300);
  1335. /*
  1336.  *    Set CRT Registers
  1337.  */
  1338.  
  1339. outw(0x3d4, 0x0e11);
  1340. r0   = 0xa1; r1   = 0x7f; r2   = 0x80; r3   = 0x84; r4   = 0x82;
  1341. r5   = 0x93; r6   = 0x24; r7   = 0xf5; r8   = 0x00; r9   = 0x60;
  1342. r10  = 0x00; r11  = 0x00; r12  = 0x00; r13  = 0x00; r14  = 0xff;
  1343. r15  = 0x00; r16  = 0x02; r17  = 0x88; r18  = 0xff; r19  = 0x80;
  1344. r20  = 0x60; r21  = 0xff; r22  = 0x24; r23  = 0xeb; r24  = 0xff;
  1345. boutb(25, 0x00, 0x3d4, 0x3d5);
  1346.  
  1347. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x48;
  1348. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x18; r89  = 0x00;
  1349. r90  = 0x0a; 
  1350. boutb(11, 0x50, 0x3d4, 0x3d5);
  1351.  
  1352. r92  = 0x0e; r93  = 0x00; r94  = 0x00; 
  1353. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1354.  
  1355. r96  = 0x2f; r97  = 0x81; r98  = 0x00; 
  1356. boutb(3, 0x60, 0x3d4, 0x3d5);
  1357.  
  1358. r49  = 0x8d; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1359. boutb(5, 0x31, 0x3d4, 0x3d5);
  1360.  
  1361. r58  = 0x95; r59  = 0x9b; r60  = 0x40; 
  1362. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1363.  
  1364. r64  = 0x01; 
  1365. boutb(1, 0x40, 0x3d4, 0x3d5);
  1366.  
  1367. r67  = 0x00; 
  1368. boutb(1, 0x43, 0x3d4, 0x3d5);
  1369.  
  1370. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1371. boutb(5, 0x45, 0x3d4, 0x3d5);
  1372.  
  1373. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1374. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1375.  
  1376. r66  = 0x0e; 
  1377. boutb(1, 0x42, 0x3d4, 0x3d5);
  1378.  
  1379. /*
  1380.  *    Set Attribute Registers
  1381.  */
  1382.  
  1383. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1384. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1385. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1386. r15  = 0x3f; r16  = 0x01; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  1387. r20  = 0x00; 
  1388. boutb(21, 0x00, 0x3c0, 0x3c1);
  1389.  
  1390. /*
  1391.  *    Set GDC Registers
  1392.  */
  1393.  
  1394. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1395. r5   = 0x00; r6   = 0x05; r7   = 0x0f; r8   = 0xff; 
  1396. boutb(9, 0x00, 0x3ce, 0x3cf);
  1397.  
  1398. /*
  1399.  *    Set Enhanced Command Registers
  1400.  */
  1401.  
  1402. outw(0x4ae8, 0x0007);
  1403. outw(0xbee8, 0x1000);
  1404. outw(0xbee8, 0x33ff);
  1405. outw(0xbee8, 0x2000);
  1406. outw(0xbee8, 0x43ff);
  1407. outw(0xbee8, 0xa000);
  1408. outw(0xbee8, 0x03ff);
  1409. outw(0x96e8, 0x03ff);
  1410. outw(0x86e8, 0x0000);
  1411. outw(0x82e8, 0x0000);
  1412. [comment]
  1413.     Text Mode: 40 cols, 25 rows.
  1414.  
  1415. [AdapterType]
  1416.         S3
  1417.  
  1418. [ChipSet]
  1419.         S386C80X
  1420.  
  1421. [ModeInfo]
  1422.         ModeAttributes   = 0x08
  1423.         BytesPerScanLine = 40
  1424.         XResolution      = 360
  1425.         YResolution      = 400
  1426.         XCharSize        = 9
  1427.         YCharSize        = 16
  1428.         TextRows         = 25
  1429.         BitsPerPixel     = 4
  1430.         NumberOfPlanes   = 1
  1431.         PageLength       = 4000
  1432.         SaveSize         = 4000
  1433.         TotalMemory      = 1048576
  1434.         InterlaceMode    = 1
  1435.         BufferAddress    = 0x0b8000
  1436.  
  1437. [TrapRegs]
  1438.     0x3c2;
  1439.     0x3c4, 0x00-0x04;
  1440.     0x3c5;
  1441.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1442.     0x3d5;
  1443.     0x3c0, 0x00-0x14;
  1444.     0x3c1;
  1445.     0x3ce, 0x00-0x08;
  1446.     0x3cf;
  1447.     0x4ae8;
  1448.  
  1449. [SetMode]
  1450.  
  1451. /*
  1452.  *    Set Hi Color DAC
  1453.  */
  1454.  
  1455. inb(r0, 0x3c7);
  1456. inb(r0, 0x3c6);
  1457. inb(r0, 0x3c6);
  1458. inb(r0, 0x3c6);
  1459. inb(r0, 0x3c6);
  1460. r1    = 0x00;
  1461. outb(0x3c6, r1);
  1462. inb(r0, 0x3c7);
  1463. outb(0x3c6, 0xff);
  1464.  
  1465. /*
  1466.  *    Set Miscellaneous Output Register
  1467.  */
  1468.  
  1469. outb(0x3c2, 0x67);
  1470.  
  1471.  
  1472. /*
  1473.  *    Set Sequencer Registers
  1474.  */
  1475.  
  1476. r0   = 0x00; r1   = 0x08; r2   = 0x03; r3   = 0x00; r4   = 0x02;
  1477. boutb(5, 0x00, 0x3c4, 0x3c5);
  1478.  
  1479. outw(0x3c4, 0x0300);
  1480. /*
  1481.  *    Set CRT Registers
  1482.  */
  1483.  
  1484. outw(0x3d4, 0x0e11);
  1485. r0   = 0x2d; r1   = 0x27; r2   = 0x28; r3   = 0x90; r4   = 0x2b;
  1486. r5   = 0xa0; r6   = 0xbf; r7   = 0x1f; r8   = 0x00; r9   = 0x4f;
  1487. r10  = 0x0d; r11  = 0x0e; r12  = 0x00; r13  = 0x00; r14  = 0x00;
  1488. r15  = 0x00; r16  = 0x9c; r17  = 0x8e; r18  = 0x8f; r19  = 0x14;
  1489. r20  = 0x1f; r21  = 0x96; r22  = 0xb9; r23  = 0xa3; r24  = 0xff;
  1490. boutb(25, 0x00, 0x3d4, 0x3d5);
  1491.  
  1492. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  1493. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  1494. r90  = 0x0a; 
  1495. boutb(11, 0x50, 0x3d4, 0x3d5);
  1496.  
  1497. r92  = 0x01; r93  = 0x00; r94  = 0x00; 
  1498. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1499.  
  1500. r96  = 0x07; r97  = 0x80; r98  = 0xa1; 
  1501. boutb(3, 0x60, 0x3d4, 0x3d5);
  1502.  
  1503. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1504. boutb(5, 0x31, 0x3d4, 0x3d5);
  1505.  
  1506. r58  = 0x85; r59  = 0x5a; r60  = 0x10; 
  1507. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1508.  
  1509. r64  = 0x0d; 
  1510. boutb(1, 0x40, 0x3d4, 0x3d5);
  1511.  
  1512. r67  = 0x00; 
  1513. boutb(1, 0x43, 0x3d4, 0x3d5);
  1514.  
  1515. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1516. boutb(5, 0x45, 0x3d4, 0x3d5);
  1517.  
  1518. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1519. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1520.  
  1521. r66  = 0x0e; 
  1522. boutb(1, 0x42, 0x3d4, 0x3d5);
  1523.  
  1524. /*
  1525.  *    Set Attribute Registers
  1526.  */
  1527.  
  1528. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1529. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1530. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1531. r15  = 0x3f; r16  = 0x0c; r17  = 0x00; r18  = 0x0f; r19  = 0x08;
  1532. r20  = 0x00; 
  1533. boutb(21, 0x00, 0x3c0, 0x3c1);
  1534.  
  1535. /*
  1536.  *    Set GDC Registers
  1537.  */
  1538.  
  1539. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1540. r5   = 0x10; r6   = 0x0e; r7   = 0x00; r8   = 0xff; 
  1541. boutb(9, 0x00, 0x3ce, 0x3cf);
  1542.  
  1543. /*
  1544.  *    Set CRT Registers
  1545.  */
  1546.  
  1547. rmwb(0x3d4, 0x3d5, 0x40, 0xff, 0x01);
  1548. /*
  1549.  *    Set Enhanced Command Registers
  1550.  */
  1551.  
  1552. outw(0x4ae8, 0x0000);
  1553. rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00);
  1554. [comment]
  1555.     Text Mode: 80 cols, 25 rows.
  1556.  
  1557. [AdapterType]
  1558.         S3
  1559.  
  1560. [ChipSet]
  1561.         S386C80X
  1562.  
  1563. [ModeInfo]
  1564.         ModeAttributes   = 0x08
  1565.         BytesPerScanLine = 80
  1566.         XResolution      = 720
  1567.         YResolution      = 400
  1568.         XCharSize        = 9
  1569.         YCharSize        = 16
  1570.         TextRows         = 25
  1571.         BitsPerPixel     = 4
  1572.         NumberOfPlanes   = 1
  1573.         PageLength       = 4000
  1574.         SaveSize         = 4000
  1575.         TotalMemory      = 1048576
  1576.         InterlaceMode    = 1
  1577.         BufferAddress    = 0x0b8000
  1578.  
  1579. [TrapRegs]
  1580.     0x3c2;
  1581.     0x3c4, 0x00-0x04;
  1582.     0x3c5;
  1583.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1584.     0x3d5;
  1585.     0x3c0, 0x00-0x14;
  1586.     0x3c1;
  1587.     0x3ce, 0x00-0x08;
  1588.     0x3cf;
  1589.     0x4ae8;
  1590.  
  1591. [SetMode]
  1592.  
  1593. /*
  1594.  *    Set Hi Color DAC
  1595.  */
  1596.  
  1597. inb(r0, 0x3c7);
  1598. inb(r0, 0x3c6);
  1599. inb(r0, 0x3c6);
  1600. inb(r0, 0x3c6);
  1601. inb(r0, 0x3c6);
  1602. r1    = 0x00;
  1603. outb(0x3c6, r1);
  1604. inb(r0, 0x3c7);
  1605. outb(0x3c6, 0xff);
  1606.  
  1607. /*
  1608.  *    Set Miscellaneous Output Register
  1609.  */
  1610.  
  1611. outb(0x3c2, 0x67);
  1612.  
  1613.  
  1614. /*
  1615.  *    Set Sequencer Registers
  1616.  */
  1617.  
  1618. r0   = 0x00; r1   = 0x00; r2   = 0x03; r3   = 0x00; r4   = 0x02;
  1619. boutb(5, 0x00, 0x3c4, 0x3c5);
  1620.  
  1621. outw(0x3c4, 0x0300);
  1622. /*
  1623.  *    Set CRT Registers
  1624.  */
  1625.  
  1626. outw(0x3d4, 0x0e11);
  1627. r0   = 0x5f; r1   = 0x4f; r2   = 0x50; r3   = 0x82; r4   = 0x55;
  1628. r5   = 0x81; r6   = 0xbf; r7   = 0x1f; r8   = 0x00; r9   = 0x4f;
  1629. r10  = 0x0d; r11  = 0x0e; r12  = 0x00; r13  = 0x00; r14  = 0x00;
  1630. r15  = 0x00; r16  = 0x9c; r17  = 0x8e; r18  = 0x8f; r19  = 0x28;
  1631. r20  = 0x1f; r21  = 0x96; r22  = 0xb9; r23  = 0xa3; r24  = 0xff;
  1632. boutb(25, 0x00, 0x3d4, 0x3d5);
  1633.  
  1634. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  1635. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  1636. r90  = 0x0a; 
  1637. boutb(11, 0x50, 0x3d4, 0x3d5);
  1638.  
  1639. r92  = 0x01; r93  = 0x00; r94  = 0x00; 
  1640. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1641.  
  1642. r96  = 0x07; r97  = 0x80; r98  = 0xa1; 
  1643. boutb(3, 0x60, 0x3d4, 0x3d5);
  1644.  
  1645. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1646. boutb(5, 0x31, 0x3d4, 0x3d5);
  1647.  
  1648. r58  = 0x85; r59  = 0x5a; r60  = 0x10; 
  1649. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1650.  
  1651. r64  = 0x0d; 
  1652. boutb(1, 0x40, 0x3d4, 0x3d5);
  1653.  
  1654. r67  = 0x00; 
  1655. boutb(1, 0x43, 0x3d4, 0x3d5);
  1656.  
  1657. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1658. boutb(5, 0x45, 0x3d4, 0x3d5);
  1659.  
  1660. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1661. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1662.  
  1663. r66  = 0x0e; 
  1664. boutb(1, 0x42, 0x3d4, 0x3d5);
  1665.  
  1666. /*
  1667.  *    Set Attribute Registers
  1668.  */
  1669.  
  1670. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1671. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1672. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1673. r15  = 0x3f; r16  = 0x0c; r17  = 0x00; r18  = 0x0f; r19  = 0x08;
  1674. r20  = 0x00; 
  1675. boutb(21, 0x00, 0x3c0, 0x3c1);
  1676.  
  1677. /*
  1678.  *    Set GDC Registers
  1679.  */
  1680.  
  1681. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1682. r5   = 0x10; r6   = 0x0e; r7   = 0x00; r8   = 0xff; 
  1683. boutb(9, 0x00, 0x3ce, 0x3cf);
  1684.  
  1685. /*
  1686.  *    Set CRT Registers
  1687.  */
  1688.  
  1689. rmwb(0x3d4, 0x3d5, 0x40, 0xff, 0x01);
  1690. /*
  1691.  *    Set Enhanced Command Registers
  1692.  */
  1693.  
  1694. outw(0x4ae8, 0x0000);
  1695. rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00);
  1696. [comment]
  1697.     Text Mode: 132 cols, 25 rows.
  1698.  
  1699. [AdapterType]
  1700.         S3
  1701.  
  1702. [ChipSet]
  1703.         S386C80X
  1704.  
  1705. [ModeInfo]
  1706.         ModeAttributes   = 0x08
  1707.         BytesPerScanLine = 132
  1708.         XResolution      = 1056
  1709.         YResolution      = 400
  1710.         XCharSize        = 8
  1711.         YCharSize        = 16
  1712.         TextRows         = 25
  1713.         BitsPerPixel     = 4
  1714.         NumberOfPlanes   = 1
  1715.         PageLength       = 6600
  1716.         SaveSize         = 6600
  1717.         TotalMemory      = 1048576
  1718.         InterlaceMode    = 1
  1719.         BufferAddress    = 0x0b8000
  1720.  
  1721. [TrapRegs]
  1722.     0x3c2;
  1723.     0x4ae8;
  1724.     0x3c4, 0x00-0x04;
  1725.     0x3c5;
  1726.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1727.     0x3d5;
  1728.     0x3c0, 0x00-0x14;
  1729.     0x3c1;
  1730.     0x3ce, 0x00-0x08;
  1731.     0x3cf;
  1732.  
  1733. [SetMode]
  1734.  
  1735. /*
  1736.  *    Set Hi Color DAC
  1737.  */
  1738.  
  1739. inb(r0, 0x3c7);
  1740. inb(r0, 0x3c6);
  1741. inb(r0, 0x3c6);
  1742. inb(r0, 0x3c6);
  1743. inb(r0, 0x3c6);
  1744. r1    = 0x00;
  1745. outb(0x3c6, r1);
  1746. inb(r0, 0x3c7);
  1747. outb(0x3c6, 0xff);
  1748.  
  1749. /*
  1750.  *    Set Miscellaneous Output Register
  1751.  */
  1752.  
  1753. outb(0x3c2, 0x6f);
  1754.  
  1755.  
  1756. /*
  1757.  *    Set Enhanced Command Registers
  1758.  */
  1759.  
  1760. outw(0x4ae8, 0x0000);
  1761. /*
  1762.  *    Set Sequencer Registers
  1763.  */
  1764.  
  1765. r0   = 0x00; r1   = 0x01; r2   = 0x03; r3   = 0x00; r4   = 0x02;
  1766. boutb(5, 0x00, 0x3c4, 0x3c5);
  1767.  
  1768. outw(0x3c4, 0x0300);
  1769. /*
  1770.  *    Set CRT Registers
  1771.  */
  1772.  
  1773. outw(0x3d4, 0x0e11);
  1774. r0   = 0x9a; r1   = 0x83; r2   = 0x86; r3   = 0x9d; r4   = 0x87;
  1775. r5   = 0x1b; r6   = 0xbf; r7   = 0x1f; r8   = 0x00; r9   = 0x4f;
  1776. r10  = 0x0d; r11  = 0x0e; r12  = 0x00; r13  = 0x00; r14  = 0x03;
  1777. r15  = 0x9c; r16  = 0x9c; r17  = 0x8e; r18  = 0x8f; r19  = 0x42;
  1778. r20  = 0x1f; r21  = 0x96; r22  = 0xb9; r23  = 0xa3; r24  = 0xff;
  1779. boutb(25, 0x00, 0x3d4, 0x3d5);
  1780.  
  1781. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  1782. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  1783. r90  = 0x0a; 
  1784. boutb(11, 0x50, 0x3d4, 0x3d5);
  1785.  
  1786. r92  = 0x02; r93  = 0x00; r94  = 0x00; 
  1787. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1788.  
  1789. r96  = 0x07; r97  = 0x80; r98  = 0x85; 
  1790. boutb(3, 0x60, 0x3d4, 0x3d5);
  1791.  
  1792. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1793. boutb(5, 0x31, 0x3d4, 0x3d5);
  1794.  
  1795. r58  = 0x85; r59  = 0x99; r60  = 0x40; 
  1796. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1797.  
  1798. r64  = 0x09; 
  1799. boutb(1, 0x40, 0x3d4, 0x3d5);
  1800.  
  1801. r67  = 0x00; 
  1802. boutb(1, 0x43, 0x3d4, 0x3d5);
  1803.  
  1804. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1805. boutb(5, 0x45, 0x3d4, 0x3d5);
  1806.  
  1807. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1808. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1809.  
  1810. r66  = 0x02; 
  1811. boutb(1, 0x42, 0x3d4, 0x3d5);
  1812.  
  1813. /*
  1814.  *    Set Attribute Registers
  1815.  */
  1816.  
  1817. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1818. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1819. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1820. r15  = 0x3f; r16  = 0x0c; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  1821. r20  = 0x00; 
  1822. boutb(21, 0x00, 0x3c0, 0x3c1);
  1823.  
  1824. /*
  1825.  *    Set GDC Registers
  1826.  */
  1827.  
  1828. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1829. r5   = 0x10; r6   = 0x0e; r7   = 0x00; r8   = 0xff; 
  1830. boutb(9, 0x00, 0x3ce, 0x3cf);
  1831.  
  1832. /*
  1833.  *    Set CRT Registers
  1834.  */
  1835.  
  1836. rmwb(0x3d4, 0x3d5, 0x40, 0xff, 0x01);
  1837. /*
  1838.  *    Set Enhanced Command Registers
  1839.  */
  1840.  
  1841. outw(0x4ae8, 0x0000);
  1842. rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00);
  1843. [comment]
  1844.     Text Mode: 132 cols, 43 rows.
  1845.  
  1846. [AdapterType]
  1847.         S3
  1848.  
  1849. [ChipSet]
  1850.         S386C80X
  1851.  
  1852. [ModeInfo]
  1853.         ModeAttributes   = 0x08
  1854.         BytesPerScanLine = 132
  1855.         XResolution      = 1056
  1856.         YResolution      = 387
  1857.         XCharSize        = 8
  1858.         YCharSize        = 9
  1859.         TextRows         = 43
  1860.         BitsPerPixel     = 4
  1861.         NumberOfPlanes   = 1
  1862.         PageLength       = 11616
  1863.         SaveSize         = 11616
  1864.         TotalMemory      = 1048576
  1865.         InterlaceMode    = 1
  1866.         BufferAddress    = 0x0b8000
  1867.  
  1868. [TrapRegs]
  1869.     0x3c2;
  1870.     0x4ae8;
  1871.     0x3c4, 0x00-0x04;
  1872.     0x3c5;
  1873.     0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42;
  1874.     0x3d5;
  1875.     0x3c0, 0x00-0x14;
  1876.     0x3c1;
  1877.     0x3ce, 0x00-0x08;
  1878.     0x3cf;
  1879.  
  1880. [SetMode]
  1881.  
  1882. /*
  1883.  *    Set Hi Color DAC
  1884.  */
  1885.  
  1886. inb(r0, 0x3c7);
  1887. inb(r0, 0x3c6);
  1888. inb(r0, 0x3c6);
  1889. inb(r0, 0x3c6);
  1890. inb(r0, 0x3c6);
  1891. r1    = 0x00;
  1892. outb(0x3c6, r1);
  1893. inb(r0, 0x3c7);
  1894. outb(0x3c6, 0xff);
  1895.  
  1896. /*
  1897.  *    Set Miscellaneous Output Register
  1898.  */
  1899.  
  1900. outb(0x3c2, 0x6f);
  1901.  
  1902.  
  1903. /*
  1904.  *    Set Enhanced Command Registers
  1905.  */
  1906.  
  1907. outw(0x4ae8, 0x0000);
  1908. /*
  1909.  *    Set Sequencer Registers
  1910.  */
  1911.  
  1912. r0   = 0x00; r1   = 0x01; r2   = 0x03; r3   = 0x00; r4   = 0x02;
  1913. boutb(5, 0x00, 0x3c4, 0x3c5);
  1914.  
  1915. outw(0x3c4, 0x0300);
  1916. /*
  1917.  *    Set CRT Registers
  1918.  */
  1919.  
  1920. outw(0x3d4, 0x0e11);
  1921. r0   = 0x9a; r1   = 0x83; r2   = 0x84; r3   = 0x9d; r4   = 0x87;
  1922. r5   = 0x1b; r6   = 0xbf; r7   = 0x1f; r8   = 0x00; r9   = 0x48;
  1923. r10  = 0x07; r11  = 0x08; r12  = 0x00; r13  = 0x00; r14  = 0x15;
  1924. r15  = 0xa8; r16  = 0x98; r17  = 0x8a; r18  = 0x82; r19  = 0x42;
  1925. r20  = 0x1f; r21  = 0x8b; r22  = 0xb8; r23  = 0xa3; r24  = 0xff;
  1926. boutb(25, 0x00, 0x3d4, 0x3d5);
  1927.  
  1928. r80  = 0x00; r81  = 0x00; r82  = 0xaa; r83  = 0x00; r84  = 0x38;
  1929. r85  = 0x00; r86  = 0x00; r87  = 0x00; r88  = 0x08; r89  = 0x00;
  1930. r90  = 0x0a; 
  1931. boutb(11, 0x50, 0x3d4, 0x3d5);
  1932.  
  1933. r92  = 0x02; r93  = 0x00; r94  = 0x00; 
  1934. boutb(3, 0x5c, 0x3d4, 0x3d5);
  1935.  
  1936. r96  = 0x07; r97  = 0x80; r98  = 0x85; 
  1937. boutb(3, 0x60, 0x3d4, 0x3d5);
  1938.  
  1939. r49  = 0x85; r50  = 0x00; r51  = 0x00; r52  = 0x00; r53  = 0x00;
  1940. boutb(5, 0x31, 0x3d4, 0x3d5);
  1941.  
  1942. r58  = 0x85; r59  = 0x99; r60  = 0x40; 
  1943. boutb(3, 0x3a, 0x3d4, 0x3d5);
  1944.  
  1945. r64  = 0x09; 
  1946. boutb(1, 0x40, 0x3d4, 0x3d5);
  1947.  
  1948. r67  = 0x00; 
  1949. boutb(1, 0x43, 0x3d4, 0x3d5);
  1950.  
  1951. r69  = 0x00; r70  = 0x00; r71  = 0xff; r72  = 0xfc; r73  = 0xff;
  1952. boutb(5, 0x45, 0x3d4, 0x3d5);
  1953.  
  1954. r76  = 0xff; r77  = 0xff; r78  = 0xff; r79  = 0xdf; 
  1955. boutb(4, 0x4c, 0x3d4, 0x3d5);
  1956.  
  1957. r66  = 0x02; 
  1958. boutb(1, 0x42, 0x3d4, 0x3d5);
  1959.  
  1960. /*
  1961.  *    Set Attribute Registers
  1962.  */
  1963.  
  1964. r0   = 0x00; r1   = 0x01; r2   = 0x02; r3   = 0x03; r4   = 0x04;
  1965. r5   = 0x05; r6   = 0x14; r7   = 0x07; r8   = 0x38; r9   = 0x39;
  1966. r10  = 0x3a; r11  = 0x3b; r12  = 0x3c; r13  = 0x3d; r14  = 0x3e;
  1967. r15  = 0x3f; r16  = 0x0c; r17  = 0x00; r18  = 0x0f; r19  = 0x00;
  1968. r20  = 0x00; 
  1969. boutb(21, 0x00, 0x3c0, 0x3c1);
  1970.  
  1971. /*
  1972.  *    Set GDC Registers
  1973.  */
  1974.  
  1975. r0   = 0x00; r1   = 0x00; r2   = 0x00; r3   = 0x00; r4   = 0x00;
  1976. r5   = 0x10; r6   = 0x0e; r7   = 0x00; r8   = 0xff; 
  1977. boutb(9, 0x00, 0x3ce, 0x3cf);
  1978.  
  1979. /*
  1980.  *    Set CRT Registers
  1981.  */
  1982.  
  1983. rmwb(0x3d4, 0x3d5, 0x40, 0xff, 0x01);
  1984. /*
  1985.  *    Set Enhanced Command Registers
  1986.  */
  1987.  
  1988. outw(0x4ae8, 0x0000);
  1989. rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00);
  1990.