Ttyrec
Encyclopedia
ttyrec is a program and/or its file format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

 capable of recording the TTY output of a text-mode
Text user interface
TUI short for: Text User Interface or Textual User Interface , is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from text-based user interfaces...

 program together with timestamps and then replaying it.

It is widely used for example in the NetHack
NetHack
NetHack is a single-player roguelike video game originally released in 1987. It is a descendant of an earlier game called Hack , which is a descendant of Rogue...

 community for storing game replays.

Recorders/players


Playback only


Technical file format specification

Each chunk consists of a header using 32bit little-endian numbers:
  • sec -- seconds, either since the beginning of the recording (0-based) or since the Unix epoch
  • usec -- 0..999999 microseconds
  • len -- length of the payload

and the actual payload written as text with vt100
VT100
The VT100 is a video terminal that was made by Digital Equipment Corporation . Its detailed attributes became the de facto standard for terminal emulators.-History:...

 control codes.

The format doesn't contain any information about the character set used nor about the terminal size needed to play back the file. termrec will inject this information as \e[G or \e[@ for Unicodeness and as \e[8;Y;Xt for size, but this is a hack outside of the format specification, not guaranteed to work on all terminals.

Related formats

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK