The HPDrive Project

Why and how

If you got a working vintage computer system like the HP 9845 you probably want use some mass storage as well. Since today most of the built-in tape drive systems fail (and because using those tape drives as storage - even if they do work - is not recommended anyway), another type of mass storage peripheral is needed.

If you own one, a floppy disk drive like the 9895A is certainly a good choice, of course in combination with the appropriate 98034A/B HP-IB interface. If you can't find a 9895A drive or any other mass storage in working condition, emulating a real vintage drive on a conventional PC is an attractive alternative. Since the 98034A interface is the only peripheral interface which is directly supported by the 9845 operating system (besides the 98041A disc interface), it is probably a good idea to build this emulator for use with an HP-IB connection. At the PC side, only a suitable IEEE488/GPIB interface card is needed, plus the emulator program itself.

HPDrive Setup

HPDrive Setup

Beyond replacing a vintage HP-IB mass storage drive, an emulator has some additional advantages:

Sure, an emulator will never really replace the feeling with a real vintage drive, reading real vintage floppies, making all that noise, and drawing lots of power. But it can be quite useful, especially if you don't own other mass storage in working condition.

So I decided to do all that work, scanning all the HP-IB commands which go forth and back between a 9845 host and the peripheral, checking out the manuals which describe higher level HP-IB based command sets like the AMIGO command set, finding out how to low level program those GPIB boards under modern operating systems and whatever was needed to get this task done.

The result was a mass storage emulator program: the HPDrive utility. HPDrive runs as a console application under Windows 9x, ME, NT, 2000, XP, Vista and even Windows 7. It now supports the AMIGO, the CS/80, and the SS/80 command sets, early semi-device-independent peripheral controls used over an underlaying HP-IB connection. Those protocols were quite popular at the time of the 9845s, and even the systems which followed the 9845s like the series 80 or series 200 systems mostly supported AMIGO based drives like the 9895A, the 82901 or the 9121. CS/80 and SS/80, which were successors of the AMGIO command set, are widely implemented, however since documentation of CS/80 and SS/80 hard drives in general doesn't include a description of certain drive side routines (so-called "utilities") and functionality is hard to guess, utilities - as far as they are used by host drivers - may or may not work.

