Møire 4.01 Docs (1993)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Moire ScreenSaver

by John Lim
INTRODUCTION
Moire ScreenSaver (Portions copyright (c) 1987-89 John Lim) is a program that is installed via a cdev file that can be accessed from the Control Panel. After Moire (pronounced mwahr) ScreenSaver is installed, when the Mac is left inactive the screen will be darkened (to prevent the screen image from burning into the phosphor of the CRT) and a pretty Moire pattern will appear. To turn off the screensaver when it is activated, move your mouse. While the Moire pattern is moving, press a few keys to see some special effects

Changes To Moire since 2.22


- Added Dysons Folly pattern. This is a completely rewritten implementation of some C code by Scott Storkel for an experimental blanking routine that itself duplicates the animation from Dyson's Folly. Scotts code was a modified version of a program distributed by Sun Microsystems on a tape of demo programs. So thanks to Scott and Sun for the algorithm ! - Included many more colour animation features to Moire. - Run on Shut Down feature added. Only useful for Macs that do not have hardware shutdown (i.e. SEs, Pluses and SE/30s). - Completely modified Moires Control Panel interface. - Added ability to set Sleep and Wake rectangles. - New icon design and colour icon display on start up.

- Many inter nal changes to improve compatibility.

GENERAL GUIDE Installation


To try it out, place the Moire cdev file in the System Folder and open it using the Control Panel (use the Control Panel found in System 4.0 or later). Opening the cdev will automatically install the screensaver in memory if it has not yet been installed. (A cdev is a file that the Control Panel can access). NOTE : If Moire complains that there is insufficient memory, it means that there is not enough memory in the System Heap. Reboot and it should work. If you like the results, keep it in your System Folder and every time you bootup Moire ScreenSaver will install itself. During installation on bootup, the Moire icon will appear at the bottom-left of your screen. If you dont want Moire to be installed hold down the Shift-Key until the desktop appears on the screen. Any errors during installation are indicated by beeps. This program will work on any Macintosh with 128K+ Roms. Any System from 3.2 onwards can be used, subject to the following provisos : System 3.2 : You must change the Moire cdev file type from cdev to INIT, and then place Moire cdev in the System Folder and reboot. You can do this using the utility provided, Moire cdev =>INIT. System earlier than 4.1 : You may not change the Permanent Settings from the Control Panel as it needs to use the new routine PopupMenuSelect(). Instead, the Mac will beep when you click the the Change Settings box.

Moire cdev => INIT


For people who are using System 3.2, or are real squeezed for floppy disk space, I have included in the Moire release the above utility. This will convert the cdev to an INIT (a startup document). This makes the code much smaller (from about 31K to 12K), but the INIT will no longer be configurable from the Control Panel. I suggest you prepare all the default settings you like from the cdev, then run the above program on the configured cdev to create an INIT. If you are using System 3.2, I suggest you run a newer System temporarily to do this, or do it on a friends Macintosh. Note that the cdev is not altered in any way by this program.

Configuring Moire ScreenSaver


If you access the program from the Control Panel with System 4.1 or greater, you may configure the following settings - length, shape, randomize and speed :

These settings come into affect everytime you bootup and whenever you access the Moire cdev from the Control Panel. (Randomize is currently dimmed because Dysons Folly uses a different drawing method from the other patterns and so randomize will not work in this case). The settings are : Shape allows you to set the default shape that appears on bootup. Speed sets the speed of the lines. 1 means very slow, 2 faster and 0 fastest. Length sets the number of lines used in the pattern. Randomize sets the probability that Moire will randomly pick a new shape. Change Every sets how often Moire changes shape, subject to the preset probability. This menu is not available when Randomize is set to Never Change. If you set RANDOMIZE to Always Randomize, all shapes should appear 1/11th of the time (there are 11 shapes). If you set it to 50%, the default shape will be automatically displayed half of the time, and the rest of the tim all the shapes will each have a 1/11th chance of appearing. For example, when you set the probability to 50%, the default shape will appear 1/2+1/11 = 6/11th of the time, and the other ten shapes have a 1/22nd chance of appearing. If you have background tasks running under MultiFinder, the speed and length settings will NOT affect the speed of those background tasks. Even if the speed is set to 0 (maximum) and length to the maximum of 100 lines, your other programs will be running just as fast as if the

speed had been set to 1 (minimum) and the length to 4 lines. However, some shapes, like the oval, are computationally more expensive than others.

Colour
If your Macintosh supports colour, then clicking on the Colour button will display a dialog box that permits you to set the following options : Single Colour Click on the coloured rectangle (black in this case) to pick a single colour that Moire will use all the time.

Animated Colours This option makes Moire change the colour used slightly every time a new line is drawn. The scroll bar sets the speed of colour animation (changing). The old colour animation of Moire 2.22 can be simulated by setting the scroll bar to a low value.

