Since 29-08-1995, people have consulted this page (including yourself).
/* * Solutions presented by Rutger van de GeVEL * * Disclaimer: I am not responsible for any damage to your system when * applying the procedures described in this document. * Damage to hardware/software is possible, so you should * be very carefully when using the information in this document. * * You may contact me via electronic mail at: * * rutger@kub.nl * * Click here to download Rutger's SVGADATA.PMI * (Maybe it's your lucky day). */ /* * The first problem : * The SVGA.EXE that comes with OS/2 Warp 3.0 crashes computers * equiped with S3 video cards, notably my * "Quadtel 86C801/805 Gendac (BIOS version 2.13.06)" video card. * * Solution to the first problem: * Get ftp.cdrom.com/pub/os2/warp/patches/GENDAC_S3.ZIP * Then: * 1) backup the \OS2\SVGA.EXE file * 2) copy the OSVGA.EXE (unzipped from GENDACS3.ZIP) to \OS2\SVGA.EXE * 3) make sure that no SVGADATA.PMI already exist; rename it if it does. * 4) start "Selective Install" to install the S3 * video drivers that came with Warp 3.0 (yes they * *do* work, at least in my case): S3 video drivers * from older versions (OS/2 2.x) didn't work for me, * but you may try them if this doesn't work for you. * 5) if all goes well, the S3 video drivers will be * installed and SVGA.EXE (from OS/2 2.x) will create * a SVGADATA.PMI file without crashing the computer. * Make a backup of the SVGADATA.PMI file: you may need it again * if my solutions don't work! * 6) open the "SYSTEM" icon and select the desired * screen resolution: if your monitor/video card * supports 1024x768x256 I would recommend this. * 7) shutdown and reboot your system: you should now * see the desktop in 1024x768x256 mode. Unfortunately * the Full-screen-dos sessions (and MS-Windows sessions) * will still crash the system. This problem will be * tackled in the second problem. * * The second problem: * In *my* case the video drivers that came with Warp 3.0 * did work in any resolution, even in 1024x768x256 mode). However * DOS-full-screen and full-screen-MS-Windows sessions always * crashed my computer (DOS-windowed sessions and * Full-screen/windowed OS/2 sessions had no problems whatsoever). * * Solution to the second problem: * First try the SVGADATA.S3 (i.e. copy SVGADATA.S3 to \OS2\SVGADATA.PMI) * and shutdown and reboot your system. * If * you get a normal desktop in the mode you selected * try the Full-screen Dos-sessions * If * this doesn't crash the system * Then * you're home free * Else * I'm sorry, the 80x25 Text mode section in the SVGADATA.S3 file * from the GENDACS3.zip file doesn't work on your system, but this * is unlikely since it works on my system.... ;-) * Fi * Else * you get a distorted messy screen (like an 'out-of-sync' screen, * with multiple mouse-cursors, etc.) * try to start a Full-Screen-DOS-session * If * this doesn't hang your system and results in normal DOS-prompt * Then * you should continue to read an be prepared to modify the * SVGADATA.PMI file by hand. * See 'EDITING SVGADATA.PMI file' * Else * I'm sorry, the 80x25 Text mode section in the SVGADATA.S3 file * from the GENDACS3.ZIP file doesn't work on your system... Try to * run SVGA.EXE (from OS/2 2.x) on another system that has a S3 card * Fi * Fi * * EDITING SVGADATA.PMI * * Now we know two facts: * 1) The section in SVGADATA.PMI that describes 1024x768x256 mode does work * properly, but same section in the SVGADATA.S3 file doesn't work. * 2) The SVGADATA.PMI section for the 80x25 mode doesn't work properly, but * the same section in SVGADATA.S3 does work. * * The basic remedy: * Copy the working 80x25 section of the SVGADATA.S3 to the section in the * SVGADATA.PMI file, plus some 'supporting functions' that can be found * at the beginning of the SVGADATA.S3 file. * */
/* * Below I have commented some parts of the SVGADATA.PMI file to * help you understand the format better and to enable you to * create your own working SVGADATA.PMI file from the SVGADATA.S3 file * and the SVGADATA.PMI that has been generated by the OS/2 2.x SVGA.EXE. * * You can also try to copy and paste parts of the text below to your * own SVGADATA.PMI. This should be very straightforward. */ /* * OS/2 2.1 SVGA PMI-File Generator */ [PMIVersion] /* from SVGADATA.S3 */ 2.15 /* from SVGADATA.S3 */ [AdapterType] /* from SVGADATA.S3 */ S3 /* from SVGADATA.S3 */ [ChipSet] /* from SVGADATA.S3 */ S386C80X /* from SVGADATA.S3 */ #includecode "IBMGPMI.DLL"; /* from SVGADATA.S3 */ [Hardware] /* from SVGADATA.S3 */ BusType = ISA /* from SVGADATA.S3 */ OEMString = "S386C80X GENERIC, S3 Incorporated" /* from SVGADATA.S3 */ Version = "S3 Incorporated. 86C801/805 " /* from SVGADATA.S3 */ /* * HI-COLOR DAC */ DACString = "HICOLOR_RGB Generic" /* from SVGADATA.S3 */ TotalMemory = 1048576 /* from SVGADATA.S3 */ MemoryIOAddress = 0x00000000 /* from SVGADATA.S3 */ Endian = LITTLE /* from SVGADATA.S3 */ [IdentifyAdapter] /* from SVGADATA.S3 */ call pfnPMIIdentifyAdapter; /* from SVGADATA.S3 */ /* * My guess is that either the [Lock] section or the [Unlock] section (or both) * in SVGADATA.PMI generated with the OS/2 2.x SVGA.EXe are the cause of crashing * the system when switching from 1024x768x256 graphics mode to 80x25 text-mode. * I'm not too sure about the [Cleanup] section either. */ /* * Lock Extended Registers * * This section was created by using SVGA.EXE from OS/2 2.x * and should be commented out and be replaced by * the SVGADATA.S3 version as shown below. * * [Lock] * outb(0x3d4, 0x38); * outb(0x3d5, 0x00); * outb(0x3d4, 0x39); * outb(0x3d5, 0x00); * */ [Lock] /* from SVGADATA.S3 */ r6 = 0x00000058; /* from SVGADATA.S3 */ r4 = 0x0000005a; /* from SVGADATA.S3 */ r2 = 0x00000096; /* from SVGADATA.S3 */ inb(r0, 0x3d4); /* from SVGADATA.S3 */ outb(0x3d4, 0x40); /* from SVGADATA.S3 */ outb(0x3d5, r6); /* from SVGADATA.S3 */ outb(0x3d4, 0x39); /* from SVGADATA.S3 */ outb(0x3d5, r4); /* from SVGADATA.S3 */ outb(0x3d4, 0x38); /* from SVGADATA.S3 */ outb(0x3d5, r2); /* from SVGADATA.S3 */ outb(0x3d4, r0); /* from SVGADATA.S3 */ /* * Unlock Extended Registers * * This section was created by using SVGA.EXE from OS/2 2.x * and should be commented out and be replaced by * the SVGADATA.S3 version as shown below. * * [UnLock] * outb(0x3d4, 0x38); * outb(0x3d5, 0x48); * outb(0x3d4, 0x39); * outb(0x3d5, 0xa0); * outb(0x3b4, 0x38); * outb(0x3b5, 0x48); * outb(0x3b4, 0x39); * outb(0x3b5, 0xa0); * */ [UnLock] /* from SVGADATA.S3 */ inb(r0, 0x3d4); /* from SVGADATA.S3 */ outb(0x3d4, 0x38); /* from SVGADATA.S3 */ inb(r2, 0x3d5); /* from SVGADATA.S3 */ outb(0x3d5, 0x48); /* from SVGADATA.S3 */ outb(0x3d4, 0x39); /* from SVGADATA.S3 */ inb(r4, 0x3d5); /* from SVGADATA.S3 */ outb(0x3d5, 0xa5); /* from SVGADATA.S3 */ outb(0x3d4, 0x40); /* from SVGADATA.S3 */ inb(r6, 0x3d5); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x40, 0xfe, 0x01); /* from SVGADATA.S3 */ outb(0x3d4, r0); /* from SVGADATA.S3 */ /* * This section was created by using SVGA.EXE from OS/2 2.x * and should be commented out and be replaced by * the SVGADATA.S3 version as shown below * * [Cleanup] * rmww(0x4ae8, 0x4ae8, 0x00, 0x00); * rmwb(0x3d4, 0x3d5, 0x31, 0xf7, 0x00); * rmwb(0x3d4, 0x3d5, 0x34, 0x00, 0x00); * rmwb(0x3d4, 0x3d5, 0x3a, 0xef, 0x00); * rmwb(0x3d4, 0x3d5, 0x40, 0xfe, 0x00); * rmwb(0x3d4, 0x3d5, 0x45, 0xfe, 0x00); * rmwb(0x3d4, 0x3d5, 0x51, 0xf3, 0x00); * rmwb(0x3d4, 0x3d5, 0x58, 0xec, 0x00); * rmwb(0x3d4, 0x3d5, 0x60, 0x00, 0x07); * rmwb(0x3d4, 0x3d5, 0x61, 0x00, 0x80); * rmwb(0x3d4, 0x3d5, 0x62, 0x00, 0xa1); */ [Cleanup] /* from SVGADATA.S3 */ outw(0x4ae8, 0x0002); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x31, 0xf7, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x34, 0x00, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x3a, 0xef, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x40, 0xfe, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x45, 0xfe, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x51, 0xf3, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x58, 0xec, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x59, 0x00, 0x0a); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x5a, 0x00, 0x00); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x60, 0x00, 0x07); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x61, 0x00, 0x80); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x62, 0x00, 0xa1); /* from SVGADATA.S3 */ r0 = 0x00000000; /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfe, 0x01); /* from SVGADATA.S3 */ inb(r255, 0x3c7); /* from SVGADATA.S3 */ inb(r255, 0x3c8); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfd, 0x00); /* from SVGADATA.S3 */ outb(0x3c6, r0); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfe, 0x00); /* from SVGADATA.S3 */ inb(r255, 0x3c7); /* from SVGADATA.S3 */ inb(r255, 0x3c8); /* from SVGADATA.S3 */ outb(0x3c6, 0xff); /* from SVGADATA.S3 */ /* * The [ProgramDac] section doesn't exist in the SVGADATA.PMI file that * has been created by SVGA.EXE from OS/2 2.x and should be copied * here as shown below */ [ProgramDAC] /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfe, 0x01); /* from SVGADATA.S3 */ inb(r255, 0x3c7); /* from SVGADATA.S3 */ inb(r255, 0x3c8); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ inb(r255, 0x3c6); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfd, 0x00); /* from SVGADATA.S3 */ outb(0x3c6, r0); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x55, 0xfe, 0x00); /* from SVGADATA.S3 */ inb(r255, 0x3c7); /* from SVGADATA.S3 */ inb(r255, 0x3c8); /* from SVGADATA.S3 */ outb(0x3c6, 0xff); /* from SVGADATA.S3 */ /* * The [SetBankLinear] section doesn't exist in the SVGADATA.PMI file that * has been created by SVGA.EXE from OS/2 2.x and should be copied * here as shown below */ [SetBankLinear] /* from SVGADATA.S3 */ r0 = 0x00000000; /* from SVGADATA.S3 */ inb(r1, 0x3d4); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x31, 0xf6, 0x09); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x40, 0xf7, 0x08); /* from SVGADATA.S3 */ rmwbi(0x3d4, 0x3d5, 0x58, 0xff, 0x00); /* from SVGADATA.S3 */ outb(0x3d4, 0x35); /* from SVGADATA.S3 */ inb(r2, 0x3d5); /* from SVGADATA.S3 */ r2 &= 0x000000f0; /* from SVGADATA.S3 */ r3 = r0 & 0x0000000f; /* from SVGADATA.S3 */ r3 |= r2; /* from SVGADATA.S3 */ outb(0x3d5, r3); /* from SVGADATA.S3 */ outb(0x3d4, 0x51); /* from SVGADATA.S3 */ inb(r2, 0x3d5); /* from SVGADATA.S3 */ r2 &= 0x000000f3; /* from SVGADATA.S3 */ r3 = r0 & 0x00000030; /* from SVGADATA.S3 */ r3 >>= 0x00000002; /* from SVGADATA.S3 */ r3 |= r2; /* from SVGADATA.S3 */ outb(0x3d5, r3); /* from SVGADATA.S3 */ outb(0x3d4, r1); /* from SVGADATA.S3 */ /* * The [GetBankLinear] section doesn't exist in the SVGADATA.PMI file that * has been created by SVGA.EXE from OS/2 2.x and should be copied * here as shown below */ [GetBankLinear] /* from SVGADATA.S3 */ inb(r1, 0x3d4); /* from SVGADATA.S3 */ outb(0x3d4, 0x35); /* from SVGADATA.S3 */ inb(r0, 0x3d5); /* from SVGADATA.S3 */ r0 &= 0x0000000f; /* from SVGADATA.S3 */ outb(0x3d4, 0x51); /* from SVGADATA.S3 */ inb(r2, 0x3d5); /* from SVGADATA.S3 */ r2 &= 0x00000004; /* from SVGADATA.S3 */ r2 <<= 0x00000002; /* from SVGADATA.S3 */ r0 |= r2; /* from SVGADATA.S3 */ outb(0x3d4, r1); /* from SVGADATA.S3 */ /* * The [TrapRegs] section doesn't exist in the SVGADATA.PMI file that * has been created by SVGA.EXE from OS/2 2.x and should be copied * here as shown below */ [TrapRegs] /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c2; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c4; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c5, 0x00-0x04; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03d4; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03d5, 0x00-0x18, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x42-0x43, 0x45-0x49, 0x4c-0x5a, 0x5c-0x5e, 0x60-0x62; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c0; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c1, 0x00-0x14; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03ce; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03cf, 0x00-0x08; /* from SVGADATA.S3 */ WORD_IOPORT 0x9ae8; /* from SVGADATA.S3 */ WORD_IOPORT 0x4ae8; /* from SVGADATA.S3 */ WORD_IOPORT 0xbee8; /* from SVGADATA.S3 */ WORD_IOPORT 0x96e8; /* from SVGADATA.S3 */ WORD_IOPORT 0x86e8; /* from SVGADATA.S3 */ WORD_IOPORT 0x82e8; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c6; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c7; /* from SVGADATA.S3 */ BYTE_IOPORT 0x03c8; /* from SVGADATA.S3 */ /* * I have removed the following Graphics modes that I didn't need, to avoid wasting * valuable bandwidth: * - Graphics mode 640 x 480 x 16 colors * - Graphics mode 640 x 480 x 256 colors * - Graphics mode 640 x 480 x 64K colors * - Graphics mode 640 x 480 x 16.7M colors * - Graphics mode 800 x 600 x 16 colors * - Graphics mode 800 x 600 x 256 colors * - Graphics mode 800 x 600 x 64K colors * - Graphics mode 1024 x 768 x 16 colors * - Text mode 40 cols x 25 rows * - Text mode 132 cols x 25 rows * - Text mode 132 cols x 43 rows * * Only the modes I needed are here: If you need another mode do the same as I * did for the other modes */ /* * HI-COLOR DAC by AT&T Microelectronics, Inc. */ [comment] Graphics Mode: 1024 x 768 x 256 colors. [AdapterType] S3 [ChipSet] S386C80X [ModeInfo] ModeAttributes = 0x18 BytesPerScanLine = 128 XResolution = 1024 YResolution = 768 TextRows = 48 BitsPerPixel = 8 NumberOfPlanes = 1 PageLength = 786432 SaveSize = 786432 TotalMemory = 1048576 InterlaceMode = 0 BufferAddress = 0x0a0000 /* * This section may be obsoleted by the [TrapRegs] section above, but I'm * not sure about this. */ [TrapRegs] 0x3c2; 0x3c4, 0x00-0x04; 0x3c5; 0x3d4, 0x00-0x18, 0x50-0x5a, 0x5c-0x5e, 0x60-0x62, 0x31-0x35, 0x3a-0x3c, 0x40-0x40, 0x43-0x43, 0x45-0x49, 0x4c-0x4f, 0x42-0x42, 0x67-0x67; 0x3d5; 0x3c0, 0x00-0x14; 0x3c1; 0x3ce, 0x00-0x08; 0x3cf; 0x4ae8; 0xbee8; 0x96e8; 0x86e8; 0x82e8; [SetMode] /* * Set Hi Color DAC * * Does this section the same things as the [ProgramDac] section above? */ inb(r0, 0x3c7); inb(r0, 0x3c6); inb(r0, 0x3c6); inb(r0, 0x3c6); inb(r0, 0x3c6); r1 = 0x00; outb(0x3c6, r1); inb(r0, 0x3c7); outb(0x3c6, 0xff); /* * Set Miscellaneous Output Register */ outb(0x3c2, 0xef); /* * Set Sequencer Registers */ r0 = 0x00; r1 = 0x01; r2 = 0x0f; r3 = 0x00; r4 = 0x0e; boutb(5, 0x00, 0x3c4, 0x3c5); outw(0x3c4, 0x0300); /* * Set CRT Registers */ outw(0x3d4, 0x0e11); r0 = 0x99; r1 = 0x7f; r2 = 0x7f; r3 = 0x9c; r4 = 0x83; r5 = 0x19; r6 = 0x97; r7 = 0x1f; r8 = 0x00; r9 = 0x40; r10 = 0x00; r11 = 0x00; r12 = 0x00; r13 = 0x00; r14 = 0xff; r15 = 0x00; r16 = 0x81; r17 = 0x83; r18 = 0x7f; r19 = 0x80; r20 = 0x00; r21 = 0x80; r22 = 0x96; r23 = 0xe3; r24 = 0xff; boutb(25, 0x00, 0x3d4, 0x3d5); r80 = 0x00; r81 = 0x00; r82 = 0x00; r83 = 0x00; r84 = 0x48; r85 = 0x00; r86 = 0x00; r87 = 0x00; r88 = 0x18; r89 = 0x00; r90 = 0x0a; boutb(11, 0x50, 0x3d4, 0x3d5); r92 = 0x02; r93 = 0x00; r94 = 0x00; boutb(3, 0x5c, 0x3d4, 0x3d5); r96 = 0x2f; r97 = 0x81; r98 = 0x00; boutb(3, 0x60, 0x3d4, 0x3d5); r49 = 0x8d; r50 = 0x00; r51 = 0x00; r52 = 0x00; r53 = 0x00; boutb(5, 0x31, 0x3d4, 0x3d5); r58 = 0x95; r59 = 0x94; r60 = 0x40; boutb(3, 0x3a, 0x3d4, 0x3d5); r64 = 0x51; boutb(1, 0x40, 0x3d4, 0x3d5); r67 = 0x00; boutb(1, 0x43, 0x3d4, 0x3d5); r69 = 0x00; r70 = 0x00; r71 = 0xff; r72 = 0xfc; r73 = 0xff; boutb(5, 0x45, 0x3d4, 0x3d5); r76 = 0xff; r77 = 0xff; r78 = 0xff; r79 = 0xdf; boutb(4, 0x4c, 0x3d4, 0x3d5); r66 = 0x22; boutb(1, 0x42, 0x3d4, 0x3d5); rmwb(0x3d4, 0x3d5, 0x55, 0xfc, 0x01); outb(0x3c8, 0x02); r1 = 0x56; outb(0x3c9, r1); r1 = 0x45; outb(0x3c9, r1); rmwb(0x3d4, 0x3d5, 0x55, 0xfc, 0x00); r103 = 0x22; boutb(1, 0x67, 0x3d4, 0x3d5); /* * Set Attribute Registers */ r0 = 0x00; r1 = 0x01; r2 = 0x02; r3 = 0x03; r4 = 0x04; r5 = 0x05; r6 = 0x14; r7 = 0x07; r8 = 0x38; r9 = 0x39; r10 = 0x3a; r11 = 0x3b; r12 = 0x3c; r13 = 0x3d; r14 = 0x3e; r15 = 0x3f; r16 = 0x01; r17 = 0x00; r18 = 0x0f; r19 = 0x00; r20 = 0x00; boutb(21, 0x00, 0x3c0, 0x3c1); /* * Set GDC Registers */ r0 = 0x00; r1 = 0x00; r2 = 0x00; r3 = 0x00; r4 = 0x00; r5 = 0x00; r6 = 0x05; r7 = 0x0f; r8 = 0xff; boutb(9, 0x00, 0x3ce, 0x3cf); /* * Set Enhanced Command Registers */ outw(0x4ae8, 0x0007); outw(0xbee8, 0x1000); outw(0xbee8, 0x33ff); outw(0xbee8, 0x2000); outw(0xbee8, 0x43ff); outw(0xbee8, 0xa000); outw(0xbee8, 0x03ff); outw(0x96e8, 0x03ff); outw(0x86e8, 0x0000); outw(0x82e8, 0x0000);