ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.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 "30-Oct-99" "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] [\-delay \fIseconds\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 \-delay \fIdelay\fP
69 The delay between displaying one crash and another.
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 fortune (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/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 -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 (1),
179 .BR fortune (1),
180 .BR phosphor (1),
181 .BR starwars (1),
182 .BR ljlatest (1),
183 .BR dadadodo (1),
184 .BR webcollage (1),
185 .BR driftnet (1)
186 .BR EtherPEG ,
187 .BR EtherPeek ,
188 .BR console_codes (4).
189 .SH COPYRIGHT
190 Copyright \(co 2002-2003 by Trevor Blackwell.  Permission to use, copy,
191 modify, distribute, and sell this software and its documentation for
192 any purpose is hereby granted without fee, provided that the above
193 copyright notice appear in all copies and that both that copyright
194 notice and this permission notice appear in supporting documentation.
195 No representations are made about the suitability of this software for
196 any purpose.  It is provided "as is" without express or implied
197 warranty.
198 .SH AUTHOR
199 Television and Apple ][ emulation by Trevor Blackwell <tlb@tlb.org>.
200 Slideshow and text mode by Jamie Zawinski <jwz@jwz.org>.
201 Pty and vt100 emulation by Fredrik Tolf <fredrik@dolda2000.com>.