Stripes - equal When this option is selected, a popup menu will appear that will allow you to select the colours you want used when drawing. Up to 8 colours may be selected. The actual colours used may be set by clicking on the coloured rectangles. Each colour you select will be used to draw a certain number of lines, then the next colour selected will be used. This option uses equal stripes in the sense that the colours are equally distributed over the lines drawn so that every colour selected is visible on the screen at any one time (in contrast to adjustable length stripes, where the number of colours visible is dependant on the number of lines you have set from the popup menu).

Stripes - random This option will cause Moire to choose the colours to be drawn randomly. The number of lines that will be drawn with the same colour before another colour is picked may be configured from the popup menu.

Stripes - adjustable length This option is similar to Stripes - equal except that the number of lines before Moire chooses the next colour is adjustable, while in Stripes - equal, the number of lines before switching colours is calculated for you.

Minutes Till Sleep


When Moire ScreenSaver is installed the screensaver will activate itself after there has been no user activity for a preset number of minutes. The length of time before Moire ScreenSaver activates itself can be configured from the Control Panel. The new setting is put into effect when the Control Panel is closed or another cdev is selected from the Control Panel. This setting is also saved in the Moire cdev file if the disk is not locked; so the next time you boot up, the new setting will be used.

Clock
Moires built-in menu clock will only work when Moire is active. It is drawn a bit high so it will not obscure a long menu bar (with many menu titles) too badly. It also automatically adjusts itself so that it does not obscure the MultiFinder application icon nor Easy Access. If you dont like the clock, you can also disable it from the check box.

Run on Shut Down


This allows Moire to activate itself after you select Shut Down from the Finder. All device drivers would have been closed and all volumes unmounted, so it is safe to turn off the computer. This feature is only useful for people who leave on their Macintoshes all the time but whose computers do not have a built-in hardware shut down. Clicking the mouse button will restart the computer. Lastly, to those people who say I should check to see if hardware Shut Down is available, and if so disable the check box, I say get Apple to provide a way of checking - there is no Apple approved method at the moment.

NOTE : After you select Shut Down from the Finders Special Menu, dont worry about shutting down when the Moire pattern appears on the screen. Although you have selected Shut Down, because you have not turnedoff the power, the CPU is still running - thus Moire takes advantage of the still active CPU to make the Shut Down screen more interesting.

Setting the Sleep and Wake Rects


Placing your cursor in the Sleep Rect will cause Moire to activate after a 2 seconds of inactivity. Placing your cursor in the Wake Rect prevents Moire from ever activating. To set either of the above rectangles, click on the appropriate button. Your cursor should then change to either the left cursor if you selected the Wake Rect button or the right cursor if you selected the Sleep Rect cursor :

Select the rectangular area you want for the Sleep or Wake Rect by holding your mouse button down and dragging until the rectangle that is displayed on the screen is the correct size and then release the mouse button. If you do not select a rectangle but merely click on the screen, Moire will return to its standard defaults : the top right corner of your main screen for the Sleep Rect and the bottom right corner of your main screen for the Wake Rect. If you select too large an area for your rectangle, Moire will refuse to accept it. This is to prevent careless users from setting the whole screen to be the Sleep Rect. Clicking on the coordinates will cause the Sleep and Wake Rects to flash so that you can see them without doing any graph plotting nor calculations.

Configuring While Moire is Running


While the screen is darkened, a Moire pattern will appear. Try typing these keys while the pattern is active : [ and ] shorten and lengthen the moire queue. q toggles speed quantization. 1- 9- 0 set a speed limit for points (1 = slow to 0 = fast) - hit spacebar for help. 'c' - toggles the clock. a - this activates your current palette by calling ActivatePalette(). Other keys change the patterns shape: f - Dysons folly r - rectangle o - oval d - diamond t - triangle p - pentagram (for satanic users) h - hourglass v - a vee x - an ex + - a cross / & \ - slanted lines You may also disable the Moire ScreenSaver temporarily from the Control Panel. This disables it as long as the Macintosh is left on, or until you open the cdev again from the control panel. The clock may be permanently turned off from the Control Panel. If the ScreenSaver has already been turned off, the clock is disabled. The activate palette option is probably not useful. It is for the rare occasions when you need to reset the colour palette on a colour machine. Pressing a simply makes Moire call ActivatePalette() for the Moire window..

Checking Serial Ports


Moire has the ability to disable itself whenever it detects activity in either the modem or printer ports. To configure this you need to use ResEdit to modify the Cfig resource. A TMPL resource is included in the cdev to facilitate this modification. Set the relevant bytes to 1 to enable checking and reset them to 0 to disable checking. The defaults are no checking of the serial ports.

TROUBLE-SHOOTING
Q. When copying files in the Finder, why does Moire erase the disk icons ?

This is a bug in the design of the original Finder that apparently has never been corrected.

Q.

Why does Moire darken the screen and fail to draw any patterns ?

This is because Moire only draws the to screen when your foreground application is idle. Thus if you are printing Moire will probably only darken the screen because printing demands some computational power and Moire gives as much of it to the printing program as possible. Future versions of Moire however might allow Moire draw to the screen in all circumstances.

Q.

Why does Moire permanently erase the windows of some programs ?

These programs are poorly written. All well-written programs are required to respond to a command from the operating system when windows are updated. Some programs ignore this message because they assume that no window will be in front of it, which isnt strictly true if Moire is installed.

Q.

When I have the clock installed, why do I have to swap disks all the time in Copy ][ Mac ?

Copy ][ Mac clears as much of memory as possible for its own use. This flushes out the Monaco font from memory, which is needed to draw the clock. The fix is to disable the clock first. (Expert Tip : Set the System Heap bit for the font).

Q.

Why does Moire move in jerks in some programs ?

A possible reason is that you may have other programs that work in background running at the same time as Moire. For example TOPs or a Clock INIT. Theres no easy fix for that unfortunately short of removing the other background program or upgrading to a faster computer.

Q.

Are there any programs that wont work with Moire ?

This is a toughie. Artisto+ DA has a problem. The first time you are prompted to open a file, do NOT activate Moire. You will hang. Activating Moire when opening files from the DA menu

seems ok however. The fact that it does work from the DA menu suggests that Artisto+ does not initialize its data structures properly in certain circumstances. The fix is not to activate Moire when the Artisto GetFile dialog box appears - pretty simple, huh ? (Not tested in Moire 3.0 - I dont know whether this answer is still valid).

Q.

The Moire icon is displayed on bootup, but it doesnt activate. Why ?

Is your disk locked ? The first time you boot up on a particular machine, Moire attempts to customize itself to adapt to the system. If you lock the disk, Moire is unable to save the customized features and wont activate. After customization, you may lock your bootup disk again as customization is only needed the first time. If you change computers, systems, hard disks, printers or install a new card into your computer you might need to recustomize Moire by booting up on an unlocked disk. Are you running GateKeeper ? You need to set GateKeeper to allow Moire to modify its own resources. Note that if GateKeeper refuses to allow Moire to modify itself, Moire can get corrupted. If this is the case, get a new copy of Moire from your backup (you do make backups, dont you ?).

Q.

I hate your clock ! What can I do to replace it with my own ?

If you take that sort of attitude, Im not going to speak to you... Seriously though, if you disable Moires clock and use your own clock program, you will be glad to know that Moire does not draw its patterns in the menubar anymore, so screensaver compatible clocks will stay turned off. This wont work if you have multiple monitors positioned in funny positions. If you use my clock, the full screen including the menubar is used in drawing the patterns. Another advantage of using my clock is that it is very fast and small. If you use some of the public domain clocks in conjunction with Moire on a 68000 Mac, Moire might move jerkily when activated. This is because the pd clock is taking too much computational power away from Moire. However Moires internal clock turns itself off when Moire is active, so that Moire gets going on full engines.

Q.

How come some FKEYs dont work when Moire 2.22 is running ?

This is no longer true in Moire 3. FKEYs will work now.

Q.

On a colour Macintosh, Moire appears to interfere with the colour windows. After Moire is

deactivated, all the colour is distorted. Why ? This is because the programs you are currently using do not comply with Apple guide-lines for colour programs, i.e. the Palette Manager. An example of such a program is PixelPaint version 1.0. SuperMac has released a version of PixelPaint that remedies this problem.

Q. Moire isnt drawing using its normal colours. Whats happened ? You are probably running a colour program. In some cases, the colour program will refuse to relinquish some of its colours when Moire activates and thus Moire will be unable to use its normal colours. Instead, Moire will have to borrow the colour programs colours.

Q. The fonts used by other cdevs in the Control Panel look funny after I open Moire. Why ? This is problem only with older Control Panels. I suggest you upgrade to Control Panel 3.2 or later.

Q. I cannot seem to be able to set the Sleep and Wake Rects. Why ? Are you selecting a point or a rectangle. Clicking on a point will cause Moire to revert to its defaults. You need to select an area ! Q. There appear vertical bars on the menu bar when I close the Control Panel when Moire cdev is active. Why ? You are probably running 32-bit colour QuickDraw under MultiFinder under System 6.0.3. This appears to be a bug in the DA Handler. Try opening the Control Panel while holding down the option key (to make the DA open in the current layer) and activate Moire cdev. Click on the colour button to access the colour settings and then close the Control Panel. The menu bar remains normal. Try the same thing in the DA Handler and the bars appear when the Control Panel is closed.

Q. Why doesnt Moire activate when Im running MPW ? Before MPW runs a tool, it reinitializes the environment. As a side-effect, QuickDraws internal structures are disposed off. Therefore no drawing can take place until you run a tool, command

or script that reinitializes QuickDraw.

TECHNICAL SECTIONS Theory of Operation


This program polls GetNextEvent() and EventAvail(). If the mouse is in the special corners, the appropriate tasks are carried out. If we have been receiving nullEvents for a preset number of minutes,a new dialog window the size of the screen created and painted black. Then whenever SystemTask() is called the moire pattern is drawn on the new window. If the screen is painted black but no pattern is drawn, it probably means that the application calls GetNextEvent() but doesnt call SystemTask(). If nothing happens when you move the mouse to the top-right corner, it means that the Window Manager is not initialized or the application is not calling GetNextEvent() - this probably implies that the Mac is doing something cpuintensive, so the screensaver should not be activated anyway. If the moire movements are jerky (as in MultiFinder on a Mac Plus) it is because SystemTask() is called infrequently by the application (see about MultiFinder below). Under Switcher the Hibernation flag is set when the screensaver is activated. This means that Switcher background tasks are disabled. This is necessary as otherwise conflicts can occur between the current active applications process and the screensavers task. Note that because the screensaver uses the Window Manager, it is the applications responsibility to save and restore the screen; so if a program does not properly save the screen when the screensaver is ever activated, make sure you keep the cursor in the bottom-right corner ! The windowing method used in version 3 of Moire to fool the operating system is very similar to the one that MultiFinder uses. This will hopefully make it highly compatible with future versions of Apples Macintosh operating system. I have reduced the number of low-memory globals that Moire uses. Ticks and Mouse are no longer used. The ones still used by Moire (from memory) are WWExist, QDExist, WindowList, SysVersion, SwitcherGlob, Time, uTableBase, WMgrPort and MBarHeight.

Big Screens
This screensaver will work with big screens and multiple-screen Macs. If you have 2 or more monitors Moire will darken all screens and then the pattern will move across all screens as if they were one ! However Stepping-Out poses a problem because it dynamically modifies the screen-size. Therefore the program always checks the screen-size whenever the Moire cdev is accessed via the Control Panel and just before the Moire is activated.

This means if Moire ScreenSaver is misbehaving because of a change in screen-size, just open Moire cdev again from the Control Panel.

MultiFinder
Moire works best with MultiFinder when you are using at least System 4.3 onwards. This is because earlier Systems had bugs which might prevent Moire from activating itself under certain unusual circumstances.

Colour
Moire uses the Palette Manager to arbitrate its colours. If colour animation or random stripes is selected, colours are randomly selected based on HSV coordinates, then converted to RGB. Colours with a saturation less than 0.9 and a value below 0.5 are not selected.

ACKNOWLEDGEMENTS
Congrats if you read every line of my documentation up to this point. Not many peoplehave read all of it, judging from the questions they pose to me ! I tell them, its all in the docs, but they never listen ! Moire ScreenSaver was inspired by Pyro! by Steve Brecher. I thought that I could do it better Thanks especially to Jason Castan for the colour testing, and also Sven Axelsson, Stuart Burden, Ray Ryan, David Platt, Greg Ward, Jeff Laing, Graham Cottew and Simon Darcy for their testing and bug reports. Also thanks to John Pearce and William Orvis for their help with the Kermit and Word bugs. This program was written using THINKs LightSpeed C. The Moire algorithm was taken from some code distributed via UseNet. Unfortunately the author of the code forgot to include his name, so if the moire code looks mighty familiar to you write to me and I will include your name in the next version. I hope the author answers sometime because its been nearly a year since Moire was first released and I havent got any reply from him/her yet. Thanks also to Scott Storkel for the Dysons Folly algorithm. I reserve all rights to the portions of the program that were written by myself. This program is now shareware unlike previous versions because of the numerous improvements made and the many hours of testing to ensure that all the improvements actually did work. Virtually every line of the program has been rewritten. Therefore I ask you send a $10 licensing fee to the address given below. I dont mind foreign currency, but theres a $2-3 Australian charge for

converting overseas cheques, so please dont send me 10 Yen or worse. Moire does not come with any warranty at all. Any screensaver operates by fooling the operating system, unless it is already incorporated into the firmware. Therefore no liability is assumed for any use that is made of this program. Nevertheless, even if liability is found to exist, it shall not exceed the sum paid to the author. Please send all bug reports and donations (please address all cheques to John Lim and NOT to Mr. Shareware, nor Moire, nor THINK, nor Screensaver etc.) to : ==================== John Lim 18 Nottingwood St., Doncaster East 3109, Victoria, AUSTRALIA. ====================
Written26th July 1989. Revised 3rd August.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy