[comp.sys.amiga] PopCLI Fade

bilbo@pnet02.CTS.COM (Bill Daggett) (10/10/87)

I've been using PopCLI for some time and am curious to know if it would be
possible for the screen to fade rather then pop?  Also, I do not know how to
reach the author - who's name escapes me now (that doen't help much does it?).
I am not a hacker and I don't call long distance.  Perhaps someone saying "no,
it is not possible" will suffice...


UUCP: {hplabs!hp-sdd!crash, seismo!scgvaxd!cadovax}!gryphon!pnet02!bilbo
INET: bilbo@pnet02.CTS.COM

*Bilbo*
(Recombinant Hobbit)

UH2@PSUVM.BITNET (Lee Sailer) (10/12/87)

In article <1852@gryphon.CTS.COM>, bilbo@pnet02.CTS.COM (Bill Daggett) says:
>
>I've been using PopCLI for some time and am curious to know if it would be
>possible for the screen to fade rather then pop?  Also, I do not know how to
     
I saw on a Mac the other day a neat screen fader.  Rather than a totally
blank screen, it faded to what looked like a view out of the port of a
ship sooming thru space.
                               lee
     

gmg@yendor.UUCP (Gary Godfrey) (10/12/87)

In article <1852@gryphon.CTS.COM>, bilbo@pnet02.CTS.COM (Bill Daggett) writes:
> I've been using PopCLI for some time and am curious to know if it would be
> possible for the screen to fade rather then pop?  Also, I do not know how to
> reach the author - who's name escapes me now (that doen't help much does it?).
> I am not a hacker and I don't call long distance.  Perhaps someone saying "no,
> it is not possible" will suffice...
> 

I seem to remember somewhere in the documentation that they just created
a single bit plane that was black and covered the screen with it.  I'm not
gonna say "no, it is not possible", but their current method won't do it.




No!  The cat is NOT made of velcro!

Gary Godfrey - ACT, Reston, VA			Phone:		(703)471-9433
UUCP: ..!mimsy!{prometheus,hqda-ai}!yendor!gmg

guilford@csv.rpi.edu (Jim Guilford) (10/12/87)

In article <1852@gryphon.CTS.COM> bilbo@pnet02.CTS.COM (Bill Daggett) writes:
>I've been using PopCLI for some time and am curious to know if it would be
>possible for the screen to fade rather then pop?  Also, I do not know how to
>reach the author - who's name escapes me now (that doen't help much does it?).
>I am not a hacker and I don't call long distance.  Perhaps someone saying "no,
>it is not possible" will suffice...
>
>
>UUCP: {hplabs!hp-sdd!crash, seismo!scgvaxd!cadovax}!gryphon!pnet02!bilbo
>INET: bilbo@pnet02.CTS.COM
>
>*Bilbo*
>(Recombinant Hobbit)

As far as I can remember, the code creates a tall but narrow screen which
overlays all the other screens. It is only one bit deep and is set to black.
Then the program turns off the DMA to free up as much time for the CPU as
possible. In order to do a fade, one would have to create a set of screens
(one for each screen being displayed), copy the currently displayed image
onto the new screen, and then fade it. Then to unfade it, it would have to
copy the new version of the other screens (remember that output continues
while faded) to the top screen, quickly unfade it, and then remove the new
screens. All in all, it would be very messy.
One might try playing with the color registers directly, but then if the
user's programs diddled with them during a fade you would have a mess.
Due to the versatility of the amiga, I don't think it is easily possible.

--JimG
(guilford@csv.rpi.edu)

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (10/14/87)

