_ _ // - DClock v1.12 - // _ // * A Dumb Clock Utility * _ // \X/ \X/ IMPORTANT NOTICE: ----------------- Due to an important change in the handler <-> main process communication structure DClock revisions older than 1.7 are incompatible with this release. Delete the older files and terminate the clock process before you install the 1.12 update first! BACKGROUND: ----------- Who cares for clock utilities, really, who does? Well, I do. I needed one, but couldn't find anything suitable. The standard Workbench clock was a bit too big, Mclk slowed down system performance, TUC had far too many features (including occasional disk-thrashing), RSLClock was too large, so was MachII and DMouse intentionally didn't have any clock display. So, what was I up to do? Right, I programmed my very special creation, short, sweet and functional. FEATURES: --------- Since I have already cooked out my custom version of DMouse I didn't need any additional Mouse accelerator, so this one didn't get into it. What I needed were Date (including weekday) and Time. The most important question was: where to place the display? Since I have already tested mouse pointer clocks and my home brewn MouseClock program which features two sprites hovering at the right hand side of the mouse pointer, the answer could only be: put it on the Workbench screen. Remembering my experiences with ReadySoft's A-Max Apple MacIntosh Emulator the time display found its way to the right hand side of the Workbench title bar. The time string is updated each second. 'DClock' needs arp.library v39.1 ('DClock-Handler' doesn't) and can be made resident via the 'ARes' command. And as far as I am concerned, a memory usage bar can be quite a useful thing. Pressing RIGHT-AMIGA+HELP draws some memory statistics into the 'DClock' window (this nasty feature sneaked in in version 1.3, I can't be blamed for any consequences). Mclk uses about 10% of CPU time and about 16000 bytes of memory (that's almost as much as the standard Workbench clock consumes), MachII uses 4% of CPU time and 32000 bytes. 'DClock' only consumes between 1% and 3% of CPU time and requires only 10000 bytes of memory (well, became some more during the last revisions, didn't want to change the text, looks so impressive) - note that this also includes the keyboard click, the display beep, the memory display and the time string to be updated each second. INSTALLATION: ------------- Place 'DClock-Handler' in L:, 'DClock' in C: or SYS:, arp.library in LIBS:, type "DClock" to install, "DClock quit" to remove. Easy, isn't it? EXTRAS: ------- 'DClock' still isn't a pure Clock Utility. I was used to install a program called DisplayBeep in my Startup-Sequence script. This program spawns a process which replaces the DisplayBeep() function with a substitute which does not only flash the display but also beeps audibly. To save some memory the code of DisplayBeep.c has been incorporated into 'DClock-Handler.c'. I also added the Click.c code I had written back in October. Somebody asked me to add an alarm-clock function. Well, took me two hours to program it. USAGE: ------ To start simply type "DClock" (followed by none or more options) and press return. The main process will be "pulled up" almost instantly. Note: if ANYTHING goes wrong on this stage, "DClock" will stop at the point where "Installing DClock, " appears and nothing else will happen (the handler process has probably died). "DClock" will wait forever until you press CTRL-C. It will shut down and issue an error message. Now for the command line options. 'DClock' knows and handles the following: QUIT .................. Terminates the handler process and removes all loaded data. INFO .................. Gives some information on the current 'DClock' revision. BEEP ON/OFF ........... 'DClock' uses a modified DisplayBeep() routine which lets the usual display flash (e.g. after the CTRL-G signal) produce a brief beep as well as a flash. The beep can be turned off this way (default is on). CLICK ON/OFF .......... Each time a key is pressed a keyboard click is produced (very similar to the high quality style IBM-PC® keyboards). This feature can be turned off this way (default is on). CLICKVOLUME ........... The volume of the keyboard click can be adjusted between 0 and 64. (default is 64) PRIORITY .............. This determines the handler process priority. Any number between -127 and 127 will do. (default is 5) TEXTCOLOUR ............ The colour in which the 'DClock' time and memory display will appear can be adjusted this way. (default is 0) BACKCOLOUR ............ Same as above, but controls the background colour. (default is 1) ALARM ON/OFF/INFO ..... The alarm clock function is controlled by this function. It can be turned off and on. INFO displays the currently selected alarm time. (default is off) ALARMTIME HH:MM:SS .... The alarm time is adjusted via this option, note that the alarm itself must be turned on separately. (default time is 12:00:00) REFRESH ............... Will reposition the DClock display (vScreen users: after the screen size has been changed use this option to move the display). SETENV ON/OFF.......... Will write the day, date & time to Manx-type environment variables (DAY, DATE & TIME). This feature can be turned on and off. Default is on. QUIET ................. Suppresses all those neat information messages which are issued each time one of the abovesaid options is selected. Workbench users: 'DClock' can be started from Workbench! The following tooltype entries correspond to the approriate CLI options and have to appear in capital letters: BEEP,CLICK,CLICKVOLUME,PRIORITY,TEXTCOLOUR,BACKCOLOUR,ALARM,ALARMTIME, SETENV The expected arguments are the same as with the CLI options. CREDITS: -------- Credits go to ARP Programmers for the most recent version of ARP, to Matt Dillon for DMouse, to Mike Oldfield & Peter Norman for the keyboard click, to Mason/Waters/Wright/Gilmour/Parsons for the alarm clock sound, to John Hodgson for the beep and to Justin V. McCormick for the string formatting code. A special mention must also go to Bill Hawes, author of ARexx and to the authors of CygnusEd Professional 2 (Bruce Dawson & Colin Fox) whose programs both controlled the compiler runs. COPY FEE, AUTHORS REQUEST, ETC.: -------------------------------- If you like 'DClock' and wish to contribute any money I urge you to send at least 5$ to... Amnesty International P.O. Box 37137 Washington D.C. 20013 I suppose Amnesty International can make better use of the money than I can. Even the smallest contribution makes sense. I don't care what happens to 'DClock' and 'DClock-Handler', copy them, sell them, delete them, they are meant to be PUBLIC-DOMAIN. But don't 'fleece' other users for them. Permission to redistribute the documentation, the source code and executable files granted as long as the body of this document is left intact. - I have tried to make 'DClock' as flexible as possible. The rendezvous data is easily to be extended. I encourage you to add whatever feature you want. I only ask you to send me a copy of your custom version of 'DClock'. The future of this tool depends on you, spread the word and also the disk! My address is: Olaf Barthel Brabeckstrasse 35 D-3000 Hannover 71 Federal Republic of Germany REVISION HISTORY (most recent change first): -------------------------------------------- V1.12 I 'ripped' the PopRequest routine from my programmers' library (mxm.library) and integrated it into the DClock.c code. This will display real error messages ever so often the Workbench tool info parsing routine stumbles upon an error. Note also: I've quit the Electronic Design Hannover team and the copyright changes to MXM. A note on the code (whoops, it rhymes!): the pop-up requester part may be incorporated into any program which has any need of it. If the CED Professional update had reached us earlier the req.library pop-ups would have been employed instead of my requesters. It's too late now, I don't want to change the code any more and anyway: some of you might think that 30 libraries (that's as much as there are in my LIBS: drawer) are enough and will prefer to use the non-library code instead. V1.11 Wow! The display found its way back to the Workbench title bar -> with the fastest refresh scheme possible. This is done via rendering into an invisible RastPort; this image is transferred to the Workbench bar layer. Now also included: display will move to the left hand of the screen depth arrangement gadgets after the REFRESH option is selected. V1.10 Better Workbench support added (older revision preferred to crash too often and didn't notice if Workbench was re-opened after closing the last custom screen). DClock window will auto-adjust its position to appear at the left hand side of the screen depth arrangement gadgets (a special gift for overscanned Workbench screens - merry Christmas, it's the 22nd of December 1989!). V1.9 Full Workbench support added (oh boy, I am tired!). I will try to supply a neat icon to get it working. V1.8 CloseWBench()/OpenWBench() support available now! 'DClock' will close its window just in time to allow the Workbench screen to be closed. It will re-open its window as soon as the Workbench screen has successfully been re-opened. New for single-bitplane Workbench (soon to come in Kickstart 1.4): memory gauge will display a shaded bar instead of an orange one. V1.7 Some cosmetical changes, no spectacular work done; well, except for the small bug fix in the alarm routine (alarm only worked if time display was active). Docs partly rewritten, cleaned up some code. Important: added new DSeg entry: RingBack -> no downward compatibility with older 'DClock' revisions guaranteed anymore (sorry, but this was absolutely necessary). V1.5 Added a most unnerving alarm clock function: the display vibrates, a bell is ringing ... what can it be? Probably 'DClock' trying to wake you up. V1.4 Fixed bug in time signal routine (didn't update if seconds were reset to a point of time already passed), added status line information, corrected exit() calls in 'DClock'. V1.3 Played around with a taller custom font (saw Kickstart 1.4 alpha 15 and noticed that the Workbench status line became longer overrriding the 'DClock' display). The font didn't get into it. Added a numeric memory display. V1.2 Thought of incorporating the code of Click and DisplayBeep into 'DClock' and added them. Also stumbled upon my old MemGauge program and added a memory gauge display. V1.1 Added ARP interface, replaced standard DOS calls with ARP calls, removed the clock display from the barlayer (always crashed after a call to CloseWorkBench()), added weekday conversion and command line options. V1.0 Simple ('dumb') backdrop clock with date and time display to be rendered directly into the Workbench bar layer. * Do only its possibilities make it an Amiga? WHERE IS THE MAGIC ??? P.S.: Lattice, where is the 5.04 compiler update we are waiting for?