From: dtaylor@magnus.acs.ohio-state.edu (Douglas A Taylor)
Subject: Re: Wanted: More terminal emulations
Reply-To: doug-taylor+@osu.edu
Organization: The Ohio State University
Date: Wed, 29 Jul 1992 12:47:25 GMT

In article <shag.712374565@glia> shag@glia.biostr.washington.edu (Shag {Official Random}) writes:
>Does anyone else out there know of any terminal emulations for GeoComm other
>than those which come with Geoworks?  I'd be particularly interested in a
>vt-200/220/300/320 series kind of thing, or a vt-100 that'd work a little
>better [without modifying termcap on the unix end of things, which hasn't
>worked in the past].
>
>On a similar thought, does the SDK include documentation on how to write 
>terminal emulations?

I've included below a file I received from Brian Smithson (I believe)
way back when the pcgeos mailing list started.  It's a description of
the format of GeoComm *.TC files.  You'll find these files in
\geoworks\system\termcap.  Basically, there's one for every terminal
type that GeoComm supports.

The *.TC files work like this: Each function provided by GeoComm
(clear screen, bell, cursor left, cursor right, etc.) is assigned a
number.  Associated with that number is a control sequence that
activates the function for that terminal type.

  For example, GeoComm uses the number 6 to designate the up-arrow
  function.  The control sequence for the up-arrow on an HP2392 terminal
  is Escape-A.  If I were to create a TC file for the HP2392, I would
  include the line "\EA <tab> 6".  Got it?  Good. :-)

The notation for the control sequences is pretty close to that used by
termcap and terminfo.  \E means escape, ^G mean control-G, and so on.
The cursor-positioning stuff is a little different, but that's about
all.  A semi-colon (;) comments out the rest of the line, which could
possibly conflict with control sequences which use a semicolon.  For
example, the infamous change-scroll-region function (25) is listed in
vt100.tc as \E[%i%d;%i%dr.

GeoComm recognizes only the terminal types that originally came with
it.  That means if you want to create a vt200 emulation you'll have to
call it vt100.tc or tty.tc or ibm3101.tc or something like that.
Also, it reads those files only at startup, so if you make changes
you'll have to restart GEOS for them to take effect.

I once thought about writing a BASIC program that would translate
GeoComm *.TC files <--> termcap or terminfo files.  It wouldn't be
that hard to do.  I gave it up because whenever I try to meddle with
my TC files I get pretty spectacular GWE abends.  I hope you have
better luck.

--- cut here ---
;$Id: vt100.tc,v 1.4 90/09/07 23:50:43 brianc Exp $
;bell
^G		0
;left
^H		1
;tab
^I		2
;down
^J		3
;return
^M		4
;scroll down
;\EM		5
;up arrow
^Z		6
;down arrow
^J		7
;right arrow
;\EOC		8
;left arrow
^U		9
;F1
;\EOP		10
;F2
;\EOQ		11
;F3
;\EOR		12
;F4
;\EOS		13
;clear&home
^L		14
;num lock on
^O\E0P		15
;num lock off
^O\E0`		16
;cursor up
^Z		17
;cursor right
\E[C		18
;cursor home
;		19
;clear 2 end o screen
\Ek		20
;clear 2 end o line
\EK		21
;normal mode (no inverse)
^O		22
;save cursor
;\E7		23
;restore cursor
;\E8		24
;change scroll reg
;\E[%i%d;%i%dr	25
;gotoxy
\EY%+ %c%+ %c	26
;bold on	27
;underscore on	28
;blink on	29
;reverse on
^N		30
;insert line
;\E[L		31
;back tab	32
;delete line
;\E[M		33
;delete char
;\E[P		34
;insert char	35
;go status	36
;insert mode
;\E[4h		37
;leave insert mode
;\E[4l		38
;scroll up
;\ED		39
;term init	40
;sane reset	41
;graphics on
;\E[%dm		42
;set row
;\E[%i%dH	43
;set column
;\E[;%i%dH	44
;underscore off 45
;reverse off	46
^O
;set tab	47
;clear tab	48
;visible bell
;\Evb		49
;cursor down many
;\E[%dB		50
;cursor left many
;\E[%dD		51
;cursor right many
;\E[%dC		52
;cursor up many
;\E[%dA		53
--- cut here ---
-- 
   Doug Taylor                         |   Nothing real can be threatened.
   The Ohio State University           |   Nothing unreal exists.
   doug-taylor+@osu.edu                |            - A Course in Miracles
Newsgroups: comp.os.msdos.pcgeos