In article <106@rpicsb8> guilford@csv.rpi.edu (Jim Guilford) writes:
>In article <1852@gryphon.CTS.COM> bilbo@pnet02.CTS.COM (Bill Daggett) writes:
>>I've been using PopCLI for some time and am curious to know if it would be
>>possible for the screen to fade rather then pop?  [ ... ]
>
>In order to do a fade, one would have to create a set of screens
>(one for each screen being displayed), copy the currently displayed image
>onto the new screen, and then fade it. Then to unfade it, it would have to
>copy the new version of the other screens (remember that output continues
>while faded) to the top screen, quickly unfade it, and then remove the new
>screens. All in all, it would be very messy.
>One might try playing with the color registers directly, but then if the
>user's programs diddled with them during a fade you would have a mess.
>Due to the versatility of the amiga, I don't think it is easily possible.
>
	I read this, and my jaw sort of sagged.  Rather than make a humorous
personality-related comment that would instantly get misinterpreted, I'll
restrict myself to a practical solution.

	First off, find the topmost screen.  This can be discovered by:

	scr = IntuitionBase -> FirstScreen;

	Next, locate the screen's ViewPort structure:

	vp = &scr -> ViewPort;

	Once you have a pointer to the ViewPort, you can do all kinds of
neat things:

	extern long GetRGB4();
	for (i=0; i<16; i++)
		for (idx = 1 << ViewPort -> RasInfo -> BitMap; idx; idx--) {
			color = GetRGB4 (vp, (long) idx);
			r = (color & 0xf00) >> 8;
			g = (color & 0x0f0) >> 4;
			b = color & 0x00f;
			if (r)	r--;
			if (g)	g--;
			if (b)	b--;
			SetRGB4 (vp, (long) idx, (long) r, (long) g, (long) b);
		}

	This won't be a very pretty fade, but it'll fade.  And it wasn't all
that hard, either.  However, this code fragment does not address the problem
of what happens if a program is playing with the ViewPort's colors, too.
However, there are a multitude of ways around this, none of which are all
*that* messy.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Although there are technical differences between the quality of images
created on the Amiga and on our system, we feel that viewers could be misled
to believe otherwise, even with your disclaimers to the contrary."
		-- Ralph J. Guggenheim, Pixar

jdow@gryphon.CTS.COM (Joanne Dow) (10/15/87)

In article <4211@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>In article <106@rpicsb8> guilford@csv.rpi.edu (Jim Guilford) writes:
>>In article <1852@gryphon.CTS.COM> bilbo@pnet02.CTS.COM (Bill Daggett) writes:
>>>I've been using PopCLI for some time and am curious to know if it would be
>>>possible for the screen to fade rather then pop?  [ ... ]


>	This won't be a very pretty fade, but it'll fade.  And it wasn't all
>that hard, either.  However, this code fragment does not address the problem
>of what happens if a program is playing with the ViewPort's colors, too.
>However, there are a multitude of ways around this, none of which are all
>*that* messy.

As a matter of fact this can be used to advantage. you can use successive
GetRGB's to determine if your settings have been altered. If they have then
the program is active and some emergency restorative measures are inorder.
(At best just keep hands off.) In fact if you do periodic GetRGB's while
waiting for the inputevent timeout you can use that to reset the timeout as
well as an actual input event. it is a way of detecting screen activity.

What's really needed for Popcli and ScreenBlanker (cheath's) is a method for
detecting some common piece of screen activity and preventing the screenblanking
action whenever the screen is used as well as whenever the input is active.
Suggestions anyone?



-- 
<@_@>
	BIX:jdow
	INTERNET:jdow@gryphon.CTS.COM
	UUCP:{akgua, hplabs!hp-sdd, sdcsvax, ihnp4, nosc}!crash!gryphon!jdow

Remember - A bird in the hand often leaves a sticky deposit. Perhaps it was
better you left it in the bush with the other one.

toebes@sas.UUCP (John Toebes) (10/18/87)

In article <1852@gryphon.CTS.COM>, bilbo@pnet02.CTS.COM (Bill Daggett) writes:
> I've been using PopCLI for some time and am curious to know if it would be
> possible for the screen to fade rather then pop?  Also, I do not know how to
> reach the author - who's name escapes me now (that doen't help much does it?).
> I am not a hacker and I don't call long distance.  Perhaps someone saying "no,
> it is not possible" will suffice...
> *Bilbo*