HPDrive is by far not restricted to HP 9845 computers. Due to its generic design, it is now supporting many combinations of host systems and HP-IB drive emulations. However, since my personal focus is mostly on the HP 9845 series in combination with the emulation of the standard drives which are supported by this system, in general this is what is most thoroughly tested. But Series 80, 200, 300, 1000 and 64000 seem to work pretty well, too. Also many instruments which use HP-IB drives as mass storage. Even the Viper cards (HP's measuring coprocessor cards) are running with HPDrive.

Most delicate are so-called system boot loaders. They are responsible for loading an operating system from mass storage into R/W memory during the process of bootstrapping, and are usually part of the system firmware. Since the code had to fit into the system ROM, they never implement the full HP-IB standard and normally expect a certain timing behavior of the drive they are talking to. Sometimes here are the limitations of an emulator, since it does not exactly reproduce the special drive hardware, but rather tries to be a 'good' HP-IB device in general. Once the operating system is loaded, the integrated HP-IB mass storage drivers (as they are much more sophisticated than boot loaders) work perfectly with HPDrive, however in some rare cases boot loaders may fail with HPDrive in its standard configuration.

Also see another program, the HPDir utilitiy for accessing images plus real floppies and real vintage disc and tape drives from a PC in the HPDir Project section.

Background: The AMIGO Command Set

In 1978 HP released a new multi-user computing system called HP 300. Although technically ahead of time, it wasn't much successful. One of the design principles of the HP 300 was to utilize the HP-IB for peripheral communication. In order to standardize the operation of mass storage equipment, a special command set was defined, which could be used to initiate and control operations like formatting and initializing media, reading and writing data, doing status reporting, performing diagnostics and some others. The name of the HP 300 operating system was AMIGO, so the command set was named AMIGO command set.

The basic principle of the AMIGO command set was to implement high level commands by sending HP-IB commands and by sending and receiving data. In general, each AMIGO command consists of four steps:

  1. First the peripheral device is addressed as either listener or talker (depending if it was intended to write data to or to read data from a device).
  2. Next a secondary command is issued, indicating the command group (e.g. read data) the command belongs to. If there are more than one command in the command group, the specific command is identified by an extra byte, the operation code.
  3. If appropriate, a number of parameters can be issued or data from the peripheral device can be received.
  4. Finally the command sequence is completed by the HP-IB untalk or unlisten command.

Some operations need two commands for one complete operation, for example the device status is first requested with one command and then the data is acquired with a second command.

The AMIGO command set is closely bound to the HP-IB protocol. Some techniques used by the AMIGO directly utilize features of the HP-IB. So device identification is done by the so-called AMIGO identify, which is just an HP-IB untalk, followed by a secondary which carries the address of the target device, which then should send its two-byte identification code as reply. This AMIGO identify still causes a lot of problems, since on one side its non-standard use of the IEEE-488 bus irritates some of the IEEE-488 PC cards, and on the other side it prevents the 9845 from operating with peripheral devices which - although they understand the AMIGO command set - are rejected just because the 9845 strictly works only with specific known device IDs. Even worse, because of the non-standard nature of this command, the AMIGO identify is extremly hard to implement since it requires register level access. The current NEC µPD7210 implementation is based on using the HP-IB UNTALK command (31) as secondary board address, which is not possible on other GPIB controller chips like the TMS9914 or high-level APIs like NI 488.2.

Another example for an implementation very close to the HP-IB is the way the peripheral device holds off the host from sending commands too quickly (i.e. sending a command before the processing of the preceding command has not yet been finished). This hold-off mechanism is based on the HP-IB parallel poll feature. As long as a peripheral device is busy, it just deactivates its response to a parallel poll. So when sending a command to a peripheral device, the host should send parallel poll requests in short intervals until the poll is successful, just to be sure that the next command can be accepted. This mechanism is the reason why only primary addresses between 0 and 7 should be used for mass storage devices, since the parallel poll answering line is directly coupled with the address (address 0 uses line 7, address 1 uses line 6 etc.). It is obvious that such a polling mechanism is not as efficient as a request-reply scheme, but it works.

The AMIGO command set was implemented in the HP 9845 as well as in a couple of mass storage devices. As stated above, some of those devices are not supported by the HP 9845 just because the HP 9845 rejects their identification code (a limitation which was overcome by a special mass storage ROM from Structured Software Systems). Here are the devices which implement the AMIGO command set, and whether they are supported by the HP 9845 or not (note that there are combo and non-combo variants for most base types):

  Name Type Supported Base ID Units
  9895A 8" Floppy Disc HP1,SSS 9895A $0081 2
  82901M 5.25" Floppy Disc SSS 82901 $0104 2
  82902M 5.25" Floppy Disc SSS 82901 $0104 1
  9121D 3.5" Floppy Disc 2) SSS 9121 $0104 2
  9121S 3.5" Floppy Disc 2) SSS 9121 $0104 1
  9133A Hard Disc & 3.5" Floppy Disc Combo 1) SSS 9134A $0106 1+1
  9134A Hard Disc 1) SSS 9134A $0106 1
  9135A Hard Disc & 5.25" Floppy Disc Combo 1) SSS 9134A $0106 1+1
  9133V Hard Disc & 3.5" Floppy Disc Combo 1) 3) SSS 9134A $0106 1+1
  9133B Hard Disk & 3.5" Floppy Disc Combo SSS 9134B $010A 1+1
  9134B Hard Disc SSS 9134B $010A 1
  9133XV Hard Disc & 3.5" Floppy Disc Combo 3) SSS 9134XV $010F 1+1
  9134XV Hard Disc 3) SSS 9134XV $010F 1
  7910 Hard Disc HP2 7910 $0001 1
  7905 Hard Disc (Fixed & Removable) HP2 7905 $0002 2
  7906 Hard Disc (Fixed & Removable) HP2 7906 $0002 2
  7920 Hard Disc HP2 7920 $0002 1
  7925 Hard Disc HP2 7925 $0002 1

Notes:

Footnotes:

1) may be configured as 4-unit logical 9895A drive with 1.15 MB for each unit
2) physical media format is 3.5" SS/DD with 70 cylinders, identifies as 8290xM
3) floppy drive in combo emulates 3.5" (9121S) floppy disk drive (extended command set)

The AMIGO command set was later replaced by the CS/80 command set (CS is just an acronym for 'command set'). Main features of this new command set were a new device independent channel model, as well as support for tape storage and for device dependent subroutines. A special subset with a restricted number of commands and parameters just implementing the most common features was defined in order to simplify implementation especially for smaller mass storage devices. This subset was consequently named SS/80. The SS/80 protocol was used by smaller drives including the 9133D/H/L, the 9134D/H/L, the 9122D/S, the 9153A and the 9154A. The 9845 has some basic support for CS/80 drives, namely the 7908, 7911 and 7912 drives, which are supported by the Mass Storage ROM Rev. C and later. The largest drive storage supported by the 9845 is a CS/80 drive, too: the 7933/7935, which provides up to 3x404 Mbyte = 1.2 GByte (!) storage to the 9845.

There is no complete specification of the AMIGO command set available. However different description of the AMIGO command set can be found as part of several peripheral device manuals (e.g., the 9895A service manual, see hpmuseum.net for download). Note that not all AMIGO features are implemented by all peripheral devices.

Specification of the CS/80 command set can be found in the CS/80 Instruction Set Programming Manual which is available for download here. A specification for the SS/80 command set can be downloaded here.

Background: Implementation Challenges

Emulating an AMIGO or CS/80 mass storage device is not an easy task for several reasons.

The most severe problem lies in the implementation of the AMIGO identify command, which is used both with the original AMIGO and the CS/80/SS/80 command set. As already mentioned above, this command consists of an HP-IB UNTALK with a following secondary command holding the primary address of the drive, which is completely non-standard with respect to IEEE488. The reason why HP designers did chose this way of identification is not completely clear. As a matter of fact, it prevents many non-HP mass storage solutions to work together with HP computer systems. If a device doesn't respond to an AMIGO identify with the appropriate reply, HP's HP-IB system software will refuse further communication with the device. And it makes it impossible to use high-level interfaces for PC GPIB controller boards, since those high-level APIs generally implement the IEEE488 standard only. Also non-standard is the behavior of the AMIGO drives to abort their operations when being untalked or unlistened during an operation. Finally, the HP hosts, when talking to AMIGO drives, tend to assert the ATN line before the transfer has been completed, which gets lots of standard implementations into trouble.

The current NEC µPD7210 implementation therefore operates on register level and uses a special, NEC µPD7210 specific hack to get the AMIGO identify command working. However, since there is no way to implement the AMIGO identify on the other classic, the TI TMS9914, this chip probably will never be supported for HPDrive (although it works well with HPDir). Same applies to to NI488.2 standard API and many others. Simply said, GPIB chips based on the NEC µPD7210 industrial standard can be used for emulating HP-IB drives, and all others can't. Which still opens a large range of choices, including even state-of-the-art GPIB boards like NI's PCI-GPIB.

Anyway, the most complex task was to bring the HPDrive emulator on a PCI board. I chose National Instruments PCI-GPIB since it is some kind of industry standard for PCI based GPIB boards. But I could not avoid the need to implement a completely new driver for this PCI board (so-called "custom TNT4882/TNT5004 driver"), which gives access to all those GPIB device functionality which is implemented into the TNT4882C and the TNT5004 chips, but hidden behind the NI488.2 API.

Another difficult aspect is emulating the correct HP-IB hold-offs and timing. If the emulator doesn't behave exactly like the original device, communication with HP computer systems will result in a sequence of communication errors. What makes proper timing even harder to implement, is that the emulator should run on platforms with different performance classes. And the problem even gets worse with 'dumb' host GPIB drivers as often found in boot loaders, which use tight timeouts instead of proper protocol handshaking. However the timing resolution available under Windows within User Level is one millisecond, which is far too long for controlling proper HP-IB timing. And writing real GPIB drivers for several GPIB boards under Windows is beyond this project.

With respect to the problems mentioned above, the current implementations for the NEC µPD7210 and all of its descendants like the TNT4882C/TNT5004 seem quite stable.

The HPDrive Mass Storage Emulator

HPDrive implements allmost the full AMIGO and CS/80 command set, and can be configured to emulate nearly arbitrary drives by configuring common drive parameters like drive geometry, Identify response and so on. HPDrive has built-in support for the following floppy disc, hard disc and tape drives:

All AMIGO drives:

9895A, 8290xM, 9121D/S, 9134A, 9134B, 9134XV, 7910, 7905A, 7906, 7920, 7925, and combos (9133A/B/XV, 9135A)

CS/80, SS/80:

9122D/S, 9134D, 9134H, 9134L, 7908, 7911, 7912, 7914, 7941A, 7945A, 9144A, 7957B, 7958B, 7959B, and combos (9133D/H/L, 7942A, 7946A etc.)

Others, which are currently not supported (mostly due to unknown ID word) include:

9153A/B/C, 9154A/B, 7907A, 7957A, 7958A, 7959A

Run HPDrive with the -presets parameter to get a complete list of drives supported by a specific version. You even can specify your own drive configurations by adding appropriate entries to the HPDrive configuration file. See the Configuration section below for how to add your own drive.

Here are the most important drive parameters for the most common AMIGO drives as used with an HP 9845 system:

Drive 82901 9121 9895 9134A 9134B 9134XV 7910
ID $0104 $0104 $0081 $0106 $010A $010F $0001
Image Size (Bytes) 286,720 286,720 1,182,720 4,856,832 9,713,664 14,570,496 12,042,240
Phys. Cylinders 35 35 77 306 306 306 735
Phys. Heads 2 2 2 2 4 6 2
Phys. Sectors/Track 16 16 30 31 31 31 32
Phys. Records 1,120 1,120 4,620 18,972 37,944 56,916 47,040

An here are the most common CS/80 drives supported by the HP 9845:

Drive 7908 7911 7912
ID $0200 $0204 $0208
Image Size (Bytes) 16,576,000 28,606,464 66,748,416
Phys. Cylinders 370 (plus spares) 582 582
Phys. Heads 5 3 7
Phys. Sectors/Track 35 64 64
Phys. Records 64,750 111,744 260,736

Note: All drive parameters are shown as reported through the HP-IB interface, the actual physical media characteristics may differ (e.g. for the HP-IB interface, the 9121 emulates a 35-cylinder 2-head 82901 drive, but actually is a 70-cylinder single-head floppy disc drive).

In emulation of drives, HPDrive uses a so-called binary image file for storing the disc data. The format of those files is pretty generic, they just represent the records on the disc in ascending order (records are logic units comparable to the LBAs on modern disc drives and correspond to the physical sectors of a disc). Since in general most of the simulated disc space is empty, you can achieve high compression rates when archiving those images in ZIP files.

The size of the image files varies with the type of drive emulated. Due to the generic nature of the image format, it is in most cases possible to launch HPDrive with an image which was produced for another drive type (HPDrive will complain about a wrong image size, but will not refuse operation). The recommended way, however, is to use another utilitiy, the HPDir program in combination with the -convert action, to convert an image from one drive type into another. The images provided on this site in general have the right size for drive type 9895A. This also is the default for HPDrive, since the 9895A provides enough space for most applications, and probably is supported by most vintage HP host systems and therefore may be considered as the most 'compatible' drive ever produced by HP.

If you wonder why combo drives like the 9133 are not included in the above table, you simply have to consider combo drives as combination of two different drives from the table above. For example, the 9133 is a combination of a 9134 hard disc plus 9121 floppy. So for emulating the hard disc part of a 9133, simply use the 9134 emulation.

Just like real drives, media emulated by HPDrive are initially blank and have to be formated before use. Every operating system uses its own choice of file system, so the format may differ between the operating systems. In fact, formatting is not a matter of HPDrive (just like real drives it reads and writes disc or tape sectors without caring about the content).

However, due to differences in size, each emulated drive normally has its own directory data. Just as an example, here are the 9845 file system characteristics for some drives:

Drive 82901 9121 9895 9134A 9134B 9134XV 7910
Interleave Factor 7 7 7 7 7 7 1
Sectors per Track 16 16 30 31 31 31 32
Accessable Tracks 66 66 150 608 1,220 1,830 1,470
Accessable Records 1,056 1,056 4,500 18,848 37,820 56,730 47,040
System Start 0 0 0 0 0 0 0
Directory Start 1 1 1 1 1 1 1
Directory Size 8 8 22 92 123 123 143
Alloc Table Start 9 9 23 93 124 124 144
Alloc Table Size 7 7 7 62 62 62 48
Spare Dir Start 17 17 31 156 187 187 193
Spare Alloc Start 25 25 53 248 310 310 336
File Area Start 32 32 60 310 372 372 384
System Tracks 2 2 2 10 12 12 12
Data Tracks 64 64 148 598 1,208 1,818 1,458
Data Records 1,024 1,024 4,440 18,538 37,448 56,358 46,656
Max. Total Storage 270,336 270,336 1,152,000 4,825,088 9,681,920 14,522,880 12,042,240
Max. Data Storage 262,144 262,144 1,136,640 4,745,728 9,586,688 14,427,648 11,943,936
Max. Dir Entries 128 128 352 1,488 1,968 1,968 2,288
Spare Tracks 4 4 4 4 4 6 0

Note: all size and position information is denoted with reference to 256-byte-records, except the max. total and data storage, which refers to bytes.

As we can see, the mass storage support of the HP 9845 with HPDrive goes up to the scale of at least 15 MBytes (and to more than 300 MBytes with the CS/80 or SS/80 drives). Actually, the limitation of file names to six characters in combination with the absence of subdirectories makes it hard to use larger storages with an HP 9845 anyway. Even the LIF filesystem format with its 10 character wide filenames lacks subdirectories. I guess SDF (the structured directory format) was the first HP file system which had been designed for larger mass storage systems. However HPDrive doesn't care about file systems, it just simulates the drive hardware and firmware.

System Requirements

On the vintage host side, you of course need a working HP-IB interface (some systems like the HP 86B or the HP 9836 already have basic built-in HP-IB interfaces, others need an HP-IB interface as add-on, like the HP 9845 which needs a revised 98034A or 98034B HP-IB interface).

HPDrive should work under all 32-bit Windows versions (9x/ME/NT/2000/XP/Vista/Windows7).

HPDrive currently supports NEC µPD7210 compatible IEEE488/GPIB interface cards up to NI PCI-GPIB boards. This probably covers a large amount of existing cards, and at the same time keeps the choice open between a budget solution (almost all µPD7210-boards are ISA boards), and a high-performance 'professional' solution which works in modern PCs.

For IEEE488/GPIB boards currently supported see the following table:

API's and Chipsets Boards successfully tested with HPDrive Boards which should work with HPDrive but have not yet been tested Boards which are known NOT to work with HPDrive
NI 488.2 API     HPDrive doesn't work with this API
Custom TNT4882 Driver NI PCI-GPIB (large board with TNT4882C) NI PCI-GPIB (small board with TNT5004)
NI PCI-GPIB+ (board with analyzer option)
 
NEC µPD7210 NI GPIB-PCIIA (Assy No. 180100) All older PCII/PCIIA compatible boards (NI Assy No. 180xx)  
TI TMS9914     None of the boards with this chip will work with HPDrive
NAT4882 NI AT-GPIB, all newer PCII/IIA compatible boards (NI Assy No. 181xx)    
NI TNT4882C NI AT-GPIB/TNT (Assy No. 182xx)
NI AT-GPIB/TNT+ (board with analyzer option)
   

Note that due to different capabilities of those boards, hardware which doesn't work with HPDrive may work with HPDir and vice versa (see the HPDir section for details).

