[comp.sys.apple2] 8-bit screen blanker

ART100@psuvm.psu.edu (Andy Tefft) (10/08/90)

(Scott suggests interrupts from a clock card...)

Well I'm doing this on a //c so that's kind of out, although
I was planning on making it work with 'vblclock' anyhow (which
I know doesn't always run). Maybe I'll see how useful the basic.system
version is first.

The main idea of this is to grab the kb input vector first and
save the time each time a key is pressed. Then at every interrupt
it checks the time and if the time since last keypress is greater
than some interval n, the current text screen is saved (and
switched to in case a graphics program is running) and then blanked.
I'll put some fancy little doojiggy in there so you can tell that
you can press a key to continue, maybe a bouncing clock. Then you
will hit a key to resume what you were doing. My first impression
is that I can't tell whether the person was looking at hi-res,
lo-res, 40-col text, etc. so I'll let them cycle through the modes
and select the one they want.

I guess the program should keep running "in the background"
while the screen is blank, till it stops when it wants a keypress.
The keypresses needed to restore the screen will not be passed
to the program (as it is with other screen blankers i've seen).

This will of course be limited to programs which work with vblclock
and use ksw for input.

The problem then is how do you tell when the last user activity
was, if the program doesn't use ksw for input?

alfter@uns-helios.nevada.edu (SCOTT ALFTER) (10/09/90)

In article <90281.104905ART100@psuvm.psu.edu> ART100@psuvm.psu.edu (Andy Tefft) writes:
>will hit a key to resume what you were doing. My first impression
>is that I can't tell whether the person was looking at hi-res,
>lo-res, 40-col text, etc. so I'll let them cycle through the modes

Why not?  The technical reference manuals for the various Apple IIs always
list three memory addresses for softswitches:  set, reset, and read (where
the status of the switch is in the high bit).  I'm on campus right now, 
though, so I can't look up the addresses, but I'll do that when I get home
and post them here.  (No, going home won't mean a long time from now. :-) )

-------------------------------------------------------------------------------
Scott Alfter                             _/_
                                        / v \ Apple II:
Internet: alfter@uns-helios.nevada.edu (    ( the power to be your best!
   GEnie: S.ALFTER                      \_^_/

jh4o+@andrew.cmu.edu (Jeffrey T. Hutzelman) (10/09/90)

Andy,
	Besides checking for user activity through KSW, also watch the keyboard
latch directly (just don't do anything to it).  This will get you around
the problems that you'll otherwise get if you ignore the fact that many
programs look at $C000 directly.
-----------------
Jeffrey Hutzelman
America Online: JeffreyH11
Internet/BITNET:jh4o+@andrew.cmu.edu, jhutz@drycas.club.cc.cmu.edu

>> Apple // Forever!!! <<

bchurch@oucsace.cs.OHIOU.EDU (Bob Church) (10/09/90)

In article <90281.104905ART100@psuvm.psu.edu>, ART100@psuvm.psu.edu (Andy Tefft) writes:
> 
> I guess the program should keep running "in the background"
> while the screen is blank, till it stops when it wants a keypress.
> The keypresses needed to restore the screen will not be passed
> to the program (as it is with other screen blankers i've seen).
> 
 
I can't give you any help but perhaps a little encouragement. Ultramacros
(or is it the basic Timeout series ) gives this option on a //c. I've used
it on mine. If a key hasn't been pressed for x amount of time the screen 
goes blank until a key is pressed. The documentation doesn't call for a 
clock card so I assume that it will work without one.
I thought you'd like to know that it *can* be done on an 8 bit //,
I just don't know how.

bob church
bchurch.oucsace.cs.ohiou.edu

ART100@psuvm.psu.edu (Andy Tefft) (10/09/90)

In article <2106@unsvax.NEVADA.EDU>, alfter@uns-helios.nevada.edu (SCOTT ALFTER)
says:
>
>
>Why not?  The technical reference manuals for the various Apple IIs always
>list three memory addresses for softswitches:  set, reset, and read (where
>the status of the switch is in the high bit).  I'm on campus right now,

Must be nice to have these manuals! My only technical manual is from
][+ days and only has SET addresses... set text, set graphics,
set page 1, set page 2, etc. Are there similar locations
for the 80-col settings?

ART100@psuvm.psu.edu (Andy Tefft) (10/09/90)

In article <4b4CKGa00VokM531dV@andrew.cmu.edu>, jh4o+@andrew.cmu.edu (Jeffrey T.
Hutzelman) says:
>
>Andy,
>        Besides checking for user activity through KSW, also watch the
>keyboard
>latch directly (just don't do anything to it).  This will get you around
>the problems that you'll otherwise get if you ignore the fact that many
>programs look at $C000 directly.

I thought about that but what are my chances of noticing every
keystroke? If I miss even one (the one that has a 9 minute paus before it)
I will blank the screen prematurely.

alfter@uns-helios.nevada.edu (SCOTT ALFTER) (10/10/90)

In article <2062@oucsace.cs.OHIOU.EDU> bchurch@oucsace.cs.OHIOU.EDU (Bob Church) writes:
>I can't give you any help but perhaps a little encouragement. Ultramacros
>(or is it the basic Timeout series ) gives this option on a //c. I've used

It also works on the IIe.  All UltraMacros does (I think) is replace the normal
keyreading code in AppleWorks with its own, which makes the job of making a 
screen blanker much easier--after x-number of cursor blinks, blank the screen.

-----------------------------------------------------------------------------
Scott Alfter                             _/_
                                        / v \ Apple II:
Internet: alfter@uns-helios.nevada.edu (    ( the power to be your best!
   GEnie: S.ALFTER                      \_^_/