http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.20.tar.gz
[xscreensaver] / hacks / apple2.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH XScreenSaver 1 "5-May-2004" "X Version 11"
15 .SH NAME
16 apple2 - Apple ][ display emulator
17 .SH SYNOPSIS
18 .B apple2
19 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP]
20 [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install]
21 [\-visual \fIvisual\fP]
22 [\-program \fIcommand to run\fP]
23 [\-basic] [\-slideshow] [\-text]
24 [\-meta] [\-esc] [\-bs] [\-del] [\-fast]
25 .SH DESCRIPTION
26 The
27 .I apple2 
28 program simulates an original Apple ][ Plus computer in all its 1979
29 glory. It also reproduces the appearance of display on a color
30 television set of the period.
31 .PP
32 There are 3 modes: basic, slideshow, and text. Normally it chooses a
33 mode randomly, but you can override with the \fI\-basic\fP,
34 \fI\-slideshow\fP, or \fI\-text\fP options.
35
36 In basic mode a simulated user types in a Basic program and runs it.
37
38 In slideshow mode it chooses a number of images from the image source
39 you configured into XScreenSaver and displays them within the
40 limitations of the Apple ][ display hardware. With only 6 available
41 colors, you can only make out the general shape of the pictures.
42
43 In text mode it displays the output of a command (by default your
44 system's fortune program, but can be overridden with \fI\-program\fP).
45
46 In text mode, it is also a fully functional (if anachronistic)
47 vt100 terminal emulator.
48 .SH OPTIONS
49 .I apple2
50 accepts the following options:
51 .TP 8
52 .B \-window
53 Draw on a newly-created window.  This is the default.
54 .TP 8
55 .B \-root
56 Draw on the root window.
57 .TP 8
58 .B \-mono 
59 If on a color display, pretend we're on a monochrome display.
60 .TP 8
61 .B \-install
62 Install a private colormap for the window.
63 .TP 8
64 .B \-visual \fIvisual\fP
65 Specify which visual to use.  Legal values are the name of a visual class,
66 or the id number (decimal or hex) of a specific visual.
67 .TP 8
68 .B \-basic
69 Choose basic mode
70 .TP 8
71 .B \-slideshow
72 Choose slideshow mode
73 .TP 8
74 .B \-text
75 Choose text mode
76 .TP 8
77 .B \-program \fIsh-command\fP
78 In text mode, the command to run to generate the text to display. This
79 option may be any string acceptable to /bin/sh. The program will be
80 run at the end of a pipe, and any characters that it prints to
81 \fIstdout\fP will be printed on the Apple ][ display. If the program
82 exits, it will be launched again after 3 seconds.  Default:
83 .BR fortune (1).
84
85 In text mode, \fIapple2\fP emulates a vt100 terminal running on a 40x24
86 uppercase-only screen.
87
88 For example:
89 .EX
90 apple2 -text \\
91        -program 'cat /usr/src/linux*/README | fold -sw40'
92 apple2 -text -program 'ping apple.com'
93 apple2 -text -program 'ps -e'
94 apple2 -text -program 'od -txCz -w7 /dev/urandom'
95 apple2 -text -program 'cat /dev/random'
96 apple2 -text -fast -program 'xemacs -nw -q -f life'
97 apple2 -text -fast \\
98        -program 'xemacs -nw -q --eval "(hanoi 5)"'
99 .EE
100 You can also use \fIapple2\fP as an extremely lo-fi replacement for the
101 .BR xterm (1)
102 and
103 .BR gnome-terminal (1)
104 terminal emulators:
105 .EX
106 apple2 -text -fast -program tcsh
107 .EE
108 .TP 8
109 .B \-pty
110 In \fI\-text\fP mode, launch the sub-program under a pty so that it
111 can address the screen directly.  This is the default.
112 .TP 8
113 .B \-pipe
114 In \fI\-text\fP mode, launch the sub-program at the end of a pipe: 
115 do not let it address the screen directly.
116 .TP 8
117 .B \-esc
118 When the user types a key with the Alt or Meta keys held down, send an
119 ESC character first.  This is the default.
120 .TP 8
121 .B \-meta
122 When Meta or Alt are held down, set the high bit on the character instead.
123 .TP 8
124 .B \-del
125 Swap Backspace and Delete.  This is the default.
126 .TP 8
127 .B \-bs
128 Do not swap Backspace and Delete.
129 .TP 8
130 .B \-fast
131 Normally, characters are printed at the speed of an original Apple][
132 computer; however, when using this program as a terminal emulator,
133 the novelty of those 300 baud characters might wear off.  You can use
134 the \fI\-fast\fP option to speed things up a bit.
135 .SH TERMINAL EMULATION
136 By default, \fIapple2\fP allocates a pseudo-tty for the \fI\-text\fP-mode
137 sub-process to run under.  This has the desirable side effect that the
138 program will be able to use
139 .BR ioctl (2)
140 to fetch information about terminal parameters and window size, which
141 many programs (such as
142 .BR top (1))
143 need to run properly. \fIapple2\fP will also set the environment
144 variable \fITERM\fP to \fIvt100\fP in the child process.
145
146 Any characters typed on the apple2 window will be passed along to
147 the sub-process.  (Note that this only works when running in "window"
148 mode, not when running in \fI\-root\fP mode under xscreensaver.)
149 .SH ENVIRONMENT
150 .PP
151 .TP 8
152 .B DISPLAY
153 to get the default host and display number.
154 .TP 8
155 .B XENVIRONMENT
156 to get the name of a resource file that overrides the global resources
157 stored in the RESOURCE_MANAGER property.
158 .TP 8
159 .B TERM
160 to inform the sub-process of the type of terminal emulation.
161 .SH X RESOURCES
162 Notable X resources supported include the following which correspond
163 to standard TV controls:
164 .BR analogTVTint ,
165 .BR analogTVColor ,
166 .BR analogTVBrightness , 
167 and
168 .BR analogTVContrast
169 which correspond to standard TV controls. They range from 0 to
170 100,except for tint which is an angle between -180 and +180.
171 .SH TRADEMARKS
172 Apple ][ and Applesoft are trademarks of Apple Computer.
173
174 .SH SEE ALSO
175 .BR xscreensaver (1),
176 .BR bsod (1),
177 .BR fortune (1),
178 .BR phosphor (1),
179 .BR starwars (1),
180 .BR ljlatest (1),
181 .BR dadadodo (1),
182 .BR webcollage (1),
183 .BR driftnet (1)
184 .BR EtherPEG ,
185 .BR EtherPeek ,
186 .BR console_codes (4).
187 .SH COPYRIGHT
188 Copyright \(co 2002-2003 by Trevor Blackwell.  Permission to use, copy,
189 modify, distribute, and sell this software and its documentation for
190 any purpose is hereby granted without fee, provided that the above
191 copyright notice appear in all copies and that both that copyright
192 notice and this permission notice appear in supporting documentation.
193 No representations are made about the suitability of this software for
194 any purpose.  It is provided "as is" without express or implied
195 warranty.
196 .SH AUTHOR
197 Television and Apple ][ emulation by Trevor Blackwell <tlb@tlb.org>.
198 Slideshow and text mode by Jamie Zawinski <jwz@jwz.org>.
199 Pty and vt100 emulation by Fredrik Tolf <fredrik@dolda2000.com>.