How does HP-IL Emulation for HP-71X work?

HP-IL (Hewlett-Packard Interface Loop) is emulated via serial (RS-232) port of the HP-48GX and HP-49G calculators. Emulation via IR isn’t possible. In order to use HP-IL, the following items are needed:

(*) HP-IL enabled version of HP-71X,
(*) HPILROM LEX file with HP-IL emulation code,
(*) HP-IL server for Microsoft Windows 95/98/Me/NT/2000/XP/2003.

HP-IL enabled version of HP-71X is responsible for the lowest level of communication. HP-71X emulator communicates with the HP-IL server at the speed of 9600 bps. Obviously, this is slower than maximum speed between the real HP-71B calculator and HP-IL devices but fast enough for normal work.

Some other factors which are slowing down the communication speed are:

(*) HP-IL frame contains 11 bits and two bytes must be used for each frame,
(*) some kind of handshaking for the RS-232 interface must be implemented,
(*) HP-71X must emulate the I/O CPU of the HP-IL module.

But, with the use of various advanced transfer techniques, the speed of >800 bytes per seconds can be achieved which makes work with HP-IL server very fast and pleasant. Of course, loading the last file from disk with >1000 files could need some time to find the file but, once found, it will be transferred at the full speed. And, compared with the usual speed of Kermit wire transfer between HP-48GX/49G and PC, HP-IL emulation is much, much faster.

The 15360 bps speed could be used with HP-71X without problem but it is not supported under most operating systems (in fact, it is supported only with some older versions of Windows 95) so it has been abandoned.

Strictly speaking, this form of connection between HP-71X and the computer (technically) is not a “loop” at all because RS-232 is meant to connect two devices together directly. If all of loop functionality has to be implemented via RS-232 with frames bouncing forwards and backwards, the speed of communication would be very slow and the emulation would be useless. So, many things have to be done differently. The emulation appears as the real loop to the HP-71X but the communication protocol is very different.

HPILROM LEX file contains code for the high level of communication and, in fact, emulates the HP-IL I/O processor (Diamond) of the HP-82401A HP-IL module for HP-71B. Direct access to the hardware and I/O processor isn’t possible, of course. HPILROM routines accessed via JUMPER written by HP must be used instead. In order to save space, not all functionality of the I/O CPU is implemented. Some features, like self test, some SRQ and interrupt modes and similar things are left out because they haven’t any practical use in this implementation. Most of them aren’t used throughout the HP-71B firmware, anyway. But, if some feature will be needed in the future - it can be implemented with ease.

HP-IL server for Windows contains all HP-IL devices which are supported by the emulator.
Currently, the following devices are implemented:

Address 1: Display device (AID=#30, ID=”CON”)
Connection to the standard Windows character console (compatible with the the HP-82163 video interface) using DISPLAY IS command.
Codepage is MS DOS 437.

Address 2: Keyboard device (AID=#42, ID=”KBD”)
Connection to the external keyboard using KEYBOARD IS command.

Address 3: First disc device (AID=#10, ID=”FDD”)
Virtual disc device compatible with the HP-9114 disc drive.

Address 4: Printer device (AID=#2E, ID=”PRN”)
Connection to the Windows printers using PRINTER IS command.

Address 5: Parallel port device (AID=#4E, ID=”LPT”)
Connection to printers and another devices via the parallel PC port (output only).

Address 6: Serial port device (AID=#4E, ID=”COM”)
Connection to printers and another devices via the serial PC port.

Address 7: Second disc device (AID=#10, ID=”SDD”)
Virtual disc device compatible with the HP-9114 disc drive.

Address 8: Tape device (AID=#10, ID=”CAS”)
Virtual tape device compatible with the HP-82161A cassette drive.

Address 9: Input device (AID=#4E, ID=”INPUT”)
This device provides file input interface to the Windows file system.

Address 10: Output device (AID=#4E, ID=”OUTPUT”)
This device provides file output interface to the Windows file system.

All above addresses are default addresses after AAU. HP-71X is always adressed as the last device. Extended and multiple addresses are not used.

Console (1) and Printer (4) devices capture their output to the CONSOLE.TXT and PRINTER.TXT files. These files are cleared automatically on the first access after start of the HP-IL server or can be cleared by the Device Clear HP-IL command (CLEAR :CON or CLEAR :PRN).

Input device can be used to copy files from the Windows file system (disk drives) to the emulator. The default input file is INPUT.DAT in the HP-IL server directory. If you want another input file then initialize (open) it with CLEAR :INPUT, enter the filename into the HP-IL server (dialog box will be automatically opened on the server side) and use COPY or similar commands to copy the content from the file. Output device can be used to copy files from the emulator to the Windows file system. The default output file is OUTPUT.DAT in the HP-IL server directory. If you want another output file then initialize (create) it with CLEAR :OUTPUT, enter the filename into the HP-IL server and use COPY or similar commands to copy the content to the file.

All parameters of the HP-IL server can be changed via front panel. Furthermore, HP-IL message monitor can be activated for debugging purposes in cases when something went wrong and the communication must be inspected at the frame level. HP-IL monitor doesn’t monitor data messages. Remote control and sending data from server to the HP-71X is available as well (remote control will disable an active KEYBOARD IS assignment). HP-71X can service SRQ and DDC (DDL/DDT) interrupts. Other interrupt types don’t have any practical meaning in this implementation.

It is only possible to connect the controller (HP-71X on HP-48GX/49G) directly to the server on the PC. The server emulates an internal “loop” of devices inside itself. That’s what I am using them for: to connect HP-71X to external console on PC, to use printers connected to PC, to use virtual disk drives on PC, etc, etc. When I will need another peripheral, I could emulate it and add the appropriate device to the HP-IL server.

Communication with the real HP-IL devices through HP-IL card isn’t possible (and won’t be implemented) because this card doesn’t work in a new PCs with only PCI slots and it is only supported under MS DOS (or in a MS DOS box). HP-71X (as all my other emulators) are designed from start to use only existing and standard hardware such as HP-48GX and HP-49G calculators, PC computers, printers supported under Windows and other devices which can be connected to PC via parallel and serial ports. Honestly, I am not too much interested in supporting 20 year old equipment bought on eBay.

HP-71X extended output commands can be used with HP-IL emulation to some extent. Commands like DSPLCD, OUTLCD or PRTLCD can be combined with HP-IL command without problem while OUTIR, OUTLED, OUTRS, PRTIR, PRTLED and PRTRS could disable some HP-IL features which must be enabled again by restarting the emulator.

Installation guide for HP-71X version of HP-IL emulation is here.

Please, keep in mind that HP-IL emulation for HP-71X is not a free software.
It is a part of HP-71X and, if you want to buy one, you can find the necessary info here.
Demo version of HP-71X can be obtained at request.