[comp.sys.atari.st] IDLE - replaces NITE

braner@batcomputer.tn.cornell.edu (braner) (12/13/87)

[]

A long time ago the utility "NIGHT" was posted.  It blanked the screen
after a few minutes with no activity, and unblanked it upon a keypress
or a mouse movement or BIOS text output to the screen.

NIGHT had serious bugs.  NITE fixed some, but it blanks the screen by
the same method: switching to external video sync.  If there are no
external sync signals, there are no vertical blanks, no picture---and
no VBL interrupts.  But many operations in the ST rely on those VBL
interrupts.  Leaving the ST on for long periods with NIGHT active leads
to strange behavior and a need for a reboot.

Here is IDLE, an alternative to NITE.  It should not cause any problems,
since all it does is shift the video RAM pointer 32K below the normal
location.  Since that area is normally all zeros, setting the video
palette right will display it as all black.  IDLE checks to see that
that piece of RAM is all zeros, and if it is not, it leaves the video
pointer as it was, and reverses the colors instead.  The check for
nonzeros is done slowly, so strange things _might_ show on the screen
for up to 20 seconds.  But not to worry: IDLE does _not_ write to the
video RAM.

I have only tested IDLE with a monochrome monitor, but it is supposed
to work with color too.

- Moshe Braner

---------------------- cut here --------------------
begin 644 idle.prg
M8!H   (,                             &   1))1$Q%     $CG@(!*z
M>0   0!F2D'Z .A3D&I",_P  0   0!!^() ,]    $,2GD   $(9P1&4& Dz
M0E!!^(( $"@  >%($"@  S/    !"C Z +@10  #X$@10  !0?H HC 0:@I"z
M>0   0@P/'T 44 P@"!Z )9*L   9@9*L  $9Q)A2#/\?0    $&,_P  0  z
M 0A,WP$!+SK_:$YU241,10     O # O  H,0  #9@)A&" ?+SK_ZDYU241,z
M10    !A!B\Z__A.=4IY   ! &<:,#H +A' @@/@2!' @@$Q^@ B@D!">0  z
M 0 C_   C*    $"3G4     C*                   $AZ #0_/  F3DY<z
MCTAZ )P_/  )3D%<CW(*</]1R/_^4<G_^$'Z_]J1[P $0F<O"#\\ #%.04* z
M0?B" ! H  'A0! H  ,$0 " ,\    $.X8 CP    1 @> $8#*A)1$Q%__AGz
M'G "DH%!^@ :(G 8 "1P& PF<!@8))$BBUB!4<C_[$YU    M    1@   $4z
M    J    ,8    (    K    ,H    ,#0H)241,13H@=&AE($-25"!P<F]Tz
M96-T;W(-"@D@(" @8GD@36]S:&4@0G)A;F5R#0H)=F5R<VEO;B Q+C @+2!Iz
C;G-T86QL960-"@H     $A(*!AP<(@@^' IF"#X$! 0$!   z
 z
end

wilhite@usceast.UUCP (Robert Wilhite) (12/15/87)

>Here is IDLE, an alternative to NITE.  It should not cause any problems,
>since all it does is shift the video RAM pointer 32K below the normal
>location. . . .

Wouldn't it be easier just to save the palate values and set them ALL
to black (000) ?   Then a keypress could cause the old values to be
restored.  This (it seems to me) would always work.  Color or Mono.
No moving the video RAM pointer.  No need to check 32K for zeros.

...or am I forgetting something?
-- 
--------------------------------
Robert Wilhite
UUCP:	..ncrcae!usceast!wilhite
CSNET:	wilhite@cs.scarolina.edu

tainter@ihlpg.ATT.COM (Tainter) (12/17/87)

In article <2478@usceast.UUCP>, wilhite@usceast.UUCP (Robert Wilhite) writes:
> >Here is IDLE, an alternative to NITE.  It should not cause any problems,
> Wouldn't it be easier just to save the palate values and set them ALL
> to black (000) ?

> ...or am I forgetting something?
You are forgetting that with mono it doesn't really use the color pallette
all it checks is the first pallette color for whether to invert the screen.

> Robert Wilhite

pes@ux63.bath.ac.uk (Smee) (12/17/87)

Well, watching a (known) video buffer allows you to magically bring the screen
back to life when you get new output from the computer, as well as when you
press a key.  I can see that whether this extra 'feature' is useful or
desirable depends on how you use the machine, and for what.  Still, it *is*
an extra capability that simply sitting on the palette and watching for
keypresses won't cover.

ljdickey@water.waterloo.edu (Lee Dickey) (12/21/87)

In article <4495@ihlpg.ATT.COM> tainter@ihlpg.ATT.COM (Tainter) writes:
]In article <2478@usceast.UUCP>, wilhite@usceast.UUCP (Robert Wilhite) writes:
]> >Here is IDLE, an alternative to NITE.  It should not cause any problems,
]> Wouldn't it be easier just to save the palate values and set them ALL
]> to black (000) ?
]
]> ...or am I forgetting something?
]You are forgetting that with mono it doesn't really use the color pallette
]all it checks is the first pallette color for whether to invert the screen.

I think this must be the mistake that Megmatic made. 
The screen should go black, but in fact it goes to reverse video.

-- 
 L. J. Dickey, Faculty of Mathematics, University of Waterloo. 
 ljdickey@watmath.UUCP		UUCP: ...!uunet!watmath!ljdickey
 ljdickey%water@waterloo.edu	ljdickey@watdcs.BITNET		
 ljdickey%water%waterloo.csnet@csnet-relay.ARPA