Terminal Handler for IBM-PC and 100% compatibles ------------------------------------------------ Here is a statement of the support for various text modes by this module. Several levels of support are defined. MDA No EGA, VGA or super VGA BIOS support has been found and the machine was observed running in Mode 7. Assumed because there are no modes 0-3. SUPPORTS ==> 80 columns, 25 lines CGA No EGA, VGA or super VGA BIOS support has been found. SUPPORTS ==> 40/80 columns, 25 lines EGA Support for EGA found, but no VGA or super VGA. SUPPORTS ==> 40/80 columns, 25/43 lines The 25/43 line support is acheived by the use of the 'char- generator' BIOS call setting a 14 or 8 pixel high font in the 350 line high screen giving 350/14=43 or 350/14=25 line modes. VGA Support found for VGA, but no super VGA. SUPPORTS ==> 40/80 columns, 12/14/21/25/28/43/50 lines The 12/14/21/25/28/43/50 line mode support is acheived by the combined use of the 'char-generator' BIOS call setting a 16, 14 or 8 pixel high font and the 'alternate-select' to set 400, 350 or 200 line high modes :- 200 lines 350 lines 400 lines 8 pixel font 25 #1 43 50 14 pixel font 14 25 #1 28 16 pixel font 12 21 25 Note #1: The code will pick the 400 line, 16 pixel high font in preference to these combinations, as it looks better. XGA2 Support for XGA2 BIOS 132 column mode 0x14 has been found. (int 0x10,ah=0x1b,bx=0,es:bx->0x40 byte buffer, returned al=0x1b, byte ptr = first dword of buffer, (ptr [2] & 0x10) != 0 => mode 0x14 supported). SUPPORTS ==> 40/80/132 columns, 12/14/21/25/28/43/50 lines XGA cards are capable of a 132 column modes. BIOS support for the new mode 0x14 only officially appeared with the release of XGA2. The test performed above is the official IBM recommended test. In early drivers, there is a bug which makes the above test fail. However a slightly different secondary test will work, and is done. ((buffer[0x2e]&0x10) != 0 => 132 column support => mode 0x14). There is a public domain TSR available that adds the BIOS support for 132 column modes to the video BIOS shipped with the old XGA. If you install this TSR on your old XGA, then this should work. In the current level of XGA2 BIOS, support for any number of scan lines other than 400 lines is broken. Hence 12/14/21/43 lines do not work at 132 columns. IBM will fix this later... The IBM Models 35, 40, 56, and 57 have a special form of VGA in them that is a halfway-house between VGA and XGA. This hardware supports all the 132 column modes listed without flaw, and declares its support in the same way. FEEDBACK ==> Works to degree specified - Tested by Author ET4000 Support for the Tseng BIOS extensions. (int 0x10,ax=0x10f1 returned al=0x10, Tseng get DAC type function). SUPPORTS ==> mode w h base 0x18,132,44,0xb000 <--+ 0x19,132,25,0xb000 | 0x1a,132,28,0xb000 +--- #1 0x21,132,60,0xb800 | 0x22,132,44,0xb800 <--+ 0x23,132,25,0xb800 0x24,132,28,0xb800 0x26, 80,60,0xb800 0x2a,100,40,0xb800 + VGA modes Note #1: If a mode change is required, then support will prefer a mode with base address 0xb800 over one with base address 0xb000. FEEDBACK ==> Works! - Tested by Author PARADISE Paradise / Western Digital BIOS support detected. (signiture "VGA=" found at 0xc000:0x007d). This BIOS support is present for "Paradise EGA-480" and "Paradise VGA" cards. However the test matches both types of card. I have only got full information on the "Paradise VGA". SUPPORTS ==> mode w h base 0x21,132,44,0xb800 0x51, 80,30,0xb800 #1 0x54,132,43,0xb800 #2 0x55,132,25,0xb800 #3 + VGA modes Note #1: This mode exists only on EGA-480 card. Base address is assumed to be 0xb800. If on a VGA card, and request this mode screen output will be lost. Notes #2 and #3: The base address is known to be 0xb800 on the VGA card, but I have had to assume the same for the EGA-480 card. If this is false, then screen output will be lost in these modes. Please can someone mail me a differentiating test between the Paradise VGA and Paradise EGA-480 cards. FEEDBACK ==> Works! VEGA Support for the VEGA / Video 7 extensions has been found. (int 0x10, ax=0x6f00 returned 0x5637 (='V7')). SUPPORTS ==> mode w h base 0x40, 80,43,0xb800 #1,#3 0x41,132,25,0xb800 #3 0x42,132,43,0xb800 #3 0x43, 80,60,0xb800 #3 0x44,100,60,0xb800 #3 0x4d,120,25,0xb800 #3 0x4e,120,43,0xb800 #3 0x4f,132,25,0xb800 #2,#3 + VGA modes Note #1: If a mode change is required, then the regular VGA mode 80x43 will be used in preference to this mode. Note #2: If a mode change is required, then mode 0x41 will be used in preference to mode 0x4f. Note #3: the base address is assumed to be 0xb800. If it is not (unlikely), then screen output will be lost for these modes FEEDBACK ==> None AHEAD Support for Ahead Systems BIOS extensions has been found. (signiture "AHEAD" found at 0xc000:0x0025). This test matches the "Ahead Systems EGA2001", the "Ahead B" and the "Ahead B (Wizard 3270)" cards, and will not differentiate between them. The "Ahead B" modes are well documented. SUPPORTS ==> mode w h base 0x22,132,44,0xb800 #2 0x23,132,25,0xb800 #2 0x24,132,28,0xb800 #1 + VGA modes Note #1: This mode does not exist for the EGA2001. Since my test does not differentiate among Ahead cards you can select this mode. If your card is an EGA2001, screen output will be lost. Note #2: My documentation omits the base addresses for these modes on the EGA2001 card. If they are not also 0xb800 (unlikely) screen output will be lost. Currently my test will match the "Ahead B (Wizard/3270)". Sadly none of the above modes will work on it. If I could recognise this specific card, then I could support :- ==> mode w h base 0x2f,160,50,0xb800 0x32, 80,34,0xb800 #1 0x33, 80,66,0xb800 Note #1: If a mode switch is required, the support will use the normal VGA BIOS mode 80x34 in preference to this mode. Please can someone mail me a test to differentiate between types of Ahead card. At the moment I assume "Ahead B". FEEDBACK ==> None ATI Support for ATI cards found. (signiture "761295520" found at 0xc000:0x0031 identifies ATI support) (signiture "31" found at 0xc000:0x0040 identifies "ATI VGA Wonder") (signiture "32" found at 0xc000:0x0040 identifies "ATI EGA Wonder") Support exists for "ATI EGA Wonder" :- SUPPORTS ==> mode w h base 0x23,132,25,0xb800 0x33,132,44,0xb800 0x58, 80,33,0xb800 + VGA modes In my documentation the "ATI VGA Wonder" only has a 132x25 special mode, which requires a special program VCONFIG loaded. If this TSR is loaded (int 0x10, ax=0x5555 returns ax=0xaaaa), then support the "ATI VGA Wonder" card, assuming the mode is a colour mode. SUPPORTS ==> mode w h base 0x08,132,25,0xb800 + VGA modes Also, my documentation talks of an "ATI VIP" card. It is not known what signiture this card places at 0xc000:0x0040, if, in fact it does. If it has "32" there, all be okay, as this card supports the same modes as the "EGA Wonder". But if I can identify the ATI VIP card as above "EGA Wonder" then more modes can be supported. ==> mode w h base 0x55, 80,66,0xa000 #1 0x59, 80,66,0xa000 Note #1: If a mode change is required, the support would pick mode 0x55 over 0x59 for no readily explainable reason. FEEDBACK ==> None TRIDENT Support for Trident TVGA 8800/8900 found (outp(0x03c4,0x0e); old_reg = inp(0x03c5); outp(0x03c5,0x00); new_reg = inp(0x03c5); outp(0x03c5,0x02); ??? if (new_reg & 0x0f) == 0x02, then Trident supported) SUPPORTS ==> mode w h base 0x50, 80,30,0xb800 0x51, 80,43,0xb800 #1 0x52, 80,60,0xb800 0x53,132,25,0xb800 0x54,132,30,0xb800 0x55,132,43,0xb800 0x56,132,60,0xb800 0x57,132,25,0xb800 #2 0x58,132,30,0xb800 #2 0x59,132,43,0xb800 #2 0x5a,132,60,0xb800 #2 + VGA modes Note #1: Should a mode change be required, the support will pick the VGA BIOS 80x43 mode in preference to mode 0x51. Note #2: These modes have a character cell 9 pixels wide, compared to the 8 pixels wide of modes 0x53 to 0x56. Therefore if a mode change is required, the support will pick these modes rather than the other modes. FEEDBACK ==> None OAK OAK Technologies VGA-16 has been detected. (Bank switch register found, writeable via: outpw(0x3de, (value<<8)|0x11); readable via: outp(0x3de, 0x11); value = inp(0x3df); All bits of value remembered at this port. Port is restored to original value after test). SUPPORTS ==> mode w h base 0x50,132,25,0xb800 0x51,132,43,0xb800 + VGA modes FEEDBACK ==> None VESA VESA BIOS extensions identified. (int 0x10, ax=0x4f00 returned ax=0x004f). VESA support is special. The VESA BIOS extensions are only used if they are detected via the above test. The supported modes are enumerated, looking for supported text modes with number >= 0x0100, Window A present, being read/writable. SUPPORTS ==> mode w h base 0x0108, 80,60,0x???? #1 0x0109,132,25,0x???? #1 0x010a,132,43,0x???? #1 0x010b,132,60,0x???? #1 + VGA modes Note #1: The base segment is queried from the VESA BIOS. FEEDBACK ==> Tested on IBM ThinkPad with C:\WINDOWS\VESA.COM USER User defined extension to the support. Supplied to allow testing of ONE additional mode. When you have tested an additional mode(s), you can mail them to me and I can incorporate them into the internal mode table. Most SVGA text modes are defined via a mode number, rows and columns, and a base segment for the screen buffer. If the environment variable TH_VSUPP_USER is set correctly, this module assumes that the corresponding hardware to support the mode is present, and will use it if present. In this mode support assumed to exist for VGA and below modes also. No other SVGA support is tested for. This support is intended for the debugging and adding support for new and as yet supported cards. For example, to try out support for the "Ahead B (Wizard 3270)", 160x50 mode, which is not supported explicitly at present, type SET TH_VSUPP_USER=0x2f,160,50,0xb800 Before using a program that uses the Terminal Handler, and you will be able to use the new mode (assuming you ask for it). Note: no spaces should appear in the definition of TH_VSUPP_USER, despite some of the listings above, which have had spaces added for readability. Finally, due to the nature of VESA support (specifically: different BIOS calls used), this extension mechanism - TH_VSUPP_USER - can not be used to set up VESA modes. Remember, VESA BIOS used if and only if the VESA check above succeeds, and if TH_VSUPP_USER is found, no other super VGA cards are tested for. Super VGA? ---------- I have assumed that an card that supports these additional text modes also supports the VGA BIOS to provide the VGA 43, 50 line modes etc. If I am wrong, and some cards are actually Super EGA, then my code will fail when using VGA style modes (obviously). There is some evidence for this as one or two cards actually supply modes that seem to duplicate those acheivable via the VGA BIOS. Summary ------- I am working from an incomplete reference, but have tried to support a variety of levels of BIOS/hardware/modes/sizes as best I can. If you have a SVGA adaptor with modes that do not work, or are not supported, please send me the following information. 1) The name of the card. 2) Does the card support a superset of VGA or EGA (see comment above). 3) A test that can be used to uniquely identify the card. 4) The values of TH_VSUPP_USER you have successfully used for the card. 5) Any special specifics for the card/mode etc. No promises but, if you send me the above information, I will try to incorporate it into the DOS Terminal Handler code.