~jhs/tech/ncd/notes

		NCD 16e & NCD19 X-Terminal load sequence
	with FreeBSD-3.4 servers running inetd, bootpd arpd, named, tftp, xdm, 
		By Julian H. Stacey <jhs_ERASE_@berklix.com>

Preamble:
	The V2 servers run OK on 4 * 0.25M RAM slices.  V3 servers need more.
	HOST    SLOTS           OCCUPANCY & SIZE & SPEED
	NCD16   8               4 x  1M-80 (was 70ns till Jan 2000) + 4 x 0.25M
	NCD19   8               4 x  1M-80 + 4x0.25M
                                4 NEC * 8 * NEC421000-80 +
                                4 NCD * 2 * KM44C256AP-10
                                Manual says 100nS is OK for some or all NCDs)

	To manually boot:
		bt ncd/servers/Xncd16e 192.168.91.25 192.168.91.24
	To escape Server:
		compose_character + compose_setup=F3 ==> menu config
	To upload a new file:
		mouse: Setup, Change Setup Parameters, top left click,
		Maybe NCD only uploads non blank fields ?
	Paths used by ncd install script
		TFTP_DIR="/tftpboot"
		MOP_DIR="/usr/lib/mop"          # or /usr/lib/dnet/*.sys
		FONT_DIR="/usr/lib/X11"

Boot Sequence (in the order the NCD boots, to help diagnosis):
---
NCD19 broadcasts with IP 0.0.0.0 to ff.ff.ff.ff for its IP number,
so ensure /etc/inetd.conf contains:
	bootps  dgram udp wait root /usr/libexec/bootpd  bootpd  /etc/bootptab
& /etc/bootptab contains:
	# ncd16
	ncd_small:ht=ether:ip=192.168.91.25:ha=0x00.00.a7.10.28.8a:
	# ncd19
	ncd_big:ht=ether:ip=192.168.91.29:ha=0x00.00.a7.10.66.b6:
NCD then loads a server via tftp, so add this directory to /etc/inetd.conf EG:
	tftp dgram udp wait nobody /usr/libexec/tftpd tftpd -l \
		/public/tftp/ncd /usr/lib/X11/ncd
tftpd routes through symbolic links (EG /usr/ncd -> /usr4/ncd),
	this may be considered a security hazard, but means there is no need
	to also specify /usr4/ncd to tftpd via /etc/inetd.conf
Ensure /etc/syslog.conf has
	ftp.info                                        /var/log/ftp.log
so you get a log of what loads & what fails.
NCD19 looks for a server executable file, in each of the tftp root directories
	specified when tftp starts (ie specified in inetd.conf usually),
	using names in this order: 
		for NCD19:
			C0A85B1D, Xncd19.50, Xncd19
				(IP address 192.168.91.29 = 0xC0.A8.5b.1d)
		or for NCD16:
			C0A85B19, Xncd16e.50, Xncd16e
	if that fails, NCD tries prepending its inbuilt path of /tftpboot/ EG
		/tftpboot/Xncd19.50, /tftpboot/Xncd19, /tftpboot/C0A85B1D.
	so create sym links:
		ln -s servers/Xncd19 
		ln -s servers/Xncd16e
		To abort loading, manual says hit escape twice; PF1 also works.
Server starts, & looks for a configuration file in tftp-dirs
	trying file names in this order:
		configs/unknown, configs/0000a71066b6, configs/192.168.91.29,
		configs/ncd_std
Fonts load:
	The X11.R4 server can't cope with compressed fonts.
	The Xncd19.V3.0.1 can not cope, & (testing 2000.08.16 it appears)
	Xncd19.V2.2.0 also can not cope.
	Xncd16e.V2.2.0 uses .snf (big endian) fonts from
   	inbuilt path EG:
		/usr/lib/X11/ncd/fonts/misc/fonts.dir
		/usr/lib/X11/ncd/fonts/misc/10x20.snf
   	& tape supplied data EG:
		/public/tftp/ncd/fonts/100dpi/
		/public/tftp/ncd/fonts/75dpi/
		/public/tftp/ncd/fonts/dw100dpi/
		/public/tftp/ncd/fonts/dw75dpi/
		/public/tftp/ncd/fonts/misc/
		/public/tftp/ncd/fonts/oldx11/
	Xncd16e.V3.0.1 uses .pcf fonts from
		built in internals, & other pcf fonts
		(EG from X11R6) if available.
	Xncd16e.V3.0.1 Xncd19.V3.0.1 have the embedded string dw100dpi
	( Xncd19.V3.0.1 has emitted the following error:
		%FILE-E-NOREAD, unable to read font directory: \
		 	/usr/lib/X11/ncd/fonts/pcf/dw100dpi/fonts.dir
		%FILE-E-NOREAD, unable to read font alias file: \
		 	/usr/lib/X11/ncd/fonts/pcf/dw100dpi/fonts.alias	)
	Xncd16e.V3.0.1 when started with a config file specify only internal:
		%FONT-I-REQ, requesting font: 8x13
		%FONT-I-REQ, requesting font: -misc-fixed-medium-r-normal
			--13-120-75-75-c-80-iso8859-1 
		%FONT-I-OPEN, opening bitmap font file: @8x13.snf.Z
		%FILE-I-READ, reading font file: @8x13.snf.Z
	which seems to suggest it can maybe also use snf fonts EG
	fonts/misc/8x13.snf.gz (or maybe it was just compiled in)
	Xncd19.V3.0.1 does not recognise *.spd in Speedo/
		or */pfb in Type1/
Key Table is loaded
	Xncd16e.V3.0.1 (but not Xncd16e.V2.2.0) looks for 
		/usr/lib/X11/ncd/XKeysymDB
	so add sym links
		cd /usr/lib ; ln -s ../local/lib/X11 
		cd /usr/lib/X11 ; ln -s /public/tftp/ncd
		cd /public/tftp/ncd ; ln -s ../../../../../usr/local/lib/X11/XKeysymDB 
RGB is loaded:
	Xncd16e.V2.2.0 & Xncd16e.V3.0.1 read by default /usr/lib/X11/ncd/rgb.txt
	servers have inbuilt rgb & font paths of /usr/lib/X11/ncd so if the 
	config file does not rest these, a simpler work around is to
	create symbolic links:
		/usr/lib/X11		-> ../local/lib/X11
		/usr/lib/X11/ncd	-> ../../../public/tftp/ncd
Xncd16e.V3.0.1 & Xncd19.V3.0.1 (but not Xncd16e.V2.2.0) uses XDMCP
NCD broadcasts a request for XDM capable servers, 
which requires a name demon to be available
Ensure some host has /etc/rc.conf with:
	named_enable="YES"
& /etc/namedb/* is OK
Ensure /usr/local/lib/X11/xdm/* are OK, EG xdm-config Xservers etc
log then shows:
	host "192.168.91.24" connected with MIT-MAGIC-COOKIE-1