If you make your own experience with IEEE488/GPIB boards and HPDrive, please send me your reports with the contact feature, and I'll include your results in the above list.

HPDrive directly accesses the hardware registers, so be careful in using multiple instances of HPDrive on the same GPIB hardware or in using other drivers in parallel.

Special Note on HPDrive and the National Instruments NI 488.2 Driver Software:

National Instruments provides its own GPIB hardware driver software as part of the NI 488.2 driver package (current version number is 2.7). If using GPIB boards for the ISA bus, there should be no problem in having this software installed when working with HPDrive. In fact, the NI 488.2 driver interface will be listed as additional 'board' detected by HPDrive. However, since the NI488.2 interface won't provide the necessary functions for emulating HP-IB mass storage, this interface, although listed, can't be selected as option for HPDrive to work with (you'll get a "no compatible controller found' message). Instead, HPDrive talks directly to the real hardware, which will be detected as separate board. In order not to disturb emulation, HPDrive should be the only GPIB application running, so do not use any NI GPIB application when HPDrive is active.

The thing is different if you have a PCI based GPIB board installed, like the NI PCI-GPIB. Since HPDrive needs to have the custom GPIB driver installed, and sharing the PCI hardware with NI's standard NI 488.2 drivers is not possible, you have to remove NI's NI 488.2 driver before installing the custom GPIB driver. In turn, the custom GPIB driver will automatically be removed during the installation of NI's 488.2 driver software. As a conclusion, HPDrive in particular doesn't support the NI 488.2 API and the NI 488.2 driver cannot coexist with the custom TNT4882/TNT5004 driver on the same machine.

One Note about the Windows vs. Linux

Of course Linux is in general the first choice for a software like HPDrive, since Linux is a free and powerful run time environment, and, actually, is much easier to use for low level programming as it is required for HPDrive.

So why Windows? Simply because the development of HPDrive is relatively new and I originally started with MS-DOS (yes, truly) with MSC since I wanted usable results quickly. This gave me the opportunity to learn about the protocols and how to low level program the GPIB hardware (and some other resources like floppy controllers etc.) independent of the burden of non-realtime multitasking environments. Next step then was to transfer the development to Windows to test how the utilities can coexist with driver & software of GPIB hardware vendors, but using command line user interface, gcc and mostly Posix style programming with a later UNIX port in mind. By now the utilities have reached some degree of maturity, so that I can approach towards the next step porting it towards a true Posix environment for use under Linux. However emulating GPIB drives needs a couple of system features, which have to be validated under Linux (some are in fact easier to solve compared to Windows) before the final port can be done. So, Linux-fans, you got a perspective.

Driver Installation

HPDrive needs additional drivers to be installed in the following cases:
  1. If you are running HPDrive under Windows NT/2000/XP/Vista, AND you are using an ISA GPIB board (such as a NI GPIBII/IIA) with HPDrive, please install the DlPortIO driver package before use.
  2. If you are using HPDrive in combination with a TNT4882C or TNT5004 based PCI-GPIB board, please make sure the custom TNT4882/TNT5004 driver is installed.

In all other cases, HPDrive will run without any special drivers. There are no experiences with the DlPortIO driver under Windows7, however it will be unlikely that Windows7 can be installed on systems with ISA slots anyway.

Installing the Custom TNT4882/TNT5004 driver

The custom TNT4882/TNT5004 driver is part of the HPDrive distribution. Supported are Windows 2000, XP, Vista and Windows7. See the README in the custom TNT4882/TNT5004 driver package for detailed installation instructions.

Installing DLPortIO

The DlPortIO driver package (needed for ISA based GPIB boards under Windows NT/2000/XP/Vista) can be downloaded from http://www.driverlinx.com/DownLoad/DlPortIO.htm. Just execute the installer port95nt.exe and follow the instructions.

Getting Started

Usage of HPDrive is extremely simple, just execute

hpdrive -scan

within a console window from the directory where hpdrive.exe resides to make sure your IEEE488/GPIB interface board is supported by HPDrive. If no supported hardware is found and you are sure your interface board has at least a µPD7210 compatibility mode, consult your board's documentation how to configure it into the 7210 mode or how to chose the right I/O base address.

If using an ISA board, please please set the boards I/O base address as follows (these are the values used for autodetect):

Board Type I/O base address
NI PCIIA and compatibles (NEC µPD7210 or NAT4882)

02E1 (default)
22E1
42E1
62E1

NI PCII and compatibles (NEC µPD7210 or NAT4882) 02B8 (default)
NI AT-GPIB and compatibles (NAT4882) 02C0 (default)
NI AT-GPIB/TNT and compatibles (TNT4882) 02C0 (default)

If a different address is required, use the -port option for setting the I/O base address manually. The I/O base address can also be configured permanently in the configuration file (see next section).

Example:

hpdrive -scan -port 0x3e0

tests for compatible boards on base address 03E0.

Interrupt and DMA setting are of no relevance for the HPDrive program, however you should make sure both interrupt and DMA settings do not conflict with other hardware installed in your system.

