Vintage PC pages
Home -> Vintage PCs -> IBM 5271

The IBM 5271 (aka 3270 PC)

Overview

The IBM 5271 can be briefly described as a cross between an XT (model 5160) and a 3270 terminal. Indeed, the 5271 is also known as a "3270 PC".

The case, motherboard, hard and floppy drives, and power supply are all identical (or very similar) to the XT. A specialised keyboard and display replace the XT equivalents; to support them, some or all of the following cards will be present:

With all these cards in the machine, that can leave as few as three available ISA slots for the necessities such as hard/floppy drive controllers or extra RAM.

It is possible to convert a 5271 to a normal XT, by removing the specialised display and keyboard cards, and adding a normal display card.

Keyboard

Instead of a normal keyboard, the 5271 uses a 122-key keyboard with 24 function keys and various other 3270-specific keys. The keyboard plugs into a dongle, which in turn connects both to the keyboard socket and to the keyboard controller card.

The 5271 will work with a standard XT keyboard, but displays error 302 when booting; you have to press F1 to continue.

My 5271 is missing its original keyboard, but other sources suggest that the correct keyboard would have 122 keys, with 10 function keys on the left and 24 at the top.

The manual describes two different models of keyboard controller: one with an NMI button and serial port, and one without. Obviously, I've got one of the ones without. The manual also says that only the ones with an NMI button support the use of the 3270 cursor keys in PC programs, which implies that there are two versions of the keyboard controller ROM.

I/O ports, memory, interrupts

The keyboard appears to use I/O ports 01B0h to 01B7h. It can raise interrupts on IRQ2.

If the 3270 scancode 5 (SysRQ?) is received, port 0189h is read. The top bit is flipped and the value written back out again.

Ports include:

01B0h: Send keyboard controller command. This appears to be a bitmap,
      since all the commands are powers of 2. They include:
	00h: Normal operation. After this command, the 
	    keyboard status can be read from port 01B2h.
	02h: Reset keyboard?
	08h: Set XT keyboard clock. When the firmware simulates an
	    XT keypress, it writes the scancode to port 01B1h and
            then sends 08h followed by 00h to this port. 
	10h: Send a command to the keyboard (cf writing to port 60h
	    on an AT-class machine). Command bytes are written to
            port 01B1h; then 10h is sent to port 01B0h, and the 
	    keyboard status is read up to 80 times until bit 5 
	    goes high. If bit 5 doesn't go high, keyboard 
	    initialisation is deemed to have failed.
	     Commands sent during initialisation are:
            F5h: Probably the same as PS/2: Set defaults and disable keyboard
	    FCh: Presumably similar to the PS/2 keyboard's "set 
		some keys to generate make and break codes". This 
                is done for keys 9, 77h, 7Eh, 65h (CTRL, NumLock,
		 ScrollLock and Insert).
	    FAh: Like FCh (and unlike its counterpart on an AT 
		keyboard) this is followed by a list of keycodes.
                The keys it is applied to are the numeric keypad
                keys, the function keys, and DEL.
	    F4h: Probably the same as PS/2: Enable keyboard
	20h: Read scancode from keyboard. The scancode can then be
	    read from port 01B2h.
	40h: Used in initialisation. 24h is written to the XT 
            scancode port (01B1h). Then the keyboard status is
            read until bits 6 and 7 go high; at which time 
	    bits 1,3,4 and 5 must also be high.
	80h: Used to acknowledge a keystroke? In the IRQ2 handler,
            the keyboard status is read. If the low bit is 1, then
            80h is written to port 01B0h, followed by 0.

01B1h: Output XT scancodes to this port to send them into the normal
      keyboard connector. After sending a scancode, send 08h and then
      00h to port 01B0h.

01B2h: Data register. Value read depends on last value written to port 
	01B0h. 

01B4h-01B7h: The registers belonging to the 8254 timer on this board.
       They get initialised to preset values at startup, and are not 
       subsequently changed.
	  Counter 0 generates a square wave with period 4; counters 
       1 and 2 are set up in software triggered mode with time values of 
       0DF8h.

