The Compaq Portable III
Hardware
Where the Portable and Portable II have a fairly similar design, with a desktop-ish ISA motherboard in a big case with a little CRT, the Portable III makes some more radical changes:
- It's markedly smaller.
- Instead of the CRT, there's a 640x400 LCD.
- The motherboard is smaller and more specialised. There are no ISA slots, only two specialised connectors for daughterboards. One daughterboard handles video, the other supports an optional memory expansion and/or a modem.
- In addition to the usual sockets on the back (serial, parallel and monitor) there's also a connector for an expansion unit, which contains the ISA slots.
Video output
The video hardware is a superset of CGA, with a doubled vertical resolution (640x400 rather than 640x200), outputting on an amber LCD.
There is no font ROM. The font (8x8 or 8x16) is held in another bank of video RAM, and loaded by the BIOS at boot time.
Some I/O ports used by the video hardware are:
13C6h [r/w] Bits 0-2: Master mode. 0=CGA 1=EGA 3=MDA Other values unknown Bit 3: Active monitor. Set for internal, reset for external. When an external monitor is in use, the font is assumed to be 8x8; otherwise, it is 8x16. Bit 6: If, when read, this is 0, then the Compaq extended video functions (INT 10h / AX = 0BFh) are available. 17C6h [read] Video hardware capabilities. As described in the Interrupt List: Bit 0: 0 if CGA supported, else 1. Bits 1-2: Reserved (1) Bit 3: 0 if MDA supported, else 1. Bit 4: 0 if BitBlt engine supported, else 1. Bit 5: 0 if 132-column mode is available, else 1. Bit 6: 0 if 640x480x256 mode is available, else 1. Bit 7: 0 if 8-bit DAC is available, else 1. On my system, this returns 0E6h -- ie, CGA, MDA and BitBlt engine. 1BC6h [read] Bits 0-3: External monitor type Bits 4-7: Internal monitor type 0=> none 1=> dual-mode monitor 2=> CGA 640x200 3=> Compaq Color monitor 4=> 640x400 flat panel (INT 10h/AX=BF03h describes other possible values, but these are VGA types not supported by the Portable). 23C6h [r/w] Bit 0: Set for 400-line graphics mode. Reset for 200-line graphics mode or for text. Bit 3: Set to map the character generator RAM into memory where the video RAM would normally be (at B8000 or B0000). The main font is at offset 0, the alternate font at offset 1000h. Character cells are always 16 rows high; on an external CGA monitor, only the top 8 will be displayed. Bit 4: Active intensity bit interpretation (toggled by INT 10h with AX=1402h and BL=0B1h) Bits 5-7: LCD high intensity attribute is treated as: 0 => Ignore 1 => Reverse video 2 => Underscore 3 => Alternate font 4 => Half intensity 27C6h [r/w] Bits 0-5: Plasma timeout in minutes, 0-3Fh. Bits 6-7: Unknown. Always 0 when written; masked off when read.
Storage
The Portable has two drive bays. One, which is the width of a normal 5.25" bay but not as high, contains a slimline high-density 5.25" floppy drive. The other, which is a full-sized bay, contains a 3.5" ATA hard drive on a shock-absorbing mount. The design of the case would also permit a twin-floppy configuration.
The BIOS supports only predefined drive geometries; if you want to use anything else, you'll need to use a disk manager overlay. For reference, the geometries are:
Type | Cylinders | Heads | Sectors | Capacity | Landing zone | Write precompensation | Control byte |
---|---|---|---|---|---|---|---|
1 | 306 | 4 | 17 | 10.2 M | 305 | 128 | 0x00 |
2 | 615 | 4 | 17 | 20.4 M | 638 | 128 | 0x00 |
3 | 615 | 6 | 17 | 30.6 M | 615 | 128 | 0x00 |
4 | 1024 | 8 | 17 | 68.0 M | 1023 | 512 | 0x00 |
5 | 940 | 6 | 17 | 46.8 M | 939 | 512 | 0x00 |
6 | 697 | 5 | 17 | 28.9 M | 696 | 128 | 0x00 |
7 | 462 | 8 | 17 | 30.7 M | 511 | 256 | 0x00 |
8 | 925 | 5 | 17 | 38.4 M | 924 | 128 | 0x00 |
9 | 900 | 15 | 17 | 112.1 M | 899 | -1 | 0x08 |
10 | 980 | 5 | 17 | 40.7 M | 980 | -1 | 0x00 |
11 | 925 | 7 | 17 | 53.7 M | 924 | 128 | 0x00 |
12 | 925 | 9 | 17 | 69.1 M | 924 | 128 | 0x08 |
13 | 612 | 8 | 17 | 40.6 M | 611 | 256 | 0x00 |
14 | 980 | 4 | 17 | 32.5 M | 980 | 128 | 0x00 |
15 | 0 | 0 | 0 | 0.0 M | 0 | 0 | 0x00 |
16 | 612 | 4 | 17 | 20.3 M | 612 | 0 | 0x00 |
17 | 980 | 5 | 17 | 40.7 M | 980 | 128 | 0x00 |
18 | 966 | 6 | 17 | 48.1 M | 966 | 128 | 0x00 |
19 | 1023 | 8 | 17 | 67.9 M | 1023 | -1 | 0x00 |
20 | 733 | 5 | 17 | 30.4 M | 732 | 256 | 0x00 |
21 | 733 | 7 | 17 | 42.6 M | 732 | 256 | 0x00 |
22 | 805 | 6 | 17 | 40.1 M | 805 | -1 | 0x00 |
23 | 924 | 8 | 17 | 61.4 M | 924 | -1 | 0x00 |
24 | 966 | 14 | 17 | 112.3 M | 966 | -1 | 0x08 |
25 | 966 | 16 | 17 | 128.3 M | 966 | -1 | 0x08 |
26 | 1023 | 14 | 17 | 118.9 M | 1023 | -1 | 0x08 |
27 | 966 | 10 | 17 | 80.2 M | 966 | -1 | 0x08 |
28 | 748 | 16 | 17 | 99.3 M | 748 | -1 | 0x08 |
29 | 805 | 6 | 26 | 61.3 M | 805 | -1 | 0x00 |
30 | 615 | 4 | 25 | 30.0 M | 615 | 128 | 0x00 |
31 | 615 | 8 | 25 | 60.1 M | 615 | 128 | 0x00 |
32 | 905 | 9 | 25 | 99.4 M | 905 | 128 | 0x08 |
33 | 748 | 8 | 34 | 99.3 M | 748 | -1 | 0x00 |
34 | 966 | 7 | 34 | 112.3 M | 966 | -1 | 0x00 |
35 | 966 | 8 | 34 | 128.3 M | 966 | -1 | 0x00 |
36 | 966 | 9 | 34 | 144.3 M | 966 | -1 | 0x08 |
37 | 966 | 5 | 34 | 80.2 M | 966 | -1 | 0x00 |
38 | 611 | 16 | 63 | 300.7 M | 611 | -1 | 0x08 |
39 | 1023 | 11 | 33 | 181.3 M | 1023 | -1 | 0x08 |
40 | 1023 | 15 | 34 | 254.8 M | 1023 | -1 | 0x08 |
41 | 1023 | 15 | 33 | 247.3 M | 1023 | -1 | 0x08 |
42 | 1023 | 16 | 63 | 503.5 M | 1023 | -1 | 0x08 |
43 | 805 | 4 | 26 | 40.9 M | 805 | -1 | 0x00 |
44 | 805 | 2 | 26 | 20.4 M | 805 | -1 | 0x00 |
45 | 748 | 8 | 33 | 96.4 M | 748 | -1 | 0x00 |
46 | 748 | 6 | 33 | 72.3 M | 748 | -1 | 0x00 |
47 | 966 | 5 | 25 | 59.0 M | 966 | 128 | 0x00 |
Keyboard
The keyboard controller (part number 106436-001) is probably the same one used in the Portable II. It supports all the functions of IBM's AT keyboard controller, plus a few of its own, mainly to set the processor speed.
XT keyboard compatibility
The original IBM AT keyboard controller has a backward-compatible mode where it supports an XT keyboard. This has to be selected manually. There are then three modes it can operate in:
- AT keyboard, scancode translation from Set 3 to Set 1
- AT keyboard, no scancode translation (native Set 3 codes)
- XT keyboard, no scancode translation (native Set 1 codes)
The Compaq keyboard controller goes further, by auto-sensing the keyboard type. If an XT keyboard is connected but the IBM-compatible 'use XT protocol' option has not been selected, it will make the keyboard appear to be an AT keyboard, simulating responses to commands such as 'set LEDs' or 'set repeat rate'. Depending what keyboard is connected, it can operate in five modes:
- AT keyboard, scancode translation from Set 3 to Set 1
- AT keyboard, no scancode translation (native Set 3 codes)
- XT keyboard (selected manually), no scancode translation (native Set 1 codes)
- XT keyboard (simulating AT), no scancode translation (native Set 1 codes)
- XT keyboard (simulating AT), reverse scancode translation (translates from Set 1 to Set 3)
The difference between modes 3 and 4 is how the keyboard is presented to the PC. In mode 3, the PC knows it has an XT keyboard. In mode 4, the PC thinks it has an AT keyboard (unless it queries the real keyboard type with command 0A5h below).
Keyboard controller commands
For more details see table P0401 in the Interrupt List, file PORTS.A:- 0A1h
- Set 6MHz speed
- 0A2h
- Set 8MHz speed
- 0A3h
- Set 16MHz speed
- 0A4h
- Toggle CPU speed
- 0A5h
- Special read (get keyboard type and other values).
In the value returned:
Bit 5 set for XT keyboard, clear for AT. Bits 2,3 give CPU speed. Bits 2 and 3 set: 8 MHz Bit 2 set: 16 MHz Else: 6 MHz (if available; see below).
- 0A6h
- Set CPU speed limit. Followed by one byte giving the new limit (0 or 1).
On some motherboards(?), port 86h also seems to be involved in CPU speed switching. When read:
If bits 6 and 7 are set, CPU speed is 16MHz, slowing to 8MHz during floppy access. If bit 3 is set, 8MHz and 16MHz are available. clear, 6MHz, 8MHz and 16MHz are available.
When the CPU speed is being set, this port is used if the value read had bit 3 set. Various permuations of bits 5,6,7 are then used to select the speed.
Firmware
The Portable III has 32k of BIOS in two 16k chips.
- The Compaq ROM signature is a 6-byte string at F000:FFEAh: "COMPAQ". This is preceded by the product class signature at F000:FFE8h: "01".
- The BIOS on mine is dated 29 January 1987; it's revision K.
- As on the earlier Portables, the BIOS uses CTRL+ALT+< and CTRL+ALT+> to switch between internal and external monitors.
- The video registers table (pointed to by INT 1Dh) is still only 64 bytes long, and therefore contains only the 6845 registers. The other bits of the table (video buffer sizes, columns on screen, etc.) are stored elsewhere in the ROM.
- The Portable III no longer tries to launch BASICA.EXE when the ROM BASIC interrupt (INT 18h) is reached. Instead, it just displays the standard "Non-System Disk or Disk error" message, waits for a keypress, and reboots.
- The CPU speed is set using INT 16h calls with AH=0F0h to 0F4h. See the Interrupt List for more details. The keystroke CTRL+ALT+backslash (on a UK keyboard, CTRL+ALT+hash) also toggles the turbo mode.
- CTRL+ALT+minus, as on the Portable II, switches between MDA-compatible and CGA-compatible attributes in the 24x80 text modes (the hardware also supports this in the 24x40 text modes, but the BIOS doesn't).
- The following extended Compaq video BIOS functions are
suported on INT 10h:
- 0BF00h / 0BF01h
- Select external / internal monitor
- 0BF02h
- Set master mode of current controller
- 0BF03h
- Get environment
- 0BF04h
- Set mode switch delay (uses BL not BH)
- 0BF05h
- Enable/disable display (uses BL not BH)
John Elliott 16 May 2009.