OS/2 2.1GA small resource SVGA display driver for 1024x768x256 Release date: 04 June 1993 Package source: Daniel J Neades CONTENTS Introduction Contacting the author Limitations Disclaimer Installation Configuring Win-OS2 to use small fonts How this driver was created Blatant plug INTRODUCTION This driver basically gives you the resources used by the 640x480 display driver at 1024x768 resolution, thus effectively giving you more screen real estate. The main differences between this and the standard 1024x768x256 SVGA driver are: Small fonts Small system fonts (esp. useful when viewing help) 8.Helv is now *really* tiny! Small icons Full-sized icons are 32x32 pixels and not 40x40 Small title bars Title bars have shrunk along with everything else; they are now the same height (in pixels) as in 640x480 resolution. CONTACTING THE AUTHOR This section is misleadingly titled since I am merely the modifier of the driver included with this package and not the author. I would be grateful if you would let me know how you get on with this driver. Send me a post-card, even if just to say 'Thankyou'! I like post-cards :-) I welcome both positive and negative comments. My snail-mail address is Daniel J Neades c/o 45 Causley Drive Warmley Bristol BS15 7BA England I can be contacted via Internet e-mail until 23 June 1993. My id is djn@ukc.ac.uk LIMITATIONS This driver is only suitable as a replacement for 1024x768x256 resolution SVGA display drivers. It therefore supports cards such as those with Tseng and Trident chipsets. It will *not* work 8514 or XGA cards. Basically, if your card uses the IBMDEV32.DLL driver unpacked from SV768256.DLL on Display Driver Diskette 2 then this driver will probably work. This driver is a modified version of that distributed with OS/2 2.1GA. It *may* work with the December or March 2.1 betas, but this is untested. If you attempt to use this driver with either beta (or even 2.0GA+SP), please let me know how you get on. NOTE Some dialogs may be slightly cramped using this driver. This is due to the way that OS/2 handles spacing of dialog box components. This is a feature, not a bug :-) The media player included with 2.1GA exhibits this problem. This display driver is *very* similar to the standard distribution SVGA 1024x768x256 driver. Any bugs are therefore probably present in the 2.1GA SVGA driver. Having said that, I would like to know if you encounter problems. DISCLAIMER This driver was created for my own use only. I have made it available merely as a service to others who are also fed-up with having their screen resolution wasted. I accept no responsibility or liability for any loss or damage arising from or as a result of the use of this driver. If anyone at IBM is upset that I've uploaded some modified OS/2 2.1GA code then I'm *really* sorry. You could sue me, but I haven't got any money so it probably wouldn't be worth it :-) Seriously, let me know if there are problems with making this driver available and I'll get it removed ASAP. What would be wonderful would be to have IBM make small resource 1024x768 drivers available as part of the standard OS/2 distribution. If anyone has any influence with the IBM people responsible for OS/2, please pressure them to include small font resource drivers with the standard distribution in future. It would be trivial for them... INSTALLATION NOTE FOR MARCH BETA ONLY The following procedure is for 2.1GA *only*. Even if this driver works with the March beta (probable), the following instructions may not work. For the March beta, you should copy both display driver disks into a directory on your hard disk, copy SV768256.DL_ included with this package to that directory and then run dspinstl.exe and point it at the directory. Since you are reading this I assume that you have managed to unzip the file containing the replacement driver! 1. You should verify that your video card is supported by this driver (see LIMITATIONS). 2. Ensure that OS/2 is currently running your display adapter in 1024x768x256 resolution. 3. Make a copy of Display Driver Diskette 2 (see the online help for diskcopy if you are unsure how to do this). Label this disk 'Small resource 1024x768x256 SVGA display driver'. 4. Copy the file SV768256.DL_ included with this package onto the copy of Display Driver Diskette 2 which you have just made. 5. Run the program DSPINSTL.EXE included with OS/2 2.1GA, and follow the usual procedure for installing the display driver for your card. When prompted for Display Driver Disk 2, insert the modified copy made in steps 3 and 4. 6. If you have at some stage changed the default system font (for example, by running the REXX script given in the OS/2 README file), then you should run FONT.CMD. This resets the default system font to to default. 7. Shut down and reboot. You should now have OS/2 running in 1024x768x256 resolution with small icons, fonts and title bars. NOTE This procedure simply replaces the IBMDEV32.DLL in your \OS2\DLL directory with the (unpacked) contents of SV768256.DL_ included with this package. If you are an experienced OS/2 user, you may wish to directly replace this file. Note that the file is locked whilst Presentation Manager is running, and so you will need to boot OS/2 without Presentation Manager. CONFIGURING WIN-OS2 TO USE SMALL FONTS Win-OS2 defaults to enormous fonts for 1024x768x256 resolution (both seemless and full-screen). Fortunately, the 2.1GA distribution is capable of running Win-OS2 at 1024x768 with small fonts. Follow the procedure below to configure WIN-OS2 to use small fonts. NOTE Re-installing the OS/2 display driver (for example, by following the procedure above) will reset your Win-OS2 SYSTEM.INI settings. You will therefore have to make the changes described below *after* installing the OS/2 small resource driver. 1. Insert OS/2 Display Driver Disk 2 into drive A: 2. Type UNPACK A:\WSPDSF.DR_ X: UNPACK A:\WSPDSSF.DR_ X: where X: is the drive on which Win-OS/2 is installed. 3. Edit the file X:\OS2\MDOS\WINOS2\SYSTEM.INI. Again, X: is the drive on which Win-OS/2 is installed. 4. You now have to change several lines: Change the following lines in the [boot] section display.drv=wspdbf.drv sdisplay.drv=wspdsbf.drv fonts.fon=xgasys.fon fixedfon.fon=xgafix.fon oemfonts.fon=xgaoem.fon to display.drv=wspdsf.drv sdisplay.drv=wspdssf.drv fonts.fon=vgasys.fon fixedfon.fon=vgafix.fon oemfonts.fon=vgaoem.fon repectively. In the [boot.description] section will be two lines similar to display.drv=1024x768x256 Large fonts 1M ET4000 sdisplay.drv=1024x768x256 Large fonts 1M ET4000 Note that 'ET4000' may be replaced with the name of your SVGA card's chipset. This is unimportant. ALl you must do is change the word 'Large' to 'Small' in both lines. 5. Save the SYSTEM.INI file, and quit your editor. Win-OS2 should now be configured to run with small fonts. NOTE If you follow this procedure, and the Win-OS2 fonts are not displayed correctly, it may be that the small (VGA) Win-OS2 fonts are not installed. To correct this, install a low resolution driver (640x480), reinstall the driver included with this package and then follow the above instructions to instruct Win-OS2 to use small fonts. HOW THIS DRIVER WAS CREATED If your video card isn't supported by this driver then you may wish (if you're feeling brave and/or foolish) to attempt to create a small resources driver of your own. I therefore describe how I created the small resource driver. Like many people, I was fed up with the large fonts and icons used in the standard 1024x768 SVGA display driver. Desiring an excuse to avoid doing revision for my finals, I downloaded a binary editor (beav) and dug out my copy of Borland's Resource Workshop for OS/2 (supplied with Borland C++ for OS/2). Then I played... A little experimentation showed that IBMDEV32.DLL was the DLL responsible for the display resolution and resources used. In other words, IBMDEV32.DLL is the display driver. Cleverly, only one IBMDEV32.DLL is used for all the SVGA display cards supported by the OS/2 2.1. Next, I made a copy of IBMDEV32.DLL and fired up Resource Workshop (RW from here on). I deleted all the resources attached to the DLL and then saved the result to 1024.DLL. I manually unpacked the 640x480x256 IBMDEV32.DLL from Display Driver Disk 2. I loaded this into RW and saved the resources as a .RES file (640.RES). Feeling brave, I loaded 1024.DLL into beav. From my Windoze days I knew that the large font drivers had a device resolution of 120 something or others. The small font drivers had a resolution of 96. Knowing 120 to 78 hexadecimal (well, I didn't *know*, I used my trusty HP calculator :-), I browsed through 1024.DLL searching for something that might prove relevant. Eventually, I found two sequences of four bytes. Both sequences were 78 00 00 00 (all numbers are hex). I changed the 78 to 60 in both instances (60 hex being 96 decimal). I saved 1024.DLL and quit beav. Actually, I've made it sound simple. I could pretend that I got it right first time and impress you all, but then I'd be lying ;-) I'll spare you the grief... Using RC.EXE (supplied with OS/2), I bound the contents of 640.RES to the newly modified 1024.DLL. Automagically, I had a small resource IBMDEV32.DLL (albeit called 1024.DLL, but that was easily changed). Anyhow, I replaced my C:\OS2\DLL\IBMDEV32.EXE with the 1024.DLL just created. I rebooted. Well, I had small icons and small title bars. Unfortunately, I still had that enormously large system font which IBM for some reason has seen fit to inflict upon all owners of display cards/monitors capable of at least 1024x768. Why they assume that we wish to waste our high resolution with enormous fonts I really don't know. I only have a 15" monitor and they're far too large for me. I pity those with 20" monitors. I guess they must have long keyboard leads and sit about six feet back from the screen... Okay, "Simple!" I think to myself. The OS/2 2.1 lets you change the default system font (there's a little REXX script in the README). So I change it to 8.Helv. Bad move. Sure, it worked. However, the WPS settings notebooks insisted on using the *real* (giant) system font, and not the default that I'd set. This would have been bearable had they not tried to space the dialog components according to the 8.Helv font metrics... I reset the default system font to 10.System Proportional. I needed another solution. I'm sure that there is some magic in IBMDEV32.DLL which dictates which sized system font to use (you know, sensible size, or stupid size). Most likely, it simply contains the resource ID of the font to use. However, Turbo Debugger GX wouldn't let me disassemble IBMDEV32.DLL to see what it was doing (it's not an executable program and so TDGX didn't want to know) and I wasn't brave enough to attempt to force IBMDEV32.DLL into submission with beav. I therefore cast my attentions elsewhere. It turns out that DSPRES.DLL contains the system fonts (ISO System Proportional, non-ISO System Proportional and System VIO) used by OS/2. Further inspection revealed that there are three versions of both of the System Proportional fonts. Why three? I've no idea. I thought there were only two variations: small and large. Apparently not, but I digress. The System Proportional (ISO) font appears to be stored under resource IDs 100, 101 and 102. The non-ISO versions under 200, 201 and 202. Using my skill and cunning (okay, so I guessed :-) I copied the contents of resource 100 to 101 and 102. Likewise, I replaced 201 and 202 by the contents of resource 200. Then I saved DSPRES.DLL. I replaced my C:\OS2\DLL\DSPRES.DLL with the new version and rebooted. Heaven! Bliss! Screen space! Finally, I could use the available screen resolution in a sensible way. Somewhere along the line, System VIO fonts had disappeared from the font palette, but that was a small price to pay... 'Where', you cry, 'Where is DSPRES.DLL?' 'Why is it not included with this package?' Well, I mentioned a couple of paragraphs ago that IBMDEV32.DLL contained some magic to make it use large fonts. Further investigation (with my trusty binary editor) revealed this magic. There is a sequence of four bytes: 65 00 00 00 which specifies that font resource 101 in DSPRES.DLL is to be used. Changing the 65 to 64 makes it use resource 100, which is a small font. There is therefore no longer any need to modify DSPRES.DLL. This has the welcome side effect of allowing you to continue to use the System VIO fonts from the Font Palette. BLATANT PLUG One final note, you may wish to try out my first ever PM program. It's a graphical process display/kill utility (standard stuff...) called PMps. It's on hobbes in pub/os2/2.x/sysutils/pmps.zip. I've just finished writing a really whizzy little application which you'd all love. Unfortunately, it's under wraps at the moment and so you'll have to wait for it...