[comp.windows.x] xplato - X11 Client that supports ASCII PLATO protocol

bauer@loligo.cc.fsu.edu (Jeff Bauer) (06/12/90)

XPLATO 1.1 is an X client that generates graphics according to the Control
Data ASCII PLATO protocol.  It can be used as a terminal emulator when
connecting to a Control Data Cyber that is running the central PLATO
application.

XPLATO 1.1 is available via anonymous ftp from systems.cc.fsu.edu 
(128.186.2.100) as a compressed tar file named "pub/xplato.tar.Z".

Features :
----------
	o Support for full 512x512 PLATO resolution.
	o Uses "crudimentary" TELNET protocol to connect to host.
	o Support for most PLATO graphics functions. (Not supported
	  are the hardly-used fancy functions, such as size 2
	  writing, reverse writing, etc.).
	o Touch panel support through mouse button control.
	o Dynamic alternate character set support.
	o Mapping of PLATO keys onto reasonable CONTROL and META
	  equivalents.
	o Currently only monochrome support (other than the 
	  standard X color control over foreground and background --
	  the PLATO system you log onto thinks you are a
	  monochrome Control Data Viking 721 terminal).
	o No support for micro-PLATO (emulate Z80 code? Gimme a
	  break!).
	o PLATO demonstration signon is available on
	  sfs.cc.fsu.edu (128.186.4.19) until June 23rd
	  (signon then will be available on rai.cc.fsu.edu =
	  128.186.4.18) with the PLATO name of "demo" and the
	  PLATO group = "internet".

Please send comments and suggestions to bauer@loligo.cc.fsu.edu.

The rest of the README file follows, for those of you who are
interested.


To Install :
------------

	Xplato was developed on a Sun 3/60 running 4.0.3 and X11R4.
