Re: commodore terminfo entry

From: Marko Mäkelä <>
Date: Tue, 6 Jan 2015 23:00:20 +0200
Message-ID: <20150106210020.GA1707@x60s>
Hi David,

>I don't yet have a 'commodore' terminfo entry on my ubuntu system, but 
>I did find it in Debian.  It uses terminfo tags I'm not good enough to 
>fully understand, good find!

On my Debian system, it is part of the ncurses-term package according to 
the following command:
dpkg -S /usr/share/terminfo/c/commodore

>Does the entry work well when you set the TERM variable to b-128?

I tried the following:
TERM=b-128 mutt|tee /tmp/commodore.bin
and I hit q on the terminal after the output ceased.

I repeated the same with TERM=commodore. Obviously, I got some garbage 
on the xfce4-terminal screen. But the contents of the output file does 
not seem correct either:

1. It is not mapping ASCII lower case to ASCII upper case (nor ASCII 
upper case to PETSCII upper case). Ok, this is solvable by

stty olcuc

except that the characters would only be translated on the terminal, not 
in the file that was output by tee(1).

2. There are some weird-looking control codes: ESC ctrl-f followed by a 
string of NULs (I guess it is for avoiding losing valuable characters 
when the terminal cannot keep up with the control code execution), and 
then "ESC ctrl-k 23, 0," apparently for positioning the cursor to the 
bottom line. Then again some NULs and another "ESC ctrl-k 23, 0,", some 
NULs, CR, ESC ctrl-f, NULs, and 24 LF (which is ignored by the B-128; I 
tested with ?"a";chr$(10);"b"). It looks like CR is expected to move the 
cursor to the start of the line like on "normal" terminals, because some 
status lines are being separated by CR characters. Finally, there is 
"ESC ctrl-k 23,25," followed by a string of NULs, and then "ESC ctrl-e" 
followed by the top line (y:Exit  c:Chdir  m:Mask ...) and the screen 

When I hit some wrong key, I got a response "Key is not bound.  Press 
'?' for help." followed by a string of ctrl-p and ctrl-f (which should 
be ignored by the Commodore screen editor), and finally ctrl-m.

So, for all intents and purposes, this terminfo entry seems useless. I 
was curious when it was contributed. The source is linked from the 
ncurses home page

The source file contains the following entry:

# Commodore B-128 microcomputer from Doug Tyrol <det@HEL-ACE.ARPA>
#       I'm trying to write a termcap for a commodore b-128, and I'm
# having a little trouble. I've had to map most of my control characters
# to something that unix will accept (my delete-char is a ctrl-t, etc),
# and create some functions (like cm), but thats life.
#       The problem is with the arrow keys - right, and up work fine, 
#       but
# left deletes the previous character and down I just can't figure out.
# Jove knows what I want, but I don't know what it's sending to me (it
# isn't thats bound to next-line in jove).
#       Anybody got any ideas? Here's my termcap.
# DAG -- I changed his "^n" entries to "\n"; see if that works.
commodore|b-128|Commodore B-128 micro,
	am, bw,
	OTdN#20, cols#80, lines#24, pb#150,
	OTbc=^H, OTnl=^M, clear=\E\006$<10/>, cr=^M, cud1=^J,
	cuf1=^F, cup=\E\013%p1%2d\,%p2%2d\,$<20/>, cuu1=^P,
	dch1=\177$<10*/>, dl1=\Ed$<10*/>, el=\Eq$<10/>,
	home=\E^E, ht=\011$<5/>, ich1=\E\n$<5/>, il1=\Ei$<10/>,
	kcub1=^B, kcud1=^J, kcuf1=^F, kcuu1=^P, khome=\E^E, rmir=,

If the ARPANET was decommissioned in 1990, this entry should not be 
newer than that. The comment is quite clear. I guess that this kind of 
"contributions" would not be accepted to terminfo nowadays. :)


       Message was sent through the cbm-hackers mailing list
Received on 2015-01-06 22:00:04

Archive generated by hypermail 2.2.0.