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