X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fapple2.man;h=e29cd23936707eaceb65e5eae873f4a62d16964d;hp=a14400c35322784e7c9ca1d09d4d2c541104b4ee;hb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;hpb=96a411663168b0ba5432b407a83be55f3df0c802 diff --git a/hacks/apple2.man b/hacks/apple2.man index a14400c3..e29cd239 100644 --- a/hacks/apple2.man +++ b/hacks/apple2.man @@ -20,7 +20,8 @@ apple2 - Apple ][ display emulator [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-program \fIcommand to run\fP] -[\-text] [\-slideshow] [\-basic] +[\-basic] [\-slideshow] [\-text] +[\-meta] [\-esc] [\-bs] [\-del] [\-fast] .SH DESCRIPTION The .I apple2 @@ -28,20 +29,22 @@ program simulates an original Apple ][ Plus computer in all its 1979 glory. It also reproduces the appearance of display on a color television set of the period. .PP -There are 3 modes: text, slideshow, and basic. Normally it chooses a -mode randomly, but you can override with the \fI\-text\fP, -\fI\-slideshow\fP, or \fI\-basic\fP options. -.PP -In text mode it displays the output of a command (by default your -system's fortune program, but can be overridden with -program). -.PP +There are 3 modes: basic, slideshow, and text. Normally it chooses a +mode randomly, but you can override with the \fI\-basic\fP, +\fI\-slideshow\fP, or \fI\-text\fP options. + +In basic mode a simulated user types in a Basic program and runs it. + In slideshow mode it chooses a number of images from the image source you configured into XScreenSaver and displays them within the limitations of the Apple ][ display hardware. With only 6 available colors, you can only make out the general shape of the pictures. -.PP -In basic mode a simulated user types in a Basic program and runs it. +In text mode it displays the output of a command (by default your +system's fortune program, but can be overridden with \fI\-program\fP). + +In text mode, it is also a fully functional (if anachronistic) +vt100 terminal emulator. .SH OPTIONS .I apple2 accepts the following options: @@ -65,14 +68,14 @@ or the id number (decimal or hex) of a specific visual. .B \-delay \fIdelay\fP The delay between displaying one crash and another. .TP 8 -.B \-text -Choose text mode +.B \-basic +Choose basic mode .TP 8 .B \-slideshow Choose slideshow mode .TP 8 -.B \-basic -Choose basic mode +.B \-text +Choose text mode .TP 8 .B \-program \fIsh-command\fP In text mode, the command to run to generate the text to display. This @@ -82,25 +85,69 @@ run at the end of a pipe, and any characters that it prints to exits, it will be launched again after 3 seconds. Default: .BR fortune (1). -Note that apple2 is \fInot\fP a terminal emulator: programs that try -to directly address the screen will not do what you might expect. It -merely draws the characters on the screen left to right, top to -bottom. Lines wrap when they reach the right edge, and the screen -scrolls when characters reach the bottom. - -In other words, programs like -.BR fortune (1) -will work, but programs like -.BR top (1) -won't. +In text mode, \fIapple2\fP emulates a vt100 terminal running on a 40x24 +uppercase-only screen. For example: .EX -apple2 -text -program 'cat /usr/src/linux*/README | fold -sw40' +apple2 -text \\ + -program 'cat /usr/src/linux*/README | fold -sw40' apple2 -text -program 'ping apple.com' apple2 -text -program 'ps -e' apple2 -text -program 'od -txCz -w7 /dev/random' +apple2 -text -fast -program 'xemacs -nw -q -f life' +apple2 -text -fast \\ + -program 'xemacs -nw -q --eval "(hanoi 5)"' +.EE +You can also use \fIapple2\fP as an extremely lo-fi replacement for the +.BR xterm (1) +and +.BR gnome-terminal (1) +terminal emulators: +.EX +apple2 -fast -program tcsh .EE +.TP 8 +.B \-pty +In \fI\-text\fP mode, launch the sub-program under a pty so that it +can address the screen directly. This is the default. +.TP 8 +.B \-pipe +In \fI\-text\fP mode, launch the sub-program at the end of a pipe: +do not let it address the screen directly. +.TP 8 +.B \-esc +When the user types a key with the Alt or Meta keys held down, send an +ESC character first. This is the default. +.TP 8 +.B \-meta +When Meta or Alt are held down, set the high bit on the character instead. +.TP 8 +.B \-del +Swap Backspace and Delete. This is the default. +.TP 8 +.B \-bs +Do not swap Backspace and Delete. +.TP 8 +.B \-fast +Normally, characters are printed at the speed of an original Apple][ +computer; however, when using this program as a terminal emulator, +the novelty of those 300 baud characters might wear off. You can use +the \fI\-fast\fP option to speed things up a bit. +.SH TERMINAL EMULATION +By default, \fIapple2\fP allocates a pseudo-tty for the \fI\-text\fP-mode +sub-process to run under. This has the desirable side effect that the +program will be able to use +.BR ioctl (2) +to fetch information about terminal parameters and window size, which +many programs (such as +.BR top (1)) +need to run properly. \fIapple2\fP will also set the environment +variable \fITERM\fP to \fIvt100\fP in the child process. + +Any characters typed on the apple2 window will be passed along to +the sub-process. (Note that this only works when running in "window" +mode, not when running in \fI\-root\fP mode under xscreensaver.) .SH ENVIRONMENT .PP .TP 8 @@ -110,6 +157,9 @@ to get the default host and display number. .B XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. +.TP 8 +.B TERM +to inform the sub-process of the type of terminal emulation. .SH X RESOURCES Notable X resources supported include the following which correspond to standard TV controls: @@ -134,7 +184,8 @@ Apple ][ and Applesoft are trademarks of Apple Computer. .BR webcollage (1), .BR driftnet (1) .BR EtherPEG , -.BR EtherPeek +.BR EtherPeek , +.BR console_codes (4). .SH COPYRIGHT Copyright \(co 2002-2003 by Trevor Blackwell. Permission to use, copy, modify, distribute, and sell this software and its documentation for @@ -147,3 +198,4 @@ warranty. .SH AUTHOR Television and Apple ][ emulation by Trevor Blackwell . Slideshow and text mode by Jamie Zawinski . +Pty and vt100 emulation by Fredrik Tolf .