Some boards like the NI PCII/PCIIA need to be configured into 7210 mode manually before use. For example, some PCII/PCIIA boards support both 7210 and 9914 mode, to configure those boards into 7210 mode, set switch #8 on the DIP-switch to the ON-position (=position 1). For other boards, consult the documentation delivered with those boards.

If your board offers the choice for operating as device or system controller, chose 'device' for using HPDrive (ability for acting as device is prerequisite for using HPDrive).

 

Sample Emulator Start

Sample Start of the HPDrive Emulator

If HPDrive has reported a compatible board, simply execute

hpdrive

without any parameters. HPDrive will ask for image files to be used as drive storage, create them if necessary, and then start emulating an HP 9895A floppy disc drive (this is the default). HPDrive normally operates silently and just reports if something didn't work as expected, however you can use the -d option to show drive activity (see options summary below).

Please note that newly created images are always unformatted (just like a factory new disc drive). Use the appropriate formatting command on your host system (e.g. INITIALIZE) or the HPDir utility to create a file system before you can create files, list directories etc.

You can get an overview about all emulated HP drive types with

hpdrive -presets

If you need to emulate other drives than a 9895A, simply use the desired drive preset as command line option, like

hpdrive -9122

for emulating an HP 9122 SS/80 floppy disc drive.

Configuration

HPDrive can be widely configured with a larger number of command line options (see the following section for details). If you need a permanent change in configuration, you can provide a configuration file hpdrive.ini to HPDrive. When invoked, HPDrive first looks for this configuration file in the current directory, and then in the directory where the hpdrive.exe executable resides. If found, the settings in this file are applied. Since precedence of command line options ist higher than those of the configuration file, config file settings can still be overwritten by using command line options.

The configuration file is also useful for emulating HP-IB mass storage for which there is no built-in support by simply adding your own drive definitions in this file. Adding AMIGO drives is the easier task, since HPDrive needs only the most common parameters like AMIGO Identify response and drive geometry. Adding SS/80 or CS/80 drives is a bit more complicated, because the whole describe record has to be specified. Supposed you own a real SS/80 or CS/80 drive which you like to emulate, you can connect the original drive to your PC's GPIB interface and use the HPDir utility in combination with the -info option to query the describe record, which you can then paste into HPDrive's configuration file.

Note that, if a configuration file is present, only the drives defined in this file are emulated, and all built-in drive information is disabled. So if there is a hpdrive.ini file, but no drives are defined in there, no drive types will be available for emulation. This is a point which will probably be changed in the future. Use hpdrive with the -presets option to get a list of the effectively emulated drives.

See the sample hpdrive.ini file provided with the HPDrive package for details on the configuration options available.

Configuring for the HP 64000
By J. David Bryan

HPDrive can emulate a bus disc for the HP 64000 logic development system. It has been tested in both AMIGO and CS/80 emulation modes.

No additional HP 64000 hardware is required for HPDrive operation.

The specific drives supported on the 64000 varied with the revision of the operating system and the firmware installed in the station. In general, the following HP drives were supported:

Firmware revision C must be installed in stations with serial prefixes 2125A and below to support the 7908/11/12/14 CS/80 drives, and revision D must be installed in stations with serial prefixes 2212A and below to support the 7941/45 CS/80 and 9134D/H SS/80 drives. Revision D was also required for internal floppy drive support, so if your station has floppies, then it should support CS/80 drives as well. Refer to the HP 64000 Logic Development System Selection and Configuration Guide for details.

For all drives except the 79XX MAC series, only one emulated drive is supported per host GPIB card. The 64000 operating system requires multiple bus drives to have different HP-IB addresses; HPDrive supports multiple drives as different unit numbers with the same HP-IB address. The MAC configuration supports from one to eight units per host card, although all emulated units must be the same drive type; mixing MAC drive types within the same HPDrive emulation is not supported.

The 64000 disc drivers have very tight timing requirements, so the -nosleep option is mandatory for correct HPDrive operation. In addition, logging is not recommended, as it may slow HPDrive down to the point that "Bus disc down" errors occur on the 64000 system. Concurrent host activity may also cause transient disc failures; generally, the 64000 will retry and recover automatically. HPDrive has been tested successfully with 400 MHz AMD K6 and Intel Pentium II host systems running Windows 2000; slower host hardware may not work.

Bus disc installation of the operating system and related software via floppy is supported. The emulated bus disc must be formatted with the 64000 System Disc Utility before installation, as described in the 64000 Installation and Configuration Reference Manual. An alternative is to copy an existing 64000 bus disc to a host PC image file using the HPDir utility and then to use that image file with HPDrive.

As an example, to emulate a 9134A drive at HP-IB address 0:

hpdrive -nosleep -9134A 9134A.hpi

To emulate three 7920 drives at HP-IB address 0:

hpdrive -nosleep -n 3 -7920 7920-unit-0.hpi 7920-unit-1.hpi 7920-unit-2.hpi

To emulate a 7914 drive at HP-IB address 1 (presuming the 64000 already has a bus disc at address 0):