Assuming that the locations of existing X clients is /usr/bin/X11,
you should be able to just build and go.  If not, you'll have to
check some things :

	1. Check the definitions of "BDF_TO_SNF", "MKFONTDIR", and
	"XSET" in plato.h.  Make sure that you have them and that these `
	point to where they are on your system.

	2. Check charset.c, function "load_charset()".   It issues
	the three above commands via system(3) calls.   You need to
	make sure that this sequence makes sense with respect to
	your operating system and X level.  

	3. Check the Makefile and make sure the path names in the
	"install:" dependency are correct.

	4. Check the script file "plato" and make sure that'll
	work on your system too. 

After checking to see that all that font stuff is going to work, type

	make

Assuming this works (which it probably won't if you aren't on a
bsd derivative -- System V changes should be trivial, though), become
the "super user" appropriate for your system's location of X binaries
and libraries (gee, root is a good choice, eh?) and type :

	make install
	
This will compile and place the standard PLATO 8x16 font into the 
"misc" directory for the X fonts, create an "xplato" directory in 
/usr/lib/X11 for xplato-unique files, copy a font into that directory 
for use by the "plato" shell script, and finally copy the "xplato" 
binary and "plato" shell script to the X binary directory.

You should use the "plato" script and not call "xplato" directly,
unless you know what you are doing with X fonts (and have found a better way
through that mess!).

The parameters to "plato" and "xplato" are :

usage : [x]plato [-options ...] -f path hostname

where options include :
    -display host:dpy            X server to use
    -geometry geom               Geometry of window
    -fg color                    set foreground color
    -bg color                    set background color
    -bd color                    set border color
    -bw width                    set border width
    -fp font_path (REQUIRED)     set font directory path
    hostname      (REQUIRED)     Host name for TELNET

To Try it Out : 
---------------

What?  You don't have a Control Data Cyber sitting around running PLATO?
Well, that's OK because I do.  I have set up a PLATO signon on our
PLATO system at FSU for you to browse around on and try out this
X application.

Assuming that the "plato" script is in "/usr/bin/X11/plato", simply type :

	% /usr/bin/X11/plato sfs.cc.fsu.edu

"sfs.cc.fsu.edu" = 128.186.4.19.  If you didn't find it, update your hosts
file or get domain name service!

NOTE : after June 23rd, 1990, PLATO service will be discontinued on 
sfs.cc.fsu.edu and you should try rai.cc.fsu.edu (128.186.4.18) instead.

Assuming that you installed the PLATO font correctly and the server found
it, you should see a window called "X-Plato" open up and the Cyber login
banner prompting you, something like :

	WELCOME TO THE NOS SOFTWARE SYSTEM.
	COPYRIGHT CONTROL DATA 1978, 1987.

	90/06/11.  13.28.42.  T1C1B01
	FSU SUPERCOMPUTER FILE-SERVER SYSTEM.  NOS 2.5-688.03.

	USER NAME:

At the "USER NAME:" prompt, type the string "plato,plato" then press
RETURN.  After a few seconds, you should see the "Welcome to the fsu
PLATO system" page.  The demonstration PLATO signon is name "demo"
of group "internet".  Sign in with the appropriate name and group.
From then on, browse around!  If you have any comments, you can leave
a note anytime by pressing TERM-comment (press CONTROL-t, type
in "comment" at the "What term? >" prompt, then type away).
---
This table can be displayed while in XPLATO by pressing the middle mouse
button.  The middle mouse button is a toggle that will bring up this
table or remove it appropriately.

	Table of PLATO key codes and XPLATO equivalent keys.

	PLATO key    XPLATO key     PLATO key    XPLATO key
	---------    ----------     ---------    ----------
	ANS          CONTROL-a      ACCESS       META-a
	BACK         CONTROL-b      SHIFT-BACK   META-b
	COPY         CONTROL-c      SHIFT-COPY   META-c
	DATA         CONTROL-d      SHIFT-DATA   META-d
	EDIT         CONTROL-e      SHIFT-EDIT   META-e
	FONT         CONTROL-f      MICRO        CONTROL-m
	HELP         CONTROL-h      SHIFT-HELP   META-h
	LAB          CONTROL-l      SHIFT-LAB    META-l
	STOP         CONTROL-s      SHIFT-STOP   META-s
	SHIFT-SUPER  META-SHIFT-6   SQUARE       META-q
	SUPER        CONTROL-SHIFT-6
	TERM         CONTROL-t
	SUB          CONTROL-SHIFT-hyphen
	SHIFT-SUB    META-SHIFT-hyphen
	NEXT         RETURN, Left_Mouse_Button
	SHIFT-NEXT   SHIFT-RETURN, SHIFT-Left_Mouse_Button
	Touch Panel  Right_Mouse_Button
	BACKSPACE    SHIFT-space_bar
	ERASE        DELETE, back_space
	SHIFT-ERASE  SHIFT-DELETE, SHIFT-back_space

Implementation notes :
----------------------
I welcome any comments; this is my first X application and I'm sure
much of the X stuff is not done optimally.  One area that was
a real sticker was supporting the alternate PLATO character set.
The PLATO protocol defines the ability to define any 8x16 font
code on the fly.  I cooked up the most obvious and hopefully the
most portable way to do this in "charset.c" by actually building
a BDF file and system(3)-ing off the appropriate X command to 
compile and install the font.  I really wouldn't have bothered
with alternate fonts at all, except that the thousands and
thousands of courseware hours on PLATO use the idea a LOT.

This is the reason for the shell script "plato" -- each PLATO
session must have its own dynamic font.  So, the BDF file
generated uses a different ISO kludge name within its own
font directory that the X server is told about via "xsets".

The upside of this is that you can run more than one XPLATOs
on a single X workstation, each with it's own alternate character
set.  The downside is that you can't "-display another_host" 
under this scheme, since YOUR X server has to know where the
alternate font is.  Seems one of the least-networked features of
X is fonts.
Jeff Bauer				bauer@loligo.cc.fsu.edu
FSU Computing Center Systems Group	(904) 644-2591 x. 113