[comp.sys.amiga.tech] BltBitMap

WTW101@PSUVM.BITNET (Bill Warner) (08/10/89)

I am copying a portion of a screen by first finding the BitMap structure of the
active screen and then Bliting it wo my own BitMap structure. I have a few
questions:

   (1) Is the function BltBitMap syncronous or asyncronous?   Does it call
       WaitBlit?

   (2) Assuming the screen I am copying is not static, would it be proper to
       call Disable() or  Forbid() ?

   (3) When the OS is writing to the blitter, does it turn off interrupts?

I am afraid of the following:  I call Disable, then BlitBitMap.  But just
before I call Disable, some task starts to use the Blitter.  Now when I call
BlitBitMap it waits for another task to complete its blitter operation (which
will never happen).

                                       Chris

                                       CJC@psuecla (bitnet)

rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (08/11/89)

WTW101@PSUVM.BITNET (Bill Warner) writes:
>    (1) Is the function BltBitMap syncronous or asyncronous?   Does it call
>        WaitBlit?

It's syncronous in that it starts by the time the call returns, but it's
async in that it isn't necessarily finished by that time . . .

>    (2) Assuming the screen I am copying is not static, would it be proper to
>        call Disable() or  Forbid() ?

Not to my knowledge.

>    (3) When the OS is writing to the blitter, does it turn off interrupts?

No, not to my knowledge.

> I am afraid of the following:  I call Disable, then BlitBitMap.  But just
> before I call Disable, some task starts to use the Blitter.  Now when I call
> BlitBitMap it waits for another task to complete its blitter operation (which
> will never happen).

Your fears are grounded.

-tom

jesup@cbmvax.UUCP (Randell Jesup) (08/12/89)

In article <11248@polya.Stanford.EDU> rokicki@polya.Stanford.EDU (Tomas G. Rokicki) writes:
>WTW101@PSUVM.BITNET (Bill Warner) writes:
>>    (2) Assuming the screen I am copying is not static, would it be proper to
>>        call Disable() or  Forbid() ?
>
>Not to my knowledge.

	What you want to do is lock the layers associated with that screen.
Read the chapter on layers in the RKM.

	You should NOT do a disable or forbid.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"