Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!ucsd!ucbvax!ee.ecn.purdue.edu!bevis From: bevis@ee.ecn.purdue.edu (Jeff Bevis) Newsgroups: comp.sys.amiga.tech Subject: How do I blit this? Message-ID: <9101061957.AA20737@en.ecn.purdue.edu> Date: 6 Jan 91 19:57:19 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Purdue University Engineering Computer Network Lines: 41 Maybe it's just me, but I'm having a heck of a time trying to find a way to perfom a specific blit operation. I'm accessing the hardware directly for my purpose. The problem goes something like this: I've got a 320x200 bitplane, and I want to blit out a 16x16 bit rectangle. I want it to go into a buffer area the size of 16 words. Sounds fine. It's easy if the source rectangle is on a word boundary, too. But supposing the source rectangle is shifted off the word boundary, I'll have to use the bit shifter in the blitter. No problem there. Let me draw a picture of the hypothetical source: 0123456789abcdef 0123456789abcdef ......xxxxxxxxxx xxxxxx.......... Here, the 16-bit wide block is shifted right by 6 bits. So, I see that if blit two words per line, with a shift of 10, the blitter will align the source information in the second word it reads on each line. The two words the blitter copies into the destination (for each line) will look like this: 0123456789abcdef 0123456789abcdef cccccccccc...... xxxxxxxxxxxxxxxx (the c's are carried from the previous line; they could be masked out) The question is, how do I get the blitter to not WRITE the first word on each line? For a two-word wide blit, I'll need a two-word wide place to put the result. I only want to use my 1-word by 16-line storage for the result. The first word is really junk that I don't need or want. According to what I see, I need to reserve space for the unused portion of the blit. If someone could tell me what the OS does to accomplish this (and it apparently does), or if you've got a clue as to what I'm doing wrong, please email me asap! Thanks! ------------------------------------------------------------------------------- "Three is never equal to four, except for very large values of three." ------------------------------------------------------------------------------- Jeff Bevis Purdue Univeristy School of Electrical Engineering bevis@en.ecn.purdue.edu Give me Amiga or nothing at all. -------------------------------------------------------------------------------