If you think that in large resolutions (1024x768 and more) screen redrawing is slow, here is the solution:
1) for vbemp.sys
Hive : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vbemp\Device0 or
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vgasave\Device0 in legacy mode
Key : Acceleration.Level
Value : (REG_DWORD) = 5
2) for vga.sys
Hive : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vgasave\Device0 Key : Acceleration.Level Value : (REG_DWORD) = 5
Note 1: This trick works in Windows2000/XP/2003. But NOT in Windows NT 4 and others.
Note 2: For "normal accelerated drivers" like made by AMD-ATI, Intel, nVidia and others Acceleration.Level=5 key SLOWDOWNS redraw. Do not set it. In this case, optimal setting is Acceleration.Level=0 or when this key is not exist.
Acceleration.Level is a tricky key that controls how Windows changes functionality of a vendor (or Microsoft) supplied display driver.
Taken from here: http://msdn2.microsoft.com/en-us/library/ms797865.aspx and here: http://msdn2.microsoft.com/en-us/library/ms797471.aspx Windows Driver Kit: Display Devices Dynamic Change of Permitted Driver Accelerations The driver's acceleration level can be changed through the user interface by using the slider that is produced by clicking on the Display icon in Control Panel. Depending on the value set with this slider, GDI allows the following levels of driver accelerations listed in the following table. 0 All display driver accelerations are permitted. 1 DrvSetPointerShape and DrvCreateDeviceBitmap are disabled. 2 In addition to 1, more sophisticated display driver accelerations are disallowed, including DrvStretchBlt, DrvFillPath, DrvGradientFill, DrvLineTo, DrvAlphaBlend, and DrvTransparentBlt. 3 In addition to 2, all DirectDraw and Direct3D accelerations are disallowed. 4 In addition to 3, almost all display driver accelerations are disallowed, except for solid color fills, DrvCopyBits, DrvTextOut, and DrvStrokePath. DrvEscape is disabled. 5 No hardware accelerations are allowed. The driver will only be called to do bit-block transfers from a system memory surface to the screen.Pp. 5 means that driver (i.e. vbemp.sys, vga.sys, any other unaccelerated one) only do its job when transferring data from system memory to video memory is performed which is a rather FAST operation due to hardware write optimization in every modern (and not so modern) videoadapter. PCI/AGP/PCI-E (and even ISA/VLB!) videoadapters also uses CPU's speedup features of MTRR registers and USWC ( http://en.wikipedia.org/wiki/Uncacheable_Speculative_Write_Combining ) (Moving are made, for example using REPE MOVSD in 32bit color modes). But transferring data from video memory to system memory is SLOW even if you have an accelerated card and a "simple" driver. But who handles other operations when pp.5 is selected (or slider moved to "No acceleration")? Windows (i.e. win32k.sys) handles them. Using this tool ( http://www.stereopsis.com/blttest/ ). I discovered that reading from video memory to system memory is faster in pp.5 mode comparing to pp.0,1,2,3,4. Reading/Writing from system memory to video memory is performing thousand and hundreds of times when you:
P.S. In bsd/linux world (which is rather clear due to OpenSource and so on...) this feature named correctly as shadow acceleration. It minimizes reading from video memory using temporary buffer (or cache) in compter's system RAM. This buffer equals in size to video memory size of display window.
Not so long away I mention on my site regarding XP/2003's VGA driver:
Comparing to my VBEMP driver, VGA.SYS ... .... cannot switch to modes less than 640x480...
It means that even if card supports such modes (as 512x384, 320x200, 320x240, 400x300, 640x350, 640x400 and so on - in its VESA BIOS) - VGA.SYS will filter and remove them, regardless of its color resolution (8/15/16/24 or 32 bit). These modes are good for games (such as Quake1/2, HalfLife1, some others) as when VGA.SYS is used no acceleration is provided and game will work faster in low-res mode using less CPU power. Also it is good when low-res "< 640x480" modes are needed and you, for some reasons, cannot use VBEMP at all.
To resolve this problem, I make a simple patch to VGA.SYS that allows to use ANY MODE from VESA modetables which card can theoretically support (as it made in VBEMP).
1. Find this code in VGA.SYS by searching for hex string "E0 01" (480)
668178128002 cmp w,[eax][12],00280;X Resolution is 640 0F82F3010000 jb .000014B10;less than 640, skip it 66817814E001 cmp w,[eax][14],001E0;Y Resolution is 480 0F82E7010000 jb .000014B10;less than 480, skip itand change it:
668178124001 cmp w,[eax][12],00140;X Resolution is 320 0F82F3010000 jb .000014B10;less than 320, skip it 66817814C800 cmp w,[eax][14],000C8;Y Resolution is 200 0F82E7010000 jb .000014B10;less than 200, skip itI.e you must change "80 02" to "40 01" (640 to 320) and "E0 01" to "C8 00" (480 to 200). It will work as I don't know any mode that will be less than 320x200. :) Don't forget to recalculate the checksum of VGA.SYS in PE-header after all modifications or this patched VGA.SYS WILL NOT load. Windows checks every driver checksum before it can successfully load it. You can use editbin tool from Microsoft's Visual Studio or Platform SDK:
editbin /RELEASE VGA.SYS
Some years ago I found a file in %SystemRoot%\SYSTEM32\ with interesting name - MODEX.DLL.
Firstly I thought that it was for some kinda Mode X ( http://en.wikipedia.org/wiki/Mode_X ) and/or DirectX stuff. But I don't know what for exactly. Now I examine it and can tell what this mysterious dll is it for. Let's begin. Windows 2000/XP/2003 contains some internal universal kernel-mode display driver dlls. They provide support for working with different types of screen bitmap surfaces:
VGA.DLL - used for 4-bit (16 color modes) in conjunction with VGA.SYS VGA256.DLL - used for BANKED 8-bit (256 color modes) in conjunction with VGA.SYS, VBEMP.SYS (XP+) VGA64K.DLL - used for BANKED 16/24/32-bit (truecolor modes) in conjunction with VGA.SYS, VBEMP.SYS (XP+) FRAMEBUF.DLL - used for LINEAR 8/16/24/32-bit (256/truecolor modes) in conjunction with VGA.SYS (XP+), VBEMP.SYS and finally MODEX.DLL - used for BANKED ModeX 8-bit (256 color modes) WITH WIDTH OF 320 LINES in conjunction with VGA.SYS, VBEMP.SYS (planned)
The main problem that this dll is not mentioned in any documentation and even in *.inf files stored in %SystemRoot%\INF\ directory. It also disabled in registry by default. So to enable it you must insert it there manually.
In Windows XP/2003, VGA.SYS provides support for such modes, regardless of VESA BIOS support for them, which is good (some Matrox cards, for example, doesn't have 320-line modes in it's VESA BIOS):
320x200 8-bit 70 Hz 320x240 8-bit 60 Hz 320x400 8-bit 70 Hz 320x480 8-bit 60 HzThese modes are multi-plane (4 or 8 planes) so moves from/to display surface is somewhat faster than in ordinary linear modes with the same dimensions, especially when moved bitmap width is clearly divided by 8. QUAKE II has support for 320x240x8 mode. To enable MODEX.DLL use for VGA.SYS in Windows XP/2003 (Windows 2000 doesn't have a native VESA video driver so you can use VBEMP for it): For VGA.SYS: append to REG_MULTI_SZ InstalledDisplayDrivers value from
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VgaSave\Device0and from
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx}\0000
such newline
modexP.S. VBEMP.SYS support for MODEX.DLL is now done and planned to release in current month. This support covers only Windows 2000/XP/2003 version of VBEMP.
Prerequisites:
You need only to patch palette data in vga.dll
0xC0,0xC0,0xC0to
0x40,0x40,0x40- light gray to dark gray palette entry.
0x00,0x00,0x01,0x00,0x02,0x00,0x03,0x00,0x04,0x00,0x05,0x00,0x06,0x00,0x07,0x00, 0x08,0x00,0x09,0x00,0x0A,0x00,0x0B,0x00,0x0C,0x00,0x0D,0x00,0x0E,0x00,0x0F,0x00to
0x00,0x00,0x04,0x00,0x02,0x00,0x06,0x00,0x01,0x00,0x05,0x00,0x03,0x00,0x07,0x00, 0x38,0x00,0x24,0x00,0x12,0x00,0x36,0x00,0x09,0x00,0x2D,0x00,0x1B,0x00,0x3F,0x00in VGA there are links to 256 palette entries but in EGA there are real palette data in form of bits:
00rgbRGB 76543210rgb are 1/3 intensity, RGB are 2/3 intensity.
Drivers - Cirrus Logic
Graphics
CL-GD5422/24/26/28 Drivers
GD542X DOS utilities
k542x-d1.zip (835k) 12/21/1995
GD542X OS/2 (2.x and 3.x) drivers v1.50
k542x-d3.zip 12/21/1995 1303k
GD5422/GD5424 Windows 3.1x drivers v1.50 Disk 1/2
k54242e.zip 12/21/1995 612k
GD5422/GD5424 Windows 3.1x drivers v1.50 Disk 2/2
k54242e2.zip 12/21/1995 731k
GD5426/GD5428 Windows 3.1x drivers v1.50 Disk 1/2
k54282e.zip 12/21/1995 702k
GD5426/GD5428 Windows 3.1x drivers v1.50 Disk 2/2
k54282e2.zip 12/21/1995 729k
CL-GD5422, CL-GD5424 Windows NT 3.1 driver v1.43
k542xd4a.zip 12/21/1995 119k
CL-GD5426, CL-GD5428 Windows NT 3.1 driver v1.41
k542xd4b.zip 12/21/1995 118k
GD542X Windows NT 3.5x drivers v1.50
k542x-d5.zip 12/21/1995 139k
CL-GD542X BIOS overlay for VESA v1.2 support on ISA cards, v1.41.
542xvga.exe 10/28/1997 32.6k
Note: This is not a BIOS update; updates can only come from the video board manufacturer.
CL-GD542X BIOS overlay for VESA v1.2 support on VL-Bus cards, v1.41.
542xvgal.exe 10/28/1997 32.6k
Note: This is not a BIOS update; updates can only come from the video board manufacturer.
CL-GD5429 Drivers
GD5429 DOS utilities v1.00b
k5429-d1.zip (550k) 12/21/1995
GD5429 Windows 3.1x & Win-OS/2 Linear drivers v1.00b
k5429-d2.zip (883k) 12/21/1995
GD5429 OS/2 2.1 drivers v1.00b
k5429-d3.zip (1187k) 12/21/1995
CL-GD543x Drivers
k543x-d3.zip (1244k) 2/21/1996 GD543x OS/2 (2.x and 3.x) drivers v1.24 k543x-d4.zip (117k) 2/21/1996 GD543x Windows NT 3.1 drivers v.1.24 k543x-d5.zip (139k) 12/21/1995 GD543x Windows NT 3.5x drivers v1.24 k543x2e.zip (905k) 12/21/1995 GD543x Windows 3.1x drivers v1.24 Disk 1/2 k543x2e2.zip (1071k) 12/21/1995 GD543x Windows 3.1x drivers v1.24 Disk 2/2 k543x-d1.zip (820k) 12/21/1995 GD543x DOS utilities v1.24 CL-GD5430 executable BIOS overlay for PCI adapter, v1.20. 5430pci.exe (32.6k) 9/02/1996 Note: This is not a BIOS update; updates can only come from the video board manufacturer. 5434pci.exe (32.6k) 9/02/1996 CL-GD5434 executable BIOS overlay for PCI adapter, v1.20. Note: This is not a BIOS update; updates can only come from the video board manufacturer. For CL-GD5430 or CL-GD5434 the "Cirrus Logic 5429/30/34" driver included in the Windows 95 distribution disk(s) should support most implementations of the chip. update from the video board manufacturer to use Win95 with your* * *
CL-GD544x Drivers
k54402c.zip 5/02/1996 (751k) Chinese Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 1/2 k54402c2.zip 5/02/1996 (1019k) Chinese Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 2/2 k54402e.zip 5/02/1996 (1106k) English Windows 3.1x drivers, version 1.06 for GD5440/GD54M30 k54402j.zip 5/02/1996 (933k) Japanese Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 1/2 k54402j2.zip 5/02/1996 (851k) Japanese Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 2/2 k54402k.zip 5/02/1996 (751k) Korean Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 1/2 k54402k2.zip 5/02/1996 (1019k) Korean Windows 3.1x drivers, version 1.00 for GD5440/GD54M30 Disk 2/2 k5440-d4.zip 5/02/1996 (117k) Windows NT 3.1 drivers, release 1.00 k5440-d5.zip 5/02/1996 (139k) Windows NT 3.5X drivers, release 1.00 k54406.zip 5/02/1996 (192k) Windows 95 drivers for GD5440/M40 version 1.06 k5440-d3.zip 5/02/1996 (1244k) OS2 (2.x and 3.x) drivers, release 1.00 k5440-d1.zip 5/02/1996 (820k) DOS applications and utilities disk, version 1.00 k5440tv.zip 5/02/1996 (1005k) CL-GD5440/M40 TV-Tap Installation, version 1.06
CL-GD5446 Drivers
CL-GD5446 OS/2 Warp 2.1X-4.0 drivers, v1.40
5446os2.zip (1153k) 1/26/1998
CL-GD5446 Windows 95 drivers, v1.41
5446w95.zip (361k) 9/02/1998
CL-GD5446 Windows NT 4.0 drivers, v1.41
5446nt4.zip (194k) 9/02/1998
CL-GD5446 Windows NT 3.5X drivers, v1.40
5446nt35.zip (69.7k) 1/26/1998
CL-GD5446 DOS Driver & Utils Ver 1.31
k54461e.zip (983k) 4/25/1997
CL-GD5446 Windows 3.1x Driver & Utils Ver 1.31
k54462e.zip (1139k) 4/25/1997
CL-GD5446 Japanese Windows 3.1x Driver & Utils v1.31 Disk [1/2]
k54462j.zip (842k) 4/25/1997
CL-GD5446 Japanese Windows 3.1x Driver & Utils v1.31 Disk [2/2]
k54462j2.zip (1117k) 4/25/1997
CL-GD5446 Japanese OS/2 2.1x-4.0 Driver & Utils Ver 1.31
k54463j.zip (1164k) 4/25/1997
CL-GD5446 Tvtap Software v2.00.043
k5446t.zip (1291k) 3/11/1998
CL-GD5446 VESA 2.0 TSR v1.0
clvbe20.zip (4.95k) 4/25/1997
CL-GD5480 Drivers
CL-GD5480 DOS Drivers & Utils Ver 1.00
k54801e.zip 4/25/1997 (985k)
CL-GD5480 Japanese DOS Drivers & Utils Ver 1.00
k54801j.zip 4/25/1997 (1235k)
CL-GD5480 Chinese/Korea Windows 3.1X Drivers & Utils Ver 1.00
k54802ck.zip 4/25/1997 (1111k)
CL-GD5480 Windows 3.1X Drivers Ver 1.01
k54802e.zip 3/12/1998 (1171k)
CL-GD5480 Japanese Windows 3.1X Drivers & Utils v1.00 Disk [1/2]
k54802j1.zip 4/25/1997 (905k)
CL-GD5480 Japanese Windows 3.1X Drivers & Utils v1.00 Disk [2/2]
k54802j2.zip 4/25/1997 (1117k)
CL-GD5480 OS/2 2.1X-4.0 Driver & Utility Ver 1.00
k54803e.zip 4/25/1997 (1164k)
CL-GD5480 Japanese OS/2 2.1X-4.0 Driver & Utility Ver 1.00
k54803j.zip 4/25/1997 (1146k)
Windows 95 drivers, v1.01b for CL-GD5480 Disk 1/2
k54806e1.zip 8/19/1997 (1223k)
Windows 95 drivers, v1.01b for CL-GD5480 Disk 2/2
k54806e2.zip 8/19/1997 (1357k)
Windows NT 3.5X-4.0 drivers, v1.00d for the CL-GD5480
k54807.zip 8/19/1997 (400k)
TVTap Drivers and utilities disk v2.00.42
k5480tv.zip 8/19/1997 (1269k)
CL-GD546x Drivers
k542x-d1.zip 5/04/1998 (835k) CL-GD542X DOS applications and utilities disk v1.50 including CLMODE program k546xd2.zip 8/19/1997 (922k) CL-GD546X Japanses DOS Drivers and Utilities v1.47 k546xd3.zip 8/19/1997 413k) CL-GD546X Panacea AutoCAD ADI 4.2, Microstation v1.33 k546xd4.zip 8/19/1997 (1125k) CL-GD546X Windows 3.1X drivers v1.47 k546xd5.zip 8/19/1997 (139k) CL-GD546X Windows NT 3.51/4.0 drivers v1.33 5464w951.zip 5/04/1998 (1293k) CL-GD546X Windows 95 drivers v1.70c Disk [1/3] 5464w952.zip 5/04/1998 (815k) CL-GD546X Windows 95 drivers v1.70c Disk [2/3] 5464w953.zip 5/04/1998 (792k) CL-GD546X Windows 95 drivers v1.70c Disk [3/3] k546xd9.zip 8/19/1997 (934k) CL-GD546X OS/2 Warp 3.0 drivers v1.47