The following variables are used in the BIOS data segment:

0040:0018: Bit 0 is 1 if the standard keymap is in use, 0 if a custom
	  keymap has been loaded by INT 52h. It's possible to load two 
          custom keymaps by loading the first, setting this bit, and then
	  loading the second. Note that on AT and later computers, this bit
          is set if the left ALT key is down.

0040:00D2: Segment of current scancode translation table.
0040:00D4: Segment of alternative scancode translation table. Loading a 
	   custom map with INT 52h sets this to the previous default table.
           Using CTRL+ALT+F1 or CTRL+ALT+F2 to select keymaps swaps the two
	   table pointers over if necessary.
0040:00D6: Last translated (XT) scancode.
0040:00EC: Last 3270 scancode received.
0040:00EF: Keyboard POST status.

Scancode translation

The native scancodes returned by the 3270 keyboard are translated to PC-compatible scancodes using a translation table. By default this is at 0CAA60h, but the address can be set using INT 52h, with AH=1 and DX=segment of new table.

The scancodes returned by the 3270 keyboard go up to 84h. Key releases are signalled by 0F0h followed by the keypress scancode.

INT 52h with AH=1 is handled by the keyboard controller ROM. It is passed a segment address in DX - the address of a scancode translation table, with three bytes per 3270 keyboard scancode. The default table is at 0CAA60h. The 3 bytes for each key are:

Flags are:

0
Beep and ignore key
1
Simulate Shift up, scancode, Shift down.
2
Simulate Shift down, scancode, Shift up.
3
Simulate scancode only.
4
If scancode is 52h (Ins pressed), simulate a release immediately after the press. Otherwise behave as 3.
5
If numlock is on, behave as 2. Otherwise behave as 4.
6
If numlock is off, behave as 1. Otherwise behave as 4.
7
If Shift up and Numlock on, or Shift down and Numlock off, then behave as 3. Otherwise behave as 0.
8
If Ctrl and Alt are not both pressed, behave as 3. If key is F2 and the standard keymap is in use, then select custom keymap. If key is not F2 and a custom keymap is in use, select the standard keymap. Then behave as 3.
9
If shift down and Numlock off, behave as 1. If shift up and Numlock on, behave as 2. Otherwise behave as 0.
10-15
Do not use these - they will crash the PC.

The actual scancode mapping in the ROM is listed below. Note that it only returns scancodes for keys that are present on a real XT; the others just beep.

The scancodes seem to be allocated in a fairly consistent order (roughly, starting at the bottom left corner and working up). There's also a diagram of the 3270 PC keyboard at Scan Codes Demystified (the second diagram under the heading "The 122-key Host Connected Keyboard). Working from the diagram, the order, and the table, it's possible to guess what the scancodes of some of the extra keys are. I've added the guesses to the table, in italics. Please don't quote them as fact.

The native scancodes appear to be very similar to PS/2 Scancode Set 3. I've commented on those keys where the scancodes differ (or may differ) between the two; often this is because the key position is the same for both, but the actual markings on the key are different. There's also a little fiddle near the CR key, because on the 3270 PC it's 2 rows high, one column wide, and reverse-L shaped (like it is on 102-key PS/2 keyboards). I haven't noted all the keys that are present on a 3270 PC but not on a 101-key PS/2 keyboard; in general, they're the first ten and the function keys PF13-PF24.

(Wish I had a real 3270PC keyboard and dongle, so I could test these keystrokes myself).

