Vintage PC pages
Home -> Vintage PCs -> Compaq Portable / Deskpro

The Compaq Portable and Deskpro

I'm only doing one page to cover both these machines, because Compaq's original Portable and Deskpro are very similar. Of the two, the Portable is the earlier machine, being Compaq's original product.

Hardware

The hardware of both systems behaves - just as you'd expect - very much like an IBM XT. There are a few physical differences, though:

Video output

I describe two versions of the video card here. The one that was fitted to the Portable is the earlier one (Assembly no. 000007) and the one that was in the Deskpro is later (Assembly no. 000031). According to the service manual the design went through several more iterations: Assembly nos. 000160, 000345 and 000525.

Video output is the major difference between a Compaq (either sort) and the original IBM. The cleverness is partly in the video card, and partly in the ROM BIOS.

At the time the Compaq Portable was released, IBM users had the choice of MDA or CGA video. MDA has a single high-quality 80×25 text mode with 9×14 character bitmaps, while CGA has grainier 80×25 and 40×25 text modes (with 8×8 character bitmaps) and 640×200 or 320×200 graphics. The matching IBM monitors are single-frequency, so an MDA display can't display a CGA signal or vice versa.

The trick that the Compaq computers play is that the Portable's built-in display, and the Deskpro's mono monitor, can display either type of signal. Therefore the CGA's graphics modes and its 40×25 text appear as usual (albeit in greenscale rather than colour) but its 80×25 text mode is replaced by the higher-resolution MDA version.

This is all very well, if you're using a Compaq monitor that can change scan rates like this. If you're not, there are various provisions:

  1. If the video card in the Portable is in the high-resolution mode, it does not send any signal to the external monitor socket. That way, an external monitor won't be damaged trying to display signals it can't cope with.
  2. By default the card in the Deskpro doesn't do this, because the Deskpro monitor connects to the external socket and needs the high- resolution signals. However, the original behaviour can be reinstated by changing a couple of jumpers, so the same card can be used in the Portable.
  3. The Deskpro can also be set to use a CGA monitor rather than a Compaq one. This is done by turning motherboard DIP switch SW6 on: if so, the CGA 80×25 mode is used rather than the high-resolution one.
  4. It's possible to switch between the high-resolution 80×25 mode and the standard CGA one by using key combinations. CTRL + ALT + < selects the CGA-compatible mode, while CTRL + ALT + > selects the high-resolution version. This is the only way to get the Portable to display 80×25 output on an external CGA monitor.

The method used by the card to detect what resolution to use is very simple: if the CRTC character height register is 13 (ie, characters are 14 rows) then it goes into the high resolution mode. If not, it behaves like a normal CGA.

The card in the Deskpro has an extra feature: It can be made to display text attributes like an MDA does (ie, you only get bright and underlined) rather than in 15 shades of green. This feature only applies in the high-resolution mode, and it's selected by setting bit 7 of the CGA control register (port 03D8h).

Turbo / Power LED

The Deskpro has a turbo mode, which is controlled by I/O port 0CFh. The BIOS writes 0 for slow (4.77MHz), 1 for fast (8MHz). The power LED indicates which speed is in use: red for slow, green for fast.

The status of this setting can be read from the bottom bit of port 62h (1=fast, 0=slow).

The DIP switches

Compaq still have PDF files on their FTP site describing the DIP switch settings for both the Portable and the Deskpro. My Deskpro also has a sticker listing the switches, which doesn't quite match the PDF file. To summarise:

Switch | Portable              | Deskpro (PDF)         | Deskpro (sticker)
-------+-----------------------+-----------------------+---------------------
1      | Reserved (always off) | Reserved (always off) | Off: Normal
       |                       |                       | On:  Enhanced
       |                       |                       |
2      | ------------------------ Numeric coprocessor ----------------------
       | Off: 8087 installed   | Off: 8087 installed   | Off: 8087 installed
       | On:  No 8087          | On:  No 8087          | On:  No 8087
       |                       |                       |
3,4    | --------------------------- Memory size ---------------------------
       | Reserved (always off) | Both on:      640k    | Both on:      640k
       |                       | 4 on,  3 off: 512k    | 4 on,  3 off: 512k
       |                       | 4 off, 3 on:  128k    | 4 off, 3 on:  128k
       |                       | Both off:     256k    | Both off:     256k 
       |                       |                       |
5,6    | ------------------------ Initial video mode -----------------------
       | Both on:      EGA     | Both on:      EGA     | 5 on:  CGA 24x80 
       | 6 on,  5 off: CGA 40  | 6 on,  5 off: CGA 40  | 5 off: MDA 24x80
       | 6 off, 5 on:  CGA 80  | 6 off, 5 on:  CGA 80  | 6 on:  IBM monitor
       | Both off:     MDA     | Both off:     MDA     | 6 off: Compaq monitor
       |                       |                       |
7,8    | ------------------------ Floppy drive count -----------------------
       | Both on:      1       | Both on:      1       | 7 on:  1 
       | 8 on,  7 off: 2       | 8 on,  7 off: 2       | 7 off: 2
       | 8 off, 7 on:  3       | 8 off, 7 on:  3       | 8 is "always on"
       | Both off:     4       | Both off:     4       | 
-------+-----------------------+-----------------------+---------------------

The Portable has a second set of DIP switches (like the original IBM PC) to set the memory size. BIOS revisions C and later ignore these and detect the size automatically.

To expand on the differences between the two sets of switches for the Deskpro:

Firmware

The BIOS in these computers is very similar to what you'd find in an IBM PC or XT, as you'd expect. There are a few differences:

Floppy Tape Drive

My Deskpro originally had a floppy tape drive fitted. I haven't studied this device in detail. It's an Irwin Magnetics model 110, and its circuit board has a Z8 microcontroller with a 2732 ROM holding firmware.

Real Time Clock

The serial card in the Deskpro has a battery-backed real time clock. A custom CLOCK.SYS is provided to communicate with it. From the code, I would guess that the clock chip is an MM58167, mapped between ports 02C0h and 02DFh.

CLOCK.SYS detects the clock by checking that the top 7 bits of the value read from port 02D4h are zero [This is the 'status bit' register on an MM58167]. All values held in the clock are BCD, and get converted to and fro in reads and writes.

The MM58167 has 8 bytes of memory, which in the Compaq are used thus:

Register	Meaning
08		Status flag? If this is not either 0C0h or 0D0h it is set 
		to 0C0h. It also seems to be used by the leap year check. 
09		The month last time the clock was checked. If this is 
		greater than the current month then the year has rolled over
		(the MM58167 does not check for year rollover)
0A		Year (presumably minus 1980).
0B		Set to 0DEh when the status flag is reset.	

Software

CPQPATCH patches the BIOS of the Portable (revision C) so that it can boot from a hard drive controller that doesn't hook INT 19. Somewhat specialised, but there you go.


John Elliott 12 August 2008.