The Makefile here should build the server-side on most Linux systems.
You will need to have C++ (g++) installed.

The server-side is invoked:

	Usage: ./cpnet_server -i node-id [-s node-id] [options]
	Options:
	        -i node-id   Node ID to assign to client/requester
	        -s node-id   Node ID for this server instance (default 00)
	        -d path      Set root dir to <path>
	        -P #:string  Use <string> for printer <#> (0-F)
	        -t tty       Use <tty> for client communication
	        -T letter    Set temp drive to <letter> (A-P)
	This programs uses server ID 00
	Env vars "hostfilebdos*" will be used as properties


The node-id is the CP/NET node ID to use for the client (CP/NET requestor,
i.e. the H89). It is a 2-digit hexadecimal number, and must range from
01 to FE. Default will be FE.  The HostBdosFile server component will
be node ID 00, which is the default server for CP/NET commands.
It is not necessary to LOGIN to the HostFileBdos server.

The root-dir defaults to ~/HostFileBdos.

The tty should be the tty device path for the FT245R USB tty.

The tmp-drv is a CP/M drive letter to be used for temporary files.
It is really only used by MAIL.COM. Defaults to P:.

In general, drives should be created ahead of time, using "mkdir".

The server-side must be running before starting CP/NET. The SNIOS sends
a network command to get the client ID during network initialization.

Now supports networked LST: devices (printers). To configure a printer,
use the -P. For example, to have LST: unit 0 stored in a file:

	-P "0:>file"

To have LST: unit 1 directed to a (JAVA based) Diable 630 emulation:

	-P "1:!java -jar Diablo630.jar"

Environment variables are also imported as properties, if they begin
with "hostfilebdos". To configure LST: unit 1 from the environment:

	export hostfilebdos00_lst1="!java -jar Diablo630.jar"
	./cpnet_server ...

General LST: config syntax is:

	>path		Save all output to <path> file, truncate
			file if it exists when cpnet_server starts.

	>>path		Save all output to <path> file, preserve
			previous contents when cpnet_server starts.

	!command	Pipe output to <command>. Command must read
			stdin unbuffered/raw. A 0xff in the print stream
			is used to indicate the end of a job.  <command>
			must look for 0xff and, at least, avoid printing
			it. In a shared-printer environment this is also
			used by HostFileBdos to release the printer,
			allowing other users to print.

Diablo630.jar:

	A Diablo 630 (and compatibles) print-to-postscript emulation.
	Currently supports only enough commands for Magic Wand PRINT,
	which uses only micro-spacing for all word-processing features
	and backward print as an optimization. Has a simple GUI control
	window showing basic status and allowing changing some settings
	or the output file.

	NOTE: This emulation depends on print users doing ENDLIST to
	complete a print job. ENDLIST.COM will run on any version of CP/M,
	and is not restricted to CP/NET or even networked printers.
	But, anything that sends 0xff to the LST: device will work,
	including a program that appends 0xff (i.e. as the last character)
	to it's print output.

	Supports:

		LF, space, backspace, reverse-LF, with micro-spacing.

		CR, FF, TAB*.

		Forward/Backward printing.

		Set HSI/VSI (micro-spacing).

		Juki 6100 special-character printing.

	* Does not currently support SET/CLEAR of arbitrary tabs, but
	  forces TAB to the next 8th column.

	NOTE: Changing settings effectively does an ENDLIST. In any
	case, if the output file is not changed then after ENDLIST the
	next job will be appended as a complete and separate PostScript
	"file". This confuses some PostScript viewers, who only show
	the first "job". But 'ps2pdf' (or others) can be used to convert
	to PDF, and will concatenate all embedded files into the output
	(PDF) file.

	Settings:

		Font, with size and bold/italics options.
		Pitch, both LPI and CPI (overrides font width).
		Paper type (currently only LETTER, LEGAL, FORMS).
		Paper orientation (simple LANDSCAPE/PORTRAIT).
		Paper background (example Green-bar paper).
		Left offset.
		Top offset.

	The offsets are effectively like manually positioning the
	paper with respect to top-of-form left-most carriage position.
	Positive values indicate a starting print position inside the
	edge of the paper.  Top offset has not been thoroughly tested,
	it may not produce desired results in all cases - for example
	if one expects the 66th line of the previous page to appear on
	the Nth line of the next page. As a general rule, if Top offset
	is not zero, then the number of lines per page should be reduced
	and FORM-FEED used to advance to the new page.

	Word processing programs are generally capable of creating these
	offsets by document config parameters, but there may be cases
	where a manual setting in advantageous. Also, "raw" output such
	as program listings may benefit from manual offsets.

	Font settings may also confuse some print jobs/programs.
	In general, a monospaced font should be chosen. Some
	programs (Magic Wand) allow for proportional "print wheels"
	but need to be told about the character widths. Two auxiliary
	programs are included in the jar to help:

	lsfonts: List all fonts (known to Java) on your system.

		java -cp .../Diablo630.jar lsfonts

	genprint: Generate the proportional print table for Magic Wand.

		java -cp .../Diablo630.jar genprint [-p ptsize] [-h hsi] [--v vsi] [-x] font

	For the Diable 630, -h and  -v are not needed. 'font' needs to be
	quoted if there are blanks in the name. By default, stdout will
	be the ASM file needed to compile the table. '-x' generates Intel
	HEX file output as if the compile were already done. The HEX file
	may be overlayed on PRINT.COM using something like DDT or SID,
	or other means.  Ideally, an RSX could be written for CP/M 3
	that loads PRINT.COM, overlays your selected print table, then
	executes PRINT. This would avoid the need for separate copies
	of PRINT.COM for each "print wheel".

	Proportional printing has not been tested and there are (at least)
	some changes needed to optimize it for PostScript.

KNOWN ISSUES:

	openjdk has a bug where it alters the font width for LANDSCAPE.
	This causes text to be slightly compressed when switching to
	LANDSCAPE (and keeping all other settings constant).

	PostScript files are much more compressed if each line of
	text is printed at the "natural" spacing of the font. Using
	a special HSI will cause each character to be specified
	separately in the PostScript, cause the file to be larger
	(and probably slower to render) than when using the natural
	character spacing.

	Proportional fonts will require some work to take advantage
	of natural font spacing optimizations for PostScript. Right
	now, Diablo630 is ignorant of proportional spacing, but should
	assume the optimization as long as the printer HSI is unchanged
	(is at it's default value for the font).
