🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Blitter twiddling questions (kinda long)

#2060
From: Brewski Rogers
Date: Thu, 09 Nov 1989 20:12
48 lines
3106 bytes
In article <6344@cbnewsm.ATT.COM> nsw@cbnewsm.ATT.COM (Neil Weinstock) writes:
>Hi, y'all.  I'm playing with the blitter (directly) for the first time,
>and there's a few things I'm unclear on.
>
>First, how long is OK to own the blitter?  I don't want to be unfriendly.
as long as you want. Of course, nothing else will get blitted while you own
it. It's always good to avoid doing printf's while you have control,
since your code will lock up.

>
>Next, what is the best way to set up the blitter to either clear a bitplane
>or set it to all ones?  If I turn off all the sources, what gets written
>to the destination?

All the source registers have a temporary word that the data gets read
from. You can set this word yourself if you have the source off.
set the a data register to all 1 or 0, then run the blit with no sources.
should be pretty quick. 4 cycles per word I think.

>
>Finally, for source A I want the equivalent of a 1-bit shift to the left,
>and there will be an unshifted B and C source and destination.
>of the blit area by one.  My problem arises when considering the boundary
>conditions.
>like B, and I will be writing into the -1'st word in a bitplane, a word
>that I have not allocated.  No good.  I could overallocate the bitplane,
>but it seems like there should be another way.

With all this bit shifting, you'll probably want the cookie-cut mask,
$c8 (i think) With this, it is possible to mask out the data that would have
written to location -1. Actually, it would read the data, OR it with some
mask (that should be zero for the parts you don't want to write on) then write
the data back out.
Hopefully, you could mask your data against one of your unshifted sources...
However, the fastest way (if you don't mind trashing a few bytes) IS to alloc
a few extra bytes, and use an $f0 a->d copy which takes 4 cycles, as opposed
the 8 that a+b+c->d takes.
>
>Thanks for any input.
>\\\\ Neil Weinstock //\\ att!cord!nsw  or //\\ "Oh dear, now I shall have ////
>//// AT&T Bell Labs \\// nsw@cord.att.com \\//  to create more Martians." \\\\
Hope the input wasn't too fuzzy!

------------------------------------------------------          Quantum _\/_
2727 Eel                   Bruce (6502 RULES!) Rogers        |\  Duck  ( 0 0)
Davis, Ca 95616            Quantum Duck Software,           |\ \______/ / \\\
916-756-2684               rogers@iris.ucdavis.edu         |\ <  <     |   \/
"It's better to be the real thing than the right thing."     \________/  Quark!
Technical Details
Message-ID: <5883@ucdavis.ucdavis.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!iris!rogers
References: <6344@cbnewsm.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!iris!rogers
From: rogers@iris.ucdavis.edu (Brewski Rogers)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Blitter twiddling questions (kinda long)
Summary: blitfun
Keywords: SPAM
Message-ID: <5883@ucdavis.ucdavis.edu>
Date: 9 Nov 89 20:12:31 GMT
References: <6344@cbnewsm.ATT.COM>
Sender: uucp@ucdavis.ucdavis.edu
Reply-To: rogers@iris.ucdavis.edu (Brewski Rogers)
Organization: U.C. Davis - Department of Electrical COWS and Computer Science
Lines: 48