hpdrive -nosleep -a 1 -7914 7914.hpi

Configuring for the HP 1000
By J. David Bryan

HPDrive can emulate a system or peripheral disc for the HP 1000 series of minicomputers. It has been tested on a 1000 M-Series running RTE-IVB and RTE-6/VM in both AMIGO and CS/80 emulation modes. It has not been tested on the 1000 A-Series.

The following HP 1000 hardware is required for HPDrive operation:

RTE-IVB and RTE-6/VM support ICD (AMIGO) drives via driver DVA32, and RTE-6/VM supports CS/80 drives via driver DVM33.

For AMIGO emulation, HPDrive must be configured as a 7906H, 7920H, or 7925H ICD drive. For CS/80 emulation, HPDrive may be configured as any supported CS/80 drive. RTE system generation configuration and the list of supported drives appears in the RTE-IVB System Manager's Manual and the RTE-6/VM System Manager's Reference Manual. Supported CS/80 drives that are not natively provided by HPDrive may be added to the hpdrive.ini configuration file.

While the 12821A card allows up to four connected drives, only one emulated drive is supported per host GPIB card. RTE requires multiple drives on the same interface to have different HP-IB addresses, but HPDrive supports multiple drives as different unit numbers with the same HP-IB address.

For best performance, it is recommended that the -nosleep option be used to enable continuous polling. Otherwise, RTE disc performance will be poor.

As an example, to emulate a 7925H drive at HP-IB address 0:

hpdrive -nosleep -7925H 7925H.hpi

To emulate a 7914 drive at HP-IB address 1:

hpdrive -nosleep -a 1 -7914 7914.hpi

Using HPDrive

Generally, HPDrive is invoked within a console window from the directory where hpdrive.exe resides with the following syntax:

hpdrive [options][<image> ... ]

All other options are used to configure the emulated drive or for diagnostics. Below is a summary of all options. Execute HPDrive with the -h option for a summary. Also have a look into the README file for up-to-date information.

Option Description
-h Output a summary of the command line options.
-d Shows drive activity in terms of seek operations, including the affected records. Seek position refers to the current record address. There is one seek indicator for each unit.
-scan Check for compatible IEEE488/GPIB interface hardware.
-<preset> Select the drive type to be emulated by its preset name (like -9121 for emulating an HP 9121 floppy disc drive). Use hpdrive -presets to get an overview of all drive types currently emulated.
-a <address> Use <address> as primary GPIB address. If omitted, the address defaults to 0. The possible address range is from 0 up to 31, however due to the parallel poll hold-off, only addresses from 0 to 7 should be used for mass storage devices. Address 21 is defacto reserved for the system controller.
-n <numdrives> Use <numdrives> drives. Default for all drives is 1, however the number of emulated drives ca be freely chosen within the supported unit range (normally up to 4 units can be addressed by the HP 9845, however HPDrive allows up to 16 virtual units for AMIGO drives and up to 15 units for SS/80 or CS/80 drives).
-b <board> In case more than one compatible IEEE488/GPIB board has been detected, a specific board can be selected with this option. <board> refers to the position at which the board is listed with the -scan option. Default is 0 (first board detected).
-lf <logfile> Print all output into <logfile>. Useful especially for diagnostics in combination with the -l option.
-l <loglevel>

Specifies detail of HPDrive's reporting. Possible values are
0 (=silent operation, no output except errors),
1 (=output errors and warnings only, this is the default),
2 (=like 1 plus some basic information - this is the normal mode),
3 (=like 2 plus detailed logging of all HP-IB activity),
4 (=like 3 plus verbose reporting of all data which passes the HP-IB)

Note that logging may slow down GPIB response on low performance systems. If logging is required on those systems, use the -lf option above, since file writes in general are better buffered and as such faster than console output.

-e <eoi-delay> Specify delay between sending the last data byte and asserting the EOI line (default value is 500).
-s <send-delay> Specify delay between releasing hold-off and start sending in ms (default delay is 0).
-nosleep Disable idle cycles when waiting for GPIB commands or during GPIB data transfer. This option should be used only if the host requires tight timings with immediate response, such as the HP 64000 workstations. Normally, HPDrive sleeps in the range of few milliseconds between hardware polls in order to limit CPU usage.
-r <recv-delay> Specify delay between releasing hold-off and start receiving in ms (default delay is 0).
-v Show version info.
-license Show license info.

The HPDrive program can be shut down at any time by pressing CTRL-C.

Typically, you will simply mount an existing hpi disc image file with HPDrive like this

hpdrive <imagefile>.hpi

Now the PC behaves on the HP-IB/GPIB bus just like a 9895A floppy disc drive with one disc unit (which is the default) and can be used as such. You can now use the proper list directory command on your host to check the connection, e.g.

CAT ":H7"

on an HP 9845 with 98034 HP-IB interface configured to select code 7 ('H' is the drive type identifier for a 9895A floppy disc drive on a HP 9845).

If you like to emulate another drive, e.g. a 9122 floppy disc drive, first run

hpdrive -presets

