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