home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
screen
/
hercsv20.arc
/
HERCSAVE.DOC
< prev
next >
Wrap
Text File
|
1989-07-10
|
13KB
|
281 lines
HERCSAVE 2.0
Hercules Graphics Card (tm) Screen Blanker
----------------------------------------------------------------------
(C) Copyright 1988,89 - Benjamin Diss/The Smart Solutions Group
Limited permission is granted to individual users for product
evaluation and testing. Continued use of this shareware program
requires registration as described later in this document.
All other rights are explicitly reserved by the author.
-- INTRODUCTION ------------------------------------------------------
Images that appear on a computer monitor for an extended period of
time may burn the display phosphors. This causes permanent damage to
the monitor and severely limits it's life span. After continual
damage the monitor eventually becomes useless.
To eliminate this problem, programs have been developed that observe
the computer system and blank the screen under certain conditions.
These programs install themselves in memory and monitor keyboard
activity. When there is no activity for a predetermined amount of
time, they blank the screen, assuming that the user has no immediate
need for it. These programs work fine for IBM compatible video
systems, however they do not work for Hercules video cards.
When Hercules designed the original monochrome graphics card, there
was no IBM standard to follow. It was not possible for Hercules to
build an IBM compatible monochrome graphics card. Therefore, the IBM
BIOS does not support the Hercules Graphics Card (HGC) and normal
screen blankers do not work properly.
HERCSAVE recognizes the limitations of the HGC. It does not rely on
any IBM BIOS or DOS functions. It programs the HGC's hardware
directly allowing it to safely blank and restore the screen in both
text and graphics modes.
-- SYNTAX ------------------------------------------------------------
HERCSAVE operates by monitoring the keyboard. After a specified
period of inactivity the program will blank the screen. Any keypress
will then restore it.
Syntax: HERCSAVE /Tseconds [options]
/t TIME before screen blanks in seconds. This option must be
specified to install the program as there is no default. To
disable time-out blanking specify zero by entering /T0.
/h HOT-KEY to force blank where:
1=Right Shift
2=Left Shift
4=CTRL
8=ALT
Select any combination of these toggle (shift) keys by adding
the desired codes together. The default is <ALT><Left Shift>
or /H10. To disable hot-key forced blanking specify zero by
entering /H0.
/o OPTIONAL retrace screen blanking method. The default method
is vertical size modification.
/u UNINSTALLS or removes the program from memory.
The TIME and HOT-KEY options may be changed after the program is
loaded. This allows the temporary disabling of HERCSAVE for
conflicting programs.
For example, "HERCSAVE /T300 /H3" would install HERCSAVE to blank
after about 5 minutes of keyboard inactivity, and would allow a forced
blank by pressing <LSHIFT><RSHIFT>. HERCSAVE would blank and restore
by modifying the vertical size register.
HERCSAVE is a well behaved resident program so it can be loaded in any
order with other resident programs. However, if you plan to uninstall
HERCSAVE it must be the last resident loaded that uses the keyboard
and timer interrupts.
HERCSAVE redirects only two interrupts and uses minimal memory by
releasing the environment space before going resident. Version 2.0
requires only 512 bytes of resident memory for the default blanking
method and 592 bytes for the optional retrace method.
-- COMPATIBILITY -----------------------------------------------------
Since HERCSAVE uses hardware instructions specific to the Hercules
Graphics Card, it tests for true compatibility. If it determines that
the active video card is not an HGC it tells you so and exits.
If the card responds correctly, HERCSAVE makes two more tests. These
tests ensure that the card will be able to properly report the video
mode. The program tests the responsiveness of the light pen
registers. HERCSAVE uses these registers to determine the number of
pixels currently being displayed. This number then indicates whether
the video mode is text or graphics.
If either of these two tests fails, HERCSAVE reports and error and
continues with the installation process. Be aware that if your card
doesn't support these registers, graphics mode programs may not
restore correctly.
-- TECHNICAL ---------------------------------------------------------
The screen can be blanked and restored using two methods. The default
is to set the vertical size to zero to blank and restore the size to
restore the screen. The optional method turns the retrace off to
blank and on to restore the screen.
- Vertical size blanking -
The vertical size method works best because it is simpler, more
reliable, and uses less resident memory than the retrace method.
To blank using the vertical size method, HERCSAVE tells the HGC
hardware to display the screen with zero lines. This makes the screen
appear blank. To restore, HERCSAVE determines if the video mode is
text or graphics. It then tells the HGC to display the screen with
the appropriate number of lines based on the current mode.
The only limitation to this method is that on some systems when the
screen blanks, the top row of pixels continues to be displayed. This
is a very minor flaw in the hardware of your card and is only a
cosmetic limitation.
- Retrace blanking -
The retrace method is more difficult. To blank the screen HERCSAVE
tells the HGC to turn off the light gun (in the monitor). This blanks
instantly, without leaving a line remaining at the top of the screen.
Restoring is much more complicated. To do this HERCSAVE first
determines the video mode. If the HGC is in graphics mode, it must
next determine the active video page.
It needs the active video page to properly set the Video Mode Control
Port. This port controls many of the hardware features of the HGC.
Unfortunately, it is limited to "write only" and cannot be "read"
from. Therefore, the active video page must be determined by some
other method.
Fortunately, Microsoft has established a solution with its mouse
driver. Graphics based programs that support a Microsoft compatible
mouse must update the Video BIOS Data Area when they change to
graphics mode. This allows the mouse driver to determine the active
video page so that it may display the mouse pointer. Since it is not
possible to determine the active video page any other way, HERCSAVE
checks this area and uses the value it finds.
It then calculates the proper Video Mode Control Byte and sends it to
the port to turn the light gun on.
If, when attempting to restore in graphics mode, the screen appears in
random blocks and shapes it can be assumed that your application does
not update the Video BIOS Data Area. If this is the case with your
system, it probably would be best to use the vertical blanking method.
- Vintage equipment -
Early in 1983, when Hercules first released their monochrome graphics
card, some people tried to use normal MDA (IBM monochrome text) screen
blankers to save their monitors. Some of these people reported that
their monitors were destroyed when these programs attempted to restore
in graphics mode. Unless you are using some VERY old equipment this
anomaly should be of no concern to you.
These monitors were damaged because they could not support some higher
display bandwidths and the HGC could not properly report its current
mode. These programs that caused the damage used a retrace blanking
method similar to HERCSAVE. The difference is that HERCSAVE uses
different routines to detect the current video mode.
HERCSAVE has been distributed for about 14 months. I have not
received one complaint that it has caused any damage to any system.
There is no reason to believe that HERCSAVE's retrace blanking
routines may cause damage to your monitor unless it was manufactured
before 1984. If you are using vintage equipment then do not use the
retrace method. The vertical size method (the default) is safe to use
for all equipment.
- Virus Detection -
HERCSAVE attempts to detect if a virus or unwanted hacker has altered
the program. It does this by comparing its file image with a 32-bit
CRC value calculated when the program was compiled. If a change is
detected HERCSAVE tells you so and exits.
If you receive a copy of the program that will not run because of
this, please contact me at the address below and tell me where you
obtained the program. I will ensure that the BBS or distributor is
provided with a valid copy.
-- HISTORY -----------------------------------------------------------
7-10-89 Released version 2.0.
7-9-89 Elaborated on the technical notes in the documentation.
6-9-89 Did some additional checking for the current video page in the
retrace method restore procedure. In well behaved
applications this should help to restore properly.
6-8-89 Squashed a major bug in the logic of the mode detection
routine. This bug caused some graphics screens to restore
only the top third of the screen and some text screens to
restore with scattered garbage.
Changed from 16 bit port writes to 8 bit. Some clone cards
did not respond well to the more efficient 16 bit writes.
5-5-89 Enhanced the documentation, the status messages, and the logic
of the install functions.
4-24-89 Changed the time before blank command line option, added the
uninstall command, and changed the organization of routines in
the resident segment. This reorganization resulted in lower
memory requirements for users of the vertical size blanking
method.
4-20-89 Added the user-specified HOT-KEY.
4-2-89 Version 1.3 introduces SafeWare! HERCSAVE now checks its file
image against a pre-calculated 32 bit CRC. This warns of
viral infection.
Elaborates on the light pen register tests and no longer
aborts after failing.
3-4-89 Version 1.2 fixed a bug in the hot key routine (thanks to John
Lin) that caused some toggle keys (Ctrl, Shift, etc.) to
appear "stuck" after restoring.
Added test to check for proper light pen register responses.
12-8-88 1.1a changed the default blanking method to 'vertical size'.
5-10-88 Initial release of Version 1.0
-- REGISTRATION AND DISTRIBUTION -------------------------------------
This program is shareware. You are encouraged to share and distribute
copies of this program free of charge provided the distribution file
is kept intact and all files are unaltered. If you find HERCSAVE
useful and intend to use it then please register your copy.
For only $15.00 you can help support the shareware concept. By doing
so, you allow me to develop and enhance HERCSAVE. Each successive
version that I have released has been based on the comments of
registered users. $15.00 is not a lot to ask, considering what it
will save you in the life of your monitor and the time and effort I've
spent developing it.
See the file ORDER.FRM for additional information on registration.
Any comments, either good or bad, are welcome. Please write, E-Mail,
or call if I can be of any assistance.
Benjamin Diss
The Smart Solutions Group
5800 Oakwood Drive
Suite 1B
Lisle, IL 60532
(312) 963-7975
CIS# 71270,341
Hercules, Hercules Graphics Card, and HGC are registered trademarks of
Hercules Inc.
IBM is a registered trademark of International Business Machines Inc.