for a listing of the drives currently supported, and the keywords which select the drive type to be emulated. Now use the keyword for your selection with HPDrive, e.g.:

hpdrive -9122 <imagefile>.hpi

to mount <imagefile>.hpi for a 9122 emulation. Note that HPDrive expects a certain file size for the image to be mounted (which normally is drive specific) in order to provide the proper disc space. If the file size doesn't match, HPDrive gives you an appropriate message and you can chose whether to use the image file anyway, but will also adjust the drive parameters accordingly so that the emulation is no longer 1:1. In case of doubt, simply let HPDrive create the proper images for you.

Also note that - of course - your host must support the emulated drive type. So, for example, if you configure HPDrive to emulate a 9122 SS/80 floppy drive, an HP 9845 system will not be able to use it. It is just like connecting a real 9122 drive to the GPIB bus.

If you like to see some drive activity, add the -d parameter so you can trace the record number which is currently processed:

hpdrive -d -9122 <imagefile>.hpi

If you like to emulate multiple disc units, simply specify two or more image files. For example, if you like to emulate a 9895A drive with two units, enter

hpdrive <imagefile>.hpi <anotherimagefile>.hpi

You also can use the -n parameter for emulating up to 8 units, such as

hpdrive -n 3

which will first ask you for creating three disc images, and then start emulating three units with those images.

By default, HPDrive uses GPIB address 0. In case HPDrive should work on another address, use the -a option, such as

hpdrive -a 1 <imagefile>.hpi

for working on GPIB address 1. Note that most HP mass storage was limited to the address range of 0..7, so if you're using GPIB addresses above 7, it may happen that your drive is not detected by your host.

Downloads

Click here for downloading HPDrive:

HPDrive 3.01 Windows 9x/ME/NT/2000/XP/Vista/Windows7: hpdrive-301.zip
Custom TNT4882/TNT5004 Driver 2.0 for Windows XP/Vista/Windows7: gpibdrv-20.zip

This version has been checked on many platforms, however please take into account that thoroughly testing twenty drive types or more under ten or more platforms with five or six different GPIB boards is not feasible. It is recommended to make copies of valuable images you are working on in case something goes wrong, just like it is good practice with real hardware. Please use the contact feature to let me know if something doesn't work as expected.

Click here for access to the old HPDrive beta version:

HPDrive 2.0 beta2 Windows 9x/ME/NT/2000/XP/Vista: hpdrive-20beta2.zip
Custom TNT4882 Driver 1.0 beta Windows XP/Vista: gpibdrv-10beta.zip

The DlPortIO driver package (needed for ISA based GPIB boards under Windows NT/2000/XP/Vista) can be downloaded here.

Please note that, although non-commercial use is still provided free of charge and distribution is encouraged within the Creative Commons Public License, HPDrive is not free software. If you plan to use HPDrive within a commercial context, please use the contact feature to ask for commercial conditions.

The change in licensing has become necessary in order to provide a minimum of protection towards existing offers of other commercial solution vendors, since due to the support of contemporary GPIB hardware the functionality of HPDrive and HPDir is no longer restricted to pure vintage technology.

Working with Binary Images

The image files which are used by HPDrive can be accessed by another utility, the HPDir program. If you consider HPDrive as a utility which works on drive level, HPDir is the program which works on file system level. Besides copying files to and from an image file, HPDir supports a number of other operations on images, like creating and initializing images, generating directory listings, creating and deleting different types of files inside an image, setting file attributes and much more. See the HPDir Project for information on this really versatile and useful program.

If you are looking for software to test HPDrive with, please have a look into the Software Section. There is much software available, mostly provided as image files for direct use with HPDrive's HP 9895A emulation.

Troubleshooting

Here are some hints for the most common problems:

Symptom Likely Cause Procedure
Supported GPIB Board is not detected Board is set to the wrong I/O base address (ISA boards only) Either set the board to a supported I/O base or use the -port option
  DLPortIO driver is not installed (ISA boards under NT/2000/XP/Vista only) Install the DLPortIO driver
  Custom TNT4882 driver is not installed (PCI boards only) and/or standard NI 488.2 driver still present If present, uninstall NI 488.2 driver, install the custom TNT4882 driver
HPDrive can't be used from your vintage host system IEEE488 cabling restrictions violated Check your GPIB cabling, connect host and PC exclusively
  GPIB address duplication Check for other devices on the bus with equal GPIB address. If necessary, use the -a option
Other devices on the bus won't work when HPDrive is running Known issue, but the cause is not yet identified Check for unique GPIB addresses. Tell me about the host/device combination you are using
HPDrive won't work with logging enabled Sometimes happens with slower systems (Pentium and below) when too much processing is needed to produce (and scroll) log output so that timing constraints of the hosts GPIB driver get violated. Mostly with rudimentary implemented drivers like ROM based boot loaders. If logging is needed, use the -lf switch to log into file instead to standard output
     

Also check the README in the HPDrive package for troubleshooting procedures.

If you can't solve the problem, use the options "-l 4 -lf <logfile>" to create a detailed log of what has happened and sent it to me.