Code Repo    |     RSS
MD's Technical Sharing



Thursday, September 29, 2011

Compaq Contura 3/25C 80386 Laptop

I recently picked up a free Compaq Contura 3/25c, a very old IBM-compatible laptop computer from the early 1990s, with a 25MHz 80386 processor, 4MB onboard memory and 3.5in 1.44MB floppy drive. The original 120MB hard drive has been removed by the previous owner. The laptop is also in very bad shape, with dust all over the place and the LCD panel removed:


The laptop must have looked like this when new with the 8.4 inch black and white LCD:


I was trying to make it boot up by connecting an external monitor to the VGA port when I noticed that the VGA port is actually keyed via pin #9. No modern VGA cable would fit into this port until you break pin #9 on the cable or punch a hole on pin #9 of the port. Since there is actually no need to key a VGA DB9 connector because the shape of the port would prevent you from inserting it upside down anyway, later VGA ports used pin #9 as an optional +5V DC source.

CMOS Battery

The unit boots up with a "RTC Lost Power" error message (see this for a full list of Compaq POST error messages). This is quite common with old laptop when the CMOS battery finally dies after a few years. So I opened it up in order to replace the battery:


The laptop is using a CR2430 lithium coin battery placed in a socket to facilitate replacement. There is even a warning, in various languages, telling you about danger of explosion if the battery is incorrectly replaced. This surprised me, since modern laptops would probably just have the battery soldered onboard. Some may feature a motherboard socket for the battery connector, but the actual connections to the battery are permanently soldered, which means some wire-cutting and soldering needs to be done if the battery ever needs to be replaced. This is a CMOS battery from a newer laptop:

I quickly ordered a pack of 5 CR2430 cells for a cheap price from eBay. Notice the funny English on the packaging. Whoever typed this probably had no ideas what it means:


BIOS Setup

With the CMOS battery replaced and a PS2 keyboard connected, I started the machine. Although many old laptops and PCs do not have an onboard BIOS and require the use of startup disks containing the BIOS utilities to change system settings, this machine has one, available in several languages, accessible via F10 at startup:

There are 2 startup disks for this laptop, formerly downloadable from Compaq website:
  • Disk 1: BIOS setup utility
  • Disk 2: Diagnostic utility
However, these downloads were removed when Compaq was merged with HP in 2003 and a lot of legacy support was gone. Although I eventually managed to find the disks with the help of archive.org, disk 1 comes with no COMMAND.COM and boots up to a DOS error "Bad or Missing Command Interpreter" error message. I fixed the error by putting MS-DOS 6.22 on it. The images for both disks as well as the original tool to create the disks (SP2054.exe) can be downloaded here. You will need WinImage to write the images to floppy disks.

Unlike the motherboard SETUP, the SETUP utility on the disks uses graphic mode and takes a long time to start up:


Installing the hard drive

Since the original hard disk has been removed, my next task is to install a 2.5inch IDE hard drive before the notebook can be used for anything useful. Keeping in mind that laptops of this generation only use CHS addressing and do not support hard drive more than 512MB due to the 1,024 cylinders limitation, I have chosen a 270MB IBM DHAA-2270 hard drive:

Still, installing the hard drive turns out to be no easy tasks as the BIOS only supports a limited number of hard drives types (which does not include my drive). There is also no support for auto detection or user-defined types:

Interestingly, types 65 and 66 are empty, indicating that they are custom types and can be configured by either re-programming the BIOS as suggested in this forum discussion, or by writing a tool that modifies the BIOS hard disk type table stored in memory and hope that the BIOS will recognize the changes. Either way, it's a shoot in the dark as I could find no instructions on flashing this laptop's BIOS, and there is also no documented address where I can hope to find the type table.

However, there is an easier way by using a drive overlay such as ANYDRIVE or EZ-Drive. The trick is to specify a hard disk type in BIOS where the number of cylinders, heads and sectors is smaller than the actual value so that the BIOS will not report an error on POST and accept the hard disk. Once then, boot from a floppy disks with ANYDRIVE to set up the disk overlay, which will overwrite BIOS Int 13h (which is used by DOS to query hard drive info) and respond with the correct disk geometry values. Run FDISK to setup the hard disk and you will be able to use the full capacity.

This will work with DOS and Windows 3.1 or older which relies on Int 13h to access the hard disk. Operating systems such as Linux and some disk utilities may query the hard disk directly, resulting in possible data loss with the overlay installed. In Windows 3.1, 32-bit disk access must be turned off, otherwise Windows may also query the hard disk directly, resulting in similar problems.

Transferring files using Norton Commander

With the overlay installed, all existing data on the disk is lost and some PCs may also fail to recognize the drive. Since I do not want to copy data and programs to the laptop using floppy disks, the only other way is to use a serial or parallel cable, with the help of Norton Commander 5.0 Link utility.

Note that you cannot simply use a male-to-male serial or parallel cable, but rather a null modem or a Laplink cable respectively. Since these cables are extremely over priced, I decided to go for soldering a null modem cable myself using the connectors available in my junkbox, and the pinout from here. With my other PCs running Norton Commander (NC) from within Windows 98 acting as Master, I am able to copy the data to this laptop (acting as Slave). At a maximum theoretical speed of 115200bps, made slower by the noise-sensitive cable disrupting the copy process resulting in several misleading errors "There is not enough room to copy..." from NC, it took half a day to copy DOS programs, games and Windows 3.1 to the laptop.

However, before I could think of some useful purposes for this laptop, it dies and fails to POST with no beeps and no display output. On every boot, the system simply hung after attempting to seek the floppy drive. There were perhaps several symptoms that the laptop was dying, for example the fact that I needed to press the POWER button multiple times (although the button itself is fine, as checked by a multimeter) to turn the laptop on and the wrong memory count of 21885KBytes extended memory in BIOS:


Since all basic troubleshooting does not seem to help and there are no user replaceable parts inside the motherboard, I eventually removed the hard disk and ran FDISK /MBR to remove the overlay, and toss the machine. Everything has its time, I guess.

UPDATE (Feb 2014)

A reader shared with me that he had a similar Compaq Contura laptop whose LCD had failed and displayed random patterns upon being turned on, although it still seemed to boot properly as the POST beep could be heard. After several debugging attempts, he finally managed to fix the issue and the laptop could boot to Windows 3.1 successfully. The LCD failure was due to a broken PCB trace resulting from an electrolytic capacitor leak (see the comments section of this article for further details).

The complete set of photos and videos demonstrating the disassembly, the failure mechanism of the LCD as well as several Windows 3.1 screens once the LCD has been fixed can be viewed here.

Thanks to Fabio for his sharing! I am sure this will help other people who are trying to keep their Contura laptops and other similar vintage computers alive.
Read More »

Monday, September 19, 2011

Blogspot bug: Google+ Share button and Google Friend Connect widget

Recently I observed that the Google Friend Connect widget that shows my site's followers on the left panel sometimes cannot be displayed. Refreshing the page did not help; clearing cookies and browser cache could only make it appear momentarily - the widget would disappear again eventually.

Firefox's error console (accessible via Tools>Error Console or Ctrl-Shift-J) and this post provide some hint:

The error messages are:

Error: window.googleapisv0 is undefined
Source File: https://apis.google.com/js/plusone.js
Line: 12

Error: google.friendconnect.container is undefined

The .js file used for Google "+1" button displayed at the end of every post is possibly conflicting with the js file for the Followers widget. As the both script files are obfuscated, it is not worthwhile for me to spend time investigating where the problem is. I ended up disabling the Share bar after every post by opening the Design tab of my blog settings, clicking Edit button at the bottom of the Blog Posts element, and unchecking Show Share Buttons


This would disable the entire set of share buttons even though I know I only need to disable the Google+ button. As there seems to be no way to show/hide each button individually, the only way to show only specific Share buttons (for example, share via Facebook) is to modify the page template and manually add in the code for the button.

Once you have manually modified the page template, always use the Edit HTML tab, and not the Page Elements tab to change the blog layout. Otherwise your changes may be lost and there may also be other unexpected results.

This is too much trouble, so the set of Share buttons at the end of every post in my blog will be disabled until this bug is fixed...
Read More »