🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #8485

Re: Frienndly waiting (not hogging the CPU) [WaitTOF???]

#8485
From: Doug Merritt
Date: Wed, 13 Apr 1988 21:16
33 lines
2164 bytes
In article <2814@crash.cts.com> haitex@pnet01.cts.com (Wade Bickel) writes:
>        Hmm,  Does WaitTOF() free the CPU for other tasks?  I never use it.

Yes. Although FYI WaitBOVP() busy-waits. (This is from Jim Mackraz,
who gave a talk recently at BADGE).

The overhead mentioned in a previous posting was the loop *around*
WaitTOF(): "for(i=0;i<60;i++) WaitTOF();" Granted it's not *too* much,
although note that the context switch overhead dwarfs the few instructions
that implement the loop. Delay(50) is more to the point. Also more
accurate over an extended period of time, if that matters.

>      If you can arrange to never be drawing into the current displayed bitmap
>      you should never need it, which is what I do.

Jim talked a lot about this. His recommendation for taking advantage of
available bandwidth in the vertical retrace was to use copper interrupts
to signal your task to wake up near the bottom of the frame. He has some
example code that he's polishing, he's giving a talk at Devcon on this,
and will make a full release after the talk. It shows what amounts to
the "best" way to do double buffering to take maximum advantage of the
Amiga's architecture. It also shows all kinds of great stuff about
transparently turning Intuition on and off, using fancy copper stuff
without destroying the system software, etc.

>        PS: If Delay() does indeed cause damage to disks if a 0 is passed
>              wouldn't it make sense to either not use it or encapuslate
>              it within a procedure which ensures a non-zero input?

Sounds good to me!

	Doug Merritt		doug@mica.berkeley.edu (ucbvax!mica!doug)
			or	ucbvax!unisoft!certes!doug
Technical Details
Message-ID: <8698@agate.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!agate!eris!doug
References: <2814@crash.cts.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!agate!eris!doug
From: doug@eris (Doug Merritt)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Frienndly waiting (not hogging the CPU) [WaitTOF???]
Message-ID: <8698@agate.BERKELEY.EDU>
Date: 13 Apr 88 21:16:49 GMT
References: <2814@crash.cts.com>
Sender: usenet@agate.BERKELEY.EDU
Reply-To: doug@eris.berkeley.edu (Doug Merritt)
Organization: University of California, Berkeley
Lines: 32