3270 scancode3270 keyUnshifted XT scancode Unshifted flagsShifted XT scancode Shifted flagsComments
00000000
01Print/*/Ident000000Could also be 84h
02ENL000000
03ChgSc/Jump/CrSel000000
04WS/Ctrl/ExSel000000
05Help/SysRQ000000 Scancode 5 being SysRQ would explain the special treatment for it in the ROM.
06Clear/Test000000
07PF13B (F1)83B (F1)8 Ctrl+Alt+PF1 selects standard keymap
08PF13000000 PS/2 set 3 has 08=ESC. The 3270 PC keyboard has no key where ESC would be in the PS/2 layout.
09CTRL1D (Ctrl)41D (Ctrl)4
0ACopy/Auto/Pause000000
0BErase EOF/Erinp000000
0CFinish/Attn000000
0DLeft TAB0F (Tab)30F (Tab)3
0E~ `29 (`)329 (`)3
0FPF23C (F2)83C (F2)8 Ctrl+Alt+PF2 selects custom keymap
10PF14000000
11Reset/Quit000000 PS/2 set 3 has 11=CTRL. (same position, different keycap).
12Left SHIFT2A (Shift)42A (Shift)4
13> <33 (,)234 (.)3
14CAPS LOCK3A (Caps Lock)43A (Caps Lock)4
15Q10 (Q)310 (Q)3
1612 (1)32 (1)3
17PF33D (F3)33D (F3)3
18PF15000000
19Left ALT38 (Alt)438 (Alt)4
1AZ2C (Z)32C (Z)3
1BS1F (S)31F (S)3
1CA1E (A)31E (A)3
1DW11 (W)311 (W)3
1E203 (2)303 (2)3
1FPF43E (F4)33E (F4)3
20PF16000000
21C2E (C)32E (C)3
22X2D (X)32D (X)3
23D20 (D)320 (D)3
24E12 (E)312 (E)3
25405 (4)305 (4)3
26304 (3)304 (3)3
27PF53F (F5)33F (F5)3
28PF17000000
29SPACE39 (Space)339 (Space)3
2AV2F (V)32F (V)3
2BF21 (F)321 (F)3
2CT14 (T)314 (T)3
2DR13 (R)313 (R)3
2E506 (5)306 (5)3
2FPF640 (F6)340 (F6)3
30PF18000000
31N31 (N)331 (N)3
32B30 (B)330 (B)3
33H23 (H)323 (H)3
34G22 (G)322 (G)3
35Y15 (Y)315 (Y)3
36607 (6)307 (6)3
37PF741 (F7)341 (F7)3
38PF19000000
39Right ALT38 (Alt)438 (Alt)4
3AM32 (M)332 (M)3
3BJ24 (J)324 (J)3
3CU16 (U)316 (U)3
3D708 (7)308 (7)3
3E809 (8)309 (8)3
3FPF842 (F8)342 (F8)3
40PF20000000
41, ,33 (,)333 (,)3
42K25 (K)325 (K)3
43I17 (I)317 (I)3
44O18 (O)318 (O)3
4500B (0)30B (0)3
4690A (9)30A (9)3
47PF943 (F9)343 (Tab)3
48PF21000000
49. .34 (.)334 (.)3
4A? /35 (/)335 (/)3
4BL26 (L)326 (L)3
4C; :27 (;)327 (;)3
4DP19 (P)319 (P)3
4E_ -0C (-)30C (-)3
4FPF1044 (F10)344 (F10)3
50PF22000000
51000000
52" '28 (')328 (')3
53} {1B (])31B (])3This key (immediately left of CR) does not exist in the 101-key PS/2 layout.

54! cent1A ([)31A ([)3
55+ =0D (=)30D (=)3
56PF11000000
57PF23000000PS/2 set 3 has 57 = PrtScr/SysRQ. The 3270 PC keyboard has no key where the PS/2 "PrtScr" would be.
58ENTER1C (Return)31C (Return)3
59Right SHIFT36 (Right Shift)436 (Right Shift)4
5ACR1C (Return)31C (Return)3
5B| \2B (\)32B (\)3 PS/2 set 3 has } ] at 5Bh (same position, different keycap)
5C000000 PS/2 set 3 has | \ at 5Ch; this would be the key above CR, but the 3270 PC keyboard has no such key since its CR key is 2 rows high.
5D000000
5EPF12000000
5FPF24000000PS/2 set 3 has 5F = Scroll Lock. The 3270 PC keyboard has no key where the PS/2 "Scroll lock" would be.
60Down50 (Down)550 (Down)6
61Left4B (Left)54B (Left)6
62Blank key between cursors000000 PS/2 set 3 has 62=Pause/Break. There is no key in the equivalent position on the 3270 PC keyboard.
63Up48 (Up)548 (Up)6
64BK TAB000000 PS/2 set 3 has 64=Delete (same position, different keycap)
65INS52 (Insert)552 (Insert)6 PS/2 set 3 has 65=End (same position, different keycap)
66BACK SPACE0E (Backspace)30E (Backspace)3
67PA1000000 PS/2 set 3 has 67=Insert (same position, different keycap)
68000000
69Keypad 14F (Keypad 1)34F (Keypad 1)3
6ARight4D (Right)54D (Right)6
6BKeypad 44B (Keypad 4)34B (Keypad 4)3
6CKeypad 747 (Keypad 7)347 (Keypad 7)3
6DDEL53 (Del)353 (Del)3 PS/2 set 3 has 6D=PgDn (same position, different keycap)
6EPA2000000 PS/2 set 3 has 6E=Home (same position, different keycap)
6FPA3000000 PS/2 set 3 has 6F=PgUp (same position, different keycap)
70Keypad 052 (Keypad 0)452 (Keypad 0)3
71Keypad .53 (Keypad .)353 (Keypad .)3
72Keypad 250 (Keypad 2)350 (Keypad 2)3
73Keypad 54C (Keypad 5)34C (Keypad 5)3
74Keypad 64D (Keypad 6)34D (Keypad 6)3
75Keypad 848 (Keypad 8)348 (Keypad 8)3
76ESC01 (Esc)301 (Esc)3 PS/2 set 3 has 76=NumLock (same position, different keycap)
77NLK45 (Num Lock)345 (Num Lock)3 PS/2 set 3 has 77=Keypad / (same position, different keycap)
78000000
79ENT4E (Keypad +)34E (Keypad +)3
7AKeypad 351 (Keypad 3)351 (Keypad 3)3
7BKeypad -4A (Keypad -)34A (Keypad -)3No equivalent in PS/2 set 3
7CRight TAB0F (Tab)3000 PS/2 set 3 has 7C=Keypad + (same position, different keycap)
7DKeypad 949 (Keypad 9)349 (Keypad 9)3
7EScrLk46 (Scroll Lock)446 (Scroll Lock)4 PS/2 set 3 has 7E=Keypad * (same position, different keycap)
7F000000
80000000
81000000
82000000
83Print/*/Ident37 (Keypad *)437 (Keypad *)4 Print/*/Ident could also be 01h
84SPA39 (Space)339 (Space)3 PS/2 set 3 has 84=Keypad - (same position, different keycap)

Display

The Video Card(s)

The 5271 video hardware is composed of between one and three full-length ISA cards. If multiple cards are present, they are connected together using rigid connectors.

The three cards are:

Main card
Implements 25x80 text mode, and provides video output.
All Points Addressable option
Implements CGA graphics modes, plus two modes unique to the 5271.
Programmed Symbols option
Allows a user-defined character set to be loaded (only used by 3270 terminal emulator software).


The video switches on the motherboard need to be configured as EGA/VGA rather than MDA or CGA. Depending on what hardware is present, the video BIOS will adjust the settings to behave as MDA or CGA. For some reason the video BIOS is (a) located in the ROM on the keyboard controller card; and (b) mapped into memory in two different places - one from 0C0000h to 0C07FFh, which does the video self-test, and another from 0CA000h to 0CA9FFh, which handles mode changes, the display configuration table, and the keyboard.

The video card behaves rather like a 3270 terminal screen "in front of" a CGA (or MDA) screen. At startup, the 3270 screen is transparent and can't be seen; a terminal emulator program would make it visible.

I don't have a complete pinout for the monitor socket. It's DE9, with at least the following pin assignments:

Pin 3: No connection
Pins 6,7,8: On a colour monitor these are the three colour signals; I'm
            not sure what order they're in.  
            On a mono monitor, pin 6 is intensity (probably blue),
            pin 7 is video (probably red), and pin 8 is horizontal
            sync.
Pin 9:      On a mono monitor, pin 9 is vertical sync.

Memory and I/O ports

A0000-A1FFF: 3270 framebuffer

From 0A0000h to 0A1FFFh is the 3270's frame buffer. This appears to have 4 bytes per character cell:

AE000-AFFFF: Programmed symbols memory

If bit 3 of port 0188h is set, the initialisation code will test 8k of memory from AE000h to AFFFFh. This holds the RAM font for programmed symbols (see above). The shape data for each character is 16 little-endian words long, with bits 15-7 of the word giving the character shape; bits 6-0 are always zero and cannot be written. The PSS board can hold up to 7 fonts (according to its packaging); port 0195h is used to select which one is visible here.

B0000-B7FFF: MDA framebuffer

This is actually mapped to the same memory as the CGA framebuffer; changes to one will affect the other. The buffer is 4k in size, so it repeats at B1000h, B2000h and so on.

B8000-BFFFF: CGA and APA memory

The main video card actually only has 8k of memory on it - 4k for the 3270 display, and 4k for the MDA/CGA display. So the CGA display RAM repeats at B9000h, BA000h etc (in text modes; the APA board takes over in graphics modes). This means that applications that try to use multiple CGA pages won't get on too well.

If bit 2 of port 0188h is set, the initialisation code will test 32k of memory from 0B8000h to 0BFFFFh. Otherwise it just tests from 0B8000h to 0BBFFFh.

I/O Ports

The I/O ports used by the video card include:

0180h: Writes to this port seem to be used to provide extra parameters 
       after a write to port 0181h.
0181h: Appears to be used for a variety of purposes. Values written include:
        00h: Sent at start of initialisation sequence (4 times)
	16h: Set cursor shape. The shape is written to port 0180h; the low 
	     nibble is the bottom cursor row, and the high nibble is the top
	     row. Shapes used by the BIOS are 0Dh (block), 0DDh (line) and 
	     0FDh (none) but others work as well.
        17h: Used in initialisation sequence; followed by OUT 0180h, 0ACh.
        1Ah: Used in initialisation sequence.
        2Ch: Sent at start of initialisation sequence, after four zero bytes.
             Followed by 11 writes to port 0180h:
                Mono:   68 18 28 40 98 4F DD 8C 00 F0 FF
                Colour: 68 1E 21 07 98 4F DD 8C 00 F0 FF
             Also sent during self-test, but not followed by any bytes.
        2Dh: Select 640x200 graphics mode.
        30h: Select 320x200 graphics mode.
        31h: Select 80x25 text mode.
        3Dh: Used in initialisation sequence.

0184h: Real cursor location low
0185h: Real cursor location low

0188h: Read-only register: Hardware status.
       Bit 7: Vertical retrace?
       Bit 6: Diagnostic readback, red. See 0189h below.
       Bit 5: Diagnostic readback, blue.
       Bit 4: Diagnostic readback, green.
       Bit 3: Set if Programmed Symbols board is present.
       Bit 2: Set if All Points Addressable board is present.
       Bit 1: Set if a monitor is present.
       Bit 0: Monitor type - 1=5272 colour, 0=MDA mono.

0189h: A read/write register. The self-test checks this by storing 0FFh and 0
      in it, and checking that it can read back both values.
       In normal use this register holds either 0C0h or 040h. The 
      other value that it gets set to is 20h, which is used during
      the self-test:
      * Write 20h to port 0189h.
      * Wait briefly; then check that specified bits of port 0188h are 0. 
      * Write a word value to an address.
      * Wait briefly; then check that specified bits of port 0188h are 1. 
      * Write 0C0h to port 0189h.

       My guess as to what is happening: Once 20h is written to port 0189h, 
      the three diagnostic bits go high - and stay high - if anything, 
      including the cursor, is drawn in the colour in question. So the test 
      first checks that blank video RAM causes nothing to be drawn, and then 
      that putting values there does cause something to be drawn.

       If the system has a mono monitor, only the 'red' and 'blue' output
      lines appear to be tested.

       
018Ch:   Set bit 6 of this port to enable interrupts on IRQ2, 
       triggered when a value is written to an emulated CGA register. Other
       bits are always written as 0.
         On read, bit 4 is set if interrupt was triggered by a write to the CGA 
       mode control register (port 03D8h); bit 5 if it was triggered by a
       write to the CGA cursor position (6845 registers 0Eh/0Fh) or cursor
       size (registers 0Ah/0Bh).

0195h: Used by PSS board. Bits 0-2 appear to be used to select different 
       banks of memory into the character set memory window at 0AE000h. 

0196h-019Bh: These registers appear to refer to the All Points Addressable
	     board, and are used to select the extra modes.
             Mode select for 720x350 or 360x350 mode is:

                 OUT 0196, 8
                 OUT 0197, 7Fh
                 OUT 0198, 82h
                 OUT 0198, 3Dh
                 OUT 019A, 2Ch

             For all other modes (text and CGA-compatible graphics), it is:

                 OUT 0196, 0
                 OUT 0197, BFh
                 OUT 0198, 7Ah
                 OUT 0198, 0Ch
                 OUT 019A, 27h

            The initialisation code sends:

                 OUT 0197, 0BFh
                 OUT 0196, 07h
                 OUT 019B, 3Ah
                 OUT 0198, 7Ah
                 OUT 0198, 0Ch                 
                 OUT 019B, 5Ah
                 OUT 0199, 2Ch
                 OUT 019B, 9Ah
                 OUT 019A, 27h

0197h: When read by the APA self-test, bit 7 must be 0.

03B4h/03B5h: At least some of the emulated CRTC. The IRQ2 handler reads
      registers 0Eh/0Fh (cursor location) and 0Ah/0Bh (cursor size); on a
      real MDA/CGA, the latter two cannot be read.

03D8h: CGA mode control register. Read/Write in the 3270 PC, because at least
      some CGA emulation is done by the firmware.

The Monitor

The monitor (model 5272) is bigger than a normal CGA or MDA monitor, and has a swivelling/tilting stand. It is capable of Hercules resolution (720x350) in 7 colours plus black.

A standard MDA monitor can also be used on a 5271. The graphics card detects whether the monitor is colour or mono, and restricts the available video modes accordingly.

The Fonts

The font used in the 5271 uses a 9x14 character cell, the same as the MDA. However the font has been changed from serif to sans-serif, and looks markedly better as a result. In addition, other characters than those in the range 192-223 make use of the 9th pixel column - for instance, the 'q' does.

IBM 5271 fontIBM MDA font
[3270 font] [MDA font]
The font used for the 3270 terminal framebuffer at 0A0000h uses a 3270 native encoding, which is similar to the "3270 CG" encoding desribed at x3270.bgp.nu, but diverges quite a bit in the last 64 characters.
[3270 terminal font]

The fonts are stored in two 8k ROMs on the display board. One ROM holds the left-hand 8 pixels of each character; the other just holds the ninth pixel.

Colours

In text mode, the 5271 behaves something like a CGA. However, there is no high intensity; 'high intensity' and 'standard' colours look exactly the same. The actual colours look quite different, too.

The following palette values are approximate. The 'normal' ones come from Linux DOSEMU; the '5271' ones from putting a VGA beside the 5271, and fiddling with the VGA palette until the two displays looked similar.

ColourIBM 5271 colourNormal colour
0#000000#000000
1#6080A8#0000a8
2#008000#00a800
3#60C0A8#00a8a8
4#A83000#a80000
5#C06080#a800a8
6#A08000#a85400
7#A0A080#a8a8a8

The table suggests that the 5271 uses 4 possible levels for each of the three primary colours (roughly, #30, #80, #A0 and #C0). I suspect that these colours are generated in the monitor, with the host PC sending simple on/off levels of Red/Green/Blue.

CGA Emulation and BIOS

Starting at the hardware level: The hardware of the CGA controller is not emulated completely, only enough to support a standard CGA BIOS. The CGA mode control register at 03D8h differs in the following respects:

In addition, most of the 6845 CRTC is not emulated; so it is not possible to select the 160x100 "graphics" mode by starting in 24x80 and reprogramming the CRTC.

Although the 5271's graphics card provides its own video BIOS, this does not replace the standard ROM BIOS. The ROM is still used for nearly all functions, the exceptions being function 00h (set mode) and 30h (locate configuration table).

Function 00h: Set mode
This does a little extra hardware setup, stores the correct aspect ratio for the selected mode, and then jumps to the ROM BIOS routine. It also supports two extra modes, numbers 30h (720x350 mono graphics) and 31h (360x350 4-colour graphics, using CGA palette).
Function 30h: Return 3270 PC configuration table
The table returned (CX:DX points to it) is similar to that described in the Interrupt List, but it is at most 6 bytes long, and possibly as few as two:
    00h: Aspect ratio X
    01h: Aspect ratio Y
    02h: Monitor type (0 => MDA or 5272). 
    03h: Always 0
    04h: Video adaptor type (0 => standard 5271, 1 => XGA, 2 => G/GX).
    05h: Always 0

The two extra graphics modes have a very simple memory layout - simply 350 lines of 90 bytes each, with no interleaving or funny tricks.

The following addresses in the BIOS data segment are used by the 5271 graphics card:

0040:00C8: Aspect ratio X (start of 3270PC configuration table)
0040:00C9: Aspect ratio Y
0040:00D8: BIOS INT 10h handler address.
0040:00EE: Result of self-test (bitmap). 0 if all tests passed; bits set 
           if one or more tests failed.

Error codes

3201
Graphics card fault
3202
Programmed Symbols card fault
3203
All Points Addressable card fault

Host Connect Card

There are two types of card supported by IBM's diagnostic program - an "older model long card adapter", and a newer one. The 5271's ROM only detects the older model; this has a 4k buffer at 0CE000h and uses I/O ports from 2D0h to 2D6h. The newer version adds a port at 2D7h (which seems to be used to set the base address of the buffer), increases the size of the buffer, and makes the I/O port base configurable (using switches on the card). A BIOS upgrade to support the new (shorter) cards may have existed.

Error codes

2801
Host Connect card initialisation failed

Related PCs

The 5271 was the first in a line of PCs with hardware support for 3270 terminal emulation. Information about later such PCs is extremely sketchy; but they include:

The Interrupt List gives the following display-card-and-monitor combinations:

Number Monitor type Possible models
05151 (mono) or 5272 (colour) Original 3270 PC or 3270 AT
13295 plasma display Unknown. This USENET posting describes a 3270 PC with a "3290 information panel" (a 19-inch plasma screen) which is probably the same thing.
25151 or 5272 with XGA Unknown
35279 with PC/G adaptor 3270 PC/G or 3270 AT/G
45379-C01 with PC/GX adaptor 3270 PC/GX or 3270 AT/GX. Possibly C stands for Colour and M stands for Mono.
55379-M01 with PC/GX adaptor 3270 PC/GX or 3270 AT/GX.

The reference to XGA may be incorrect; in the Interrupt List, it is marked "(???)". XGA is a VGA-compatible standard introduced in 1990, and I can't see it being compatible with MDA (or 5272) monitors, as the list appears to imply.

By the time of the PS/2 era, 102-key keyboards and VGA graphics meant that there was no need for specialised hardware, and later 3270 emulation appears to have been done with just software and a Host Connect card.

Web Links

Other 3270 PC sites

Diagnostics

Software

The hardware in other systems

Recently the motherboard in my 5271 failed with a blown capacitor, and while I had the PC dismantled pending repairs I experimented with putting the video card in a couple of other XTs to see what would happen. After a bit of fiddling, I was able to get it to work on both systems I tried: a Sinclair PC200, and an Amstrad PC3086. Based on this small sample size, here is my advice for using 5271 hardware on other systems:


John Elliott 8 April 2008