Virtual H89 Computer USB/Serial Device by Norberto Collado

This device is a virtualization of Norberto Collado's H89 USB/Serial modern add-on to H89 computers, or H-8 USB. It provides a USB serial port connection via an FT245R module, and access to USB storage devices (e.g. "Jump Drives") via a VDIP1 module. This add-on is of interest because the FT245R device connects an H89 to a modern host computer, and is essentially a point-to-point network. With CP/Net running on the H89 and appropriate software running on the host (e.g. HostFileBdos) it would provide an easy way to exchange files between an H89 and the modern world. Having a virtual implementation of the hardware allowed development and testing of a CP/Net SNIOS module without requiring real hardware.

The device takes over the H89 Modem serial port address, and adds two standard H89 serial ports for LinePrinter and Auxiliary. It cannot be used with other devices that supply serial ports, although if the virtual H89 discovers it before, say, the MMS 77320 then it should work fine. This requires using a lower numbered slot for the USB/Serial card than for the MMS 77320. The MMS 77320 may also be specified with the "ns" option which disable its serial ports and allows another board to supply serial ports.

The FT245R device is configured as a CP/Net Device, and shares much of the configuration method with CPNetDevice, although the property prefix will be "ft245rdevice_" instead of "cpnetdevice_". Properties for HostFileBdos are the same in either case.

slot_p504, slot_p505, slot_p506
Any of these slots may be used to specify the USB/Serial interface using the value "H89USBSERIAL". For the H8 (using H8 slot numbering), the value is "H8USB" (no serial ports added).
h8usb_port
(H8 only) The base port for the FT245R and VDIP1 devices. Default is 0xb0 (260Q).
ft245rdevice_att
The program to attach to the other end of the FT245R USB serial connection.
vdip1device_fw
A generic string representing the firmware type and version. There is currently no differentiation between firmware types, only file commands and core configuration commands are accepted. Default is "03.69VDAP".
vdip1device_dir
The root directory of the "USB drive". This may also be set/changed by clicking on the "VDIP1" LED, similar to changing floppy drive images. Default is null a.k.a. no drive inserted.

This device is based on the FTDI FT245R and VDIP1 USB chips, hence the property names.

FT245R

To use the FT245R device, something must be attached to the "other end". In real hardware, some program would be running on the host computer and be attached to the tty device (serial port) associated with the USB. The JAVA application CpnetSerialServer.jar is designed to do that, using the "tty=" argument to select a tty device. This may also be set to "stdio" for use in the virtual H89, where the "ft245rdevice_att=ProgramSerial..." property is used to invoke it.

Typical usage for Virtual H89 would be:

The config file ("rc") contains properties to setup the client as well as known servers. Typically, server 00 will be a local HostFileBdos server. Property prefix is "cpnet_". This would include a property "cpnet_tty=stdio", which is required to make it function properly in this environment.

For real hardware, this program would be invoked something like:

And the "rc" file would contain (e.g. on Linux) a property "cpnet_tty=/dev/ttyUSBX" (where 'X' is replaced by the appropriate index for the associated tty device). TBD: do baud, or other serial parameters, need to be specified.

Any use of CpnetSerialServer requires that the jSerialComm JAVA extension be installed, even if it is only used with "tty=stdio".

Accessible servers are setup using "cpnet_server##" properties, as described for Virtual CP/Net Device.

CpnetSerialServer Properties/Arguments

Commandline arguments have the syntax "key=value". Properties use the same "key" but are prefixed with "cpnet_".

conf=cfg-file
Specify the config file for properties. If none specified, the environment variable "CPNET_CONFIG" will be checked. If that does not exist, it will search for "./cpnetrc" and then "~/.cpnetrc".
log=log-file
Specify the file to receive log output. If not specified, stderr will be used.
cpnet_cid, cid=client-id
Specify the client ID for the remote H89. Required. Expects 2-digit hexadecimal. Typically, network ID 00 is reserved for the HostFileBdos server and the ID FF cannot be used as it means "broadcast".
cpnet_tty, tty=tty-spec
Specify the tty to use for connecting to the client (H89). The value "stdio" may be used in cases where a virtual H89 is being connected over a pipe. For serial ports, the path to the tty should be used, optionally followed by baud rate (unclear if baud matters for this USB device). For the property, the tty and baud are separated by space, for the commandline they are separated by comma.
cpnet_protocol, proto=proto-spec
Specify the serial protocol to use for communication with the SNIOS. Choices are "ascii" or "binary", with optional "crc" checking. NOTE: The SNIOS being used must match! "ascii" selects data transmission as ASCII hex characters, with '+' and '-' used as sync characters. This requires twice as much data be transmitted, but has some built-in fault detection. "crc" select a CRC-16 to be generated and checked. For the property, use blanks as separators. For commandline use commas.

The rest of the properties are the same as for the Virtual CP/Net Device except that the prefix is "cpnet_".

VDIP1

Currently, only core configuration and file commands are supported. The supported commands are: SCS, ECS, IPA, IPH, E, e, FWV, SBD (no-op), FS, FSE, DIR, DIRT, CD, RD, OPR, OPW, RDF, WRF, SEK, CLF, DLF, MKD, DLD, and REN.

Both short (binary) and extended (ASCII) command modes are supported. Both binary and ASCII number modes are supported. Note that testing has involved only extended command and ASCII number modes.

Currently, no other types of USB devices are supported (only USB storage devices).

Within the "USB drive" root directory, all file and directory names are forced to lower case. Only files which conform to 8+3 format, and are lower case only, may be accessed by the VDIP1. The "relaxed" filenames supported by the actual VDIP1 firmware are not allowed. Specifically, "FILENAMETYP => FILENAME.TYP" and "LONGFILENAME.TYPE => LONGFILE.TYP" conversions are not allowed.

It is not normally possible to "escape" from the root directory currently assigned as the USB drive, however programs may perform any operations within that directory, including destructive ones. Symlinks to outside directories or files would permit escape, so caution must be used in selecting a directory to use as a USB drive.