freebsd-skq/sys/pc98/cbus
Ed Schouten b4b1c5169d Replace syscons terminal renderer by a new renderer that uses libteken.
Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
  do experiments with placing `xterm-color' in /etc/ttys. Because we
  only implement a subset of features of xterm, this may cause
  artifacts. We should consider extending libteken, because in my
  opinion xterm is the way to go. Some missing features:

  - Keypad application mode (DECKPAM)
  - Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
  we cannot go into the debugger anymore if we fail them. I've done
  development of this library almost entirely in userspace. In
  sys/dev/syscons/teken there are two applications that can be helpful
  when debugging the code:

  - teken_demo: a terminal emulator that can be started from a regular
    xterm that emulates a terminal using libteken. This application can
    be very useful to debug any rendering issues.

  - teken_stress: a stress testing application that emulates random
    terminal output. libteken has literally survived multiple terabytes
    of random input.

- libteken also includes support for UTF-8, but unfortunately our input
  layer and font renderer don't support this. If users want to
  experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
  teken.h. If you recompile your kernel or the teken_demo application,
  you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
  syscons renderer, which supports some form of localised input. Maybe
  we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
  years. It hasn't survived the `struct proc' -> `struct thread'
  conversion.

- To prevent confusion among people that want to hack on libteken:
  unlike syscons, the state machines that parse the escape sequences are
  machine generated. This means that if you want to add new escape
  sequences, you have to add an entry to the `sequences' file. This will
  cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
  accident. They should be reported to me, so I can fix them.

Discussed on:	current@, hackers@
Discussed with:	philip (at 25C3)
2009-01-01 13:26:53 +00:00
..
30line.h
cbus_dma.c
cbus_dmareg.h
cbus.h - Move defines for PC-98 machine type from pc98/cbus/cbus.h into 2006-05-08 12:03:58 +00:00
clock.c MFi386: revision 1.249 2008-05-24 09:07:52 +00:00
fdc_cbus.c
fdc.c Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
fdcreg.h
fdcvar.h
gdc.c Replace all calls to minor() with dev2unit(). 2008-09-27 08:51:18 +00:00
nmi.c
olpt.c Replace all calls to minor() with dev2unit(). 2008-09-27 08:51:18 +00:00
olptreg.h
pckbd.c Use kbdd_* macros. 2007-12-30 12:27:31 +00:00
pckbdtables.h
pcrtc.c MFi386: Merge yet another the RTC related work. 2008-04-19 08:18:47 +00:00
pmc.c
sc_machdep.h Always set the bell_pitch to 800. This catch up with the sysbeep() argument 2008-04-08 13:10:57 +00:00
scgdcrndr.c Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
scterm-sck.c Replace syscons terminal renderer by a new renderer that uses libteken. 2009-01-01 13:26:53 +00:00
sctermvar.h Replace syscons terminal renderer by a new renderer that uses libteken. 2009-01-01 13:26:53 +00:00
scvtb.c
sio_cbus.c
sio.c - Cleanup i8251 related defines. 2008-09-07 04:35:04 +00:00
syscons_cbus.c Always set the bell_pitch to 800. This catch up with the sysbeep() argument 2008-04-08 13:10:57 +00:00