An article about OS/2 on a PowerPC-based ThinkPad 850 needed a few screenshots for illustration. Once an OS is installed and running a GUI, it’s typically possible to run a screen grab utility and capture screenshots digitally. But that’s not an option when an OS is being installed or when it is not running a windowing system. There’s of course the good old digital camera. It’s possible to take acceptable photos of a computer screen, but even with specialized equipment it’s impossible to get a perfect shot.
For a long time, photos seemed to be the only practical solution, but then Antoni Sawicki suggested a KVM-over-IP alternative: a Lantronix Spider, though other similar products exist. The Spider can be easily attached to the ThinkPad’s external VGA output. From a remote console it’s then trivial to take screenshots. Indeed taking screenshots of the ThinkPad 850 firmware worked beautifully. Then the OS/2 installer booted up and there was… nothing. The video signal was garbage. What a letdown! But that’s not the end of the story.
The Power Series ThinkPads 820/850 used Western Digital’s WD90C24A2 graphics chips, a relic of the days when Western Digital was more than just a hard drive company. These graphics devices supported 1MB VRAM and TFT displays with up to 800×600 resolution. An external CRT could be used for higher resolutions, 1024×768 or up to about 1280×1024. It was also possible to use the TFT display simultaneously with an external CRT (showing the same image), and that was typically the default. It was also the default in OS/2… it just doesn’t work right.
It’s worth mentioning that the newer RS/6000 notebook 860 used a larger 1024×768 TFT display. Since the WD90C24 chip couldn’t handle that, IBM had to use a different graphics chip, namely a S3 Aurora64V+ (86CM65).
As an aside, the same WD90C24A2 chip was also used in the ThinkPad 755CV/CDV. Several other ThinkPad models used other WD90C24 variants. What’s interesting is that in the Power Series ThinkPads, the WD90C24 presented itself as a PCI device (vendor/device ID 101C:C24A), but in all other systems the graphics chip was an ISA/VL-Bus device.
But back to taking screenshots of OS/2… the Spider was certainly not at fault, as a standard monitor didn’t fare any better. Fortunately, the mode setting in OS/2 PPC is more or less transparent and implemented in \OS2\WD_90C24.PMI. This is a text file written to the VESA SVGAPMI standard and documented in the OS/2 DDK.
Unlike the PMI files for other graphics chips supported by OS/2 Warp, PowerPC Edition (S3 928, S3 Vision 864, Weitek Power 9100, Cirrus Logic Alpine 5434), the WD90C24 PMI file looks a bit hacky with several commented out sections and sketchy looking changes. Given the fact that the ThinkPad 820/850 was never officially supported by OS/2, that’s not terribly surprising.
Brief experimentation revealed an interesting fact: although the 256-color 800×600 and 640×480 modes showed nothing on the external CRT, the 64K-color 640×480 mode did. Comparing the PMI file sections for 640x480x8 and 640x480x16 modes showed only a handful of differences. The most suspicious was the VGA miscellaneous output register (3C2h), which was written twice with the same value in the 640x480x8 case (no video on external CRT) but not in the 640x480x16 case (working CRT video). The changed (or rather unchanged) bits were part of the pixel clock (VCLK) controls; an incorrect VCLK would certainly produce the observed symptoms where a video signal is present but cannot be recognized.
Attempting to decipher the WD90C24 datasheets in order to understand the VCLK programming in the PMI file proved interesting, but ultimately fruitless. The PMI file didn’t quite make sense, but that could simply be caused by lack of understanding. Without verifying what’s actually programmed into the hardware, the final register values are just guesswork.
The next step was experimentation… if the PR68 register (WD specific) was programmed correctly, there were only four possible miscellaneous output register clock values (in bits 2 and 3), and one of them was already known to be wrong. With a bit of luck, the CRT programming for a 640x480x8 mode should be the same as for 640x480x16, so perhaps the same 3C2h value would work? Bingo! It did indeed.
The same clock bit values also worked for the 800x600x8 mode. OS/2 always appear to program the same CRT mode which matches the TFT panel resolution, i.e. 800×600. This is different from the Windows NT display driver, but both approaches are valid.
Here are the changes to \OS2\WD_90C24.PMI:
- Line 893, change
outb(0x3c2, 0xe3);
tooutb(0x3c2, 0xef);
- Line 1407, change
outb(0x3c2, 0x23);
tooutb(0x3c2, 0x2f);
The last task was modifying the PMI file inside the ISO image, burning it to a CD (at 8x speed; the ThinkPad’s CD-ROM is allergic to CD-Rs burned at 24x speed), and booting again. Et voilà:
It is a bit difficult to believe that this is a capture of analog VGA output, but it really is. For comparison, here is a photo of the same screen:
It’s just not the same.
The screenshot taken with the Lantronix Spider looks better.
But you didn’t a bad work taking the screenshot with your camera. Looks good too, if you ask me.
Greetings.
Thanks — the photos are much better than a lot of what I’ve seen around, but they took a fair amount of work (lighting control etc.) and still can’t match the direct VGA signal capture…
For a laptop, the Spider isn’t all that useful except for screenshots, but for a desktop it saves a heck of a lot of space (no monitor/keyboard/mouse) 🙂
Love the tutorial screenshot. That was my contribution to OS/2.
Cool! I always thought the OS/2 Warp tutorial was very slick.