Sure it is possible.  I have always avoided doing it because of the complexity
of getting it right with multiple screens and having to restore the palettes
correctly whenever an event comes in.  It is simple if you only have to deal
with a single screen, (gee, if we only had the limits of a MAC)
but when there are several screens visable at the same time it becomes fun.

One possibility I have toyed with is to have it blank the screen by
pulling down a 'night shade' complete with draw string.  When you unblanked, it
would roll back up and flap a while.  The big thing that has kept me from
doing that is the size.  Seems everyone wants me to put in more features
AND make it saller at the same time....
By the way, the name is 'John Toebes' (or The Software Distillery if you are 
interested in the company).

--
 |_o_o|\\   John A. Toebes, VIII       usenet:..mcnc!rti-sel!sas!toebes
 |. o.| ||
 | .  | ||  Coordinator of ...
 | o  | ||    The Software Distillery
 |  . |//     USnail: 235 Trillingham Ln, Cary NC 27511
 ======       BBS: (919)-471-6436

andy@cbmvax.UUCP (Andy Finkel) (10/20/87)

In article <26@yendor.UUCP> gmg@yendor.UUCP (Gary Godfrey) writes:
>In article <1852@gryphon.CTS.COM>, bilbo@pnet02.CTS.COM (Bill Daggett) writes:
>> I've been using PopCLI for some time and am curious to know if it would be
>> possible for the screen to fade rather then pop?  Also, I do not know how to

After you add the fade (trivial to do, btw) if you've got background
functions running (like, oh, a Kermit server), and you have a program
in the foreground that opens a 640x400x4 or 320x200x5 screen
do the background program(s) a favor and open a single bit plane
black screen in front.  Then they will get more time, as the
custom chips can sit back and coast.

-- 
andy finkel		{ihnp4|seismo|allegra}!cbmvax!andy 
Commodore-Amiga, Inc.

"Interfere?  Of course we'll interfere.  Always do what you're best at,
 I always say."

Any expressed opinions are mine; but feel free to share.
I disclaim all responsibilities, all shapes, all sizes, all colors.

bryce@hoser.berkeley.edu (Bryce Nesbitt) (10/20/87)

In article <1916@gryphon.CTS.COM> jdow@gryphon.CTS.COM (Joanne Dow) writes:
>In article <4211@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>>In article <106@rpicsb8> guilford@csv.rpi.edu (Jim Guilford) writes:
>>>In article <1852@gryphon.CTS.COM> bilbo@pnet02.CTS.COM (Bill Daggett) writes:
>>>>I've been using PopCLI for some time and am curious to know if it would be
>>>>possible for the screen to fade rather then pop?  [ ... ]
>
>What's really needed for Popcli and ScreenBlanker (cheath's) is a method for
>detecting some common piece of screen activity and preventing the
>screenblanking action whenever the screen is used as well as whenever the
>input is active.
>Suggestions anyone?

Yes.  Don't do that.  Or if you do, don't give me a copy. :-)


Seriously, the screen blanker I would like to use would fade the frontmost
screen's viewport's colors to or from black on command.  It would then
build the tiny low res one bitplane black screen in front.

You must use LockIBase(0L); while mucking with the viewport, and when
you fade it back up LockIBase(), then scan the list to make sure it
is *still* a viewport.  (damn, why are windows, screens and tasks
not serialized!!)  This should work without problems, but remember the advice
is worth what you paid for it. :-)

Blanking would happen after an interval of no input.device activity, 30
seconds or so default.  If I wanted to read a screen without disruption I'd
move the mouse to the bottom right corner; this would up the interval to say,
2 hours default.  If the mouse was shoved to the upper left drop the
default to about 2 seconds.

The bouncing clock, or checkmark on the blanked screen is nice, but make
it a sprite, and an option.


|\ /|  . Ack! (NAK, SOH, EOT)
{o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce
 (") 	The CBS nightly news:
  U	Dan Rather, paraphrased: "Mr. Analyst, do you think we will continue
	to see a drop in the market like today's?"
	Market Analyst: "Well, that can only happen for three more days."