Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!tandem!zorch!amiga0!mykes From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Blitter vs. 040 (was: Computer Architecture question Message-ID: Date: 17 May 91 09:10:41 GMT References: <1991May9.070349.15151@neon.Stanford.EDU> <3496.tnews@templar.actrix.gen.nz> <1991May10.180908.29565@convex.com> <1991May13.004217.23406@techbook.com> Organization: Amiga makes it possible Lines: 104 In article <1991May13.004217.23406@techbook.com> waynekn@techbook.com (Wayne Knapp) writes: >swarren@convex.com (Steve Warren) writes: > > >>In the A3000, the 68030 can update display memory faster than the blitter can. >>This does not mean that there is no advantage to using the blitter (and the >>blitter does not loose by *that* much). The fact is, if the blitter is used >>to manage the display and the '030 is able to stay out of display memory, then >>the '030 will be able to "multiprocess" in parallel with the blitter. So if >>you have calculations that need to be performed then, it is advantageous to use >>the blitter to offload graphic manipulations from the CPU. > > >Two three things wrong with this. > > 1) The blitter is seldom used for animation. ANIM players use the CPU, > always. The blitter is often used for brush moving, but not for real > animation. > Brush moving is also animation. > 2) Even the a 68000 can scream past the blitter, depending on the blit. > For simple large blits, the blitter is much faster. For very complex > smaller blits a 68000 routine can be written that is much faster than > the blitter. I done it many times in my code. > True, for example, fast text can be done with 8 byte stores (on byte boundries) while the blitter requires up to 14 word registers for setup. > There is a common trade off that can be made between memory used, nature > of the code and speed of the code. The blitter is very general and do to > that nature can be hard pressed to complete with specail purpose code. > By using all the 68000 registers and extra banks of memory it is possible > to reduce the number of memory accesses required in a very complex blit. > (like, restoring the background from a cookie cut blit) > The 68000 still has to use cycles to fetch its instructions, while the blitter doesn't. A simple rectangle copy as you describe above is still faster with the blitter unless you have real small restorations to do. > Now there are some real constraints, if you are working on something that > requires a LOT of barrel shifting, there is no way a 68000 can keep up > with a blitter. Maybe a 68030, but not a 68000. > Shifting costs 6+2n (word) or 8+2n (long) clocks where n = number of shifts (this is for 68000). This is for register shifts. Memory shifts are even slower. The blitter shifts n bits in 1 clock. > 3) Everyone is always shouting about how the CPU and Blitter can run at the > same time. But in real life, it rarely happens. There are several > reasons for this. > a) The blitter requires CPU to adjust it's registers between bitplanes. > b) Most blits are short in time, too short for the operations system to > allow the CPU much chance to run. > c) It is very hard and complex to pull off. > Now, it can be done, and I'm sure someone has some has. But not as a > general rule, and certainly not something you get for free. > I disagree. The blitter does require the CPU to adjust its registers between bitplanes, but this can be as few as 3 to 6 instructions if it is done right. Also, there is a custom display format which allows "row" blits which requires ONE blit operation to blit to as many planes as you want. The blitter can generate an interrupt when a blit operation is completed, and it is trivial to use these interrupts and it is almost totally free. At the very least, if you aren't using interrupts, you should not wait for the blitter to finish after the last plane (wait before doing the next "first" plane blit), so you can go and do all the calculations you need for setup while the last plane is blitted. And lastly, if you really want smooth animation at high frame rates, the operating system should be disabled because it steals too many cycles. >Now I realize the need to have a blitter in the Amiga, but not for speed in >the higher-end Amigas, but for BACKWARD compatibility. As for speed, es. in >68020+ Amigas I think the blitter is VASTLY overrated. > Ever use blitter nasty? It goes at least 2x faster that way. I know, I've proven it with experimentation. >Anyway that is MHO. Since I make my living from writing real-time graphics/ >animation software, I suppect I used the blitter about 10,000 more than most >people. > Hope this helps you do even better! > Wayne Knapp > Consultanting Assoc. > Hash Enterprises > >-- >waynekn@techbook.COM ...!{tektronix!nosun,uunet}techbook!waynekn >Public Access UNIX at (503) 644-8135 (1200/2400) Voice: +1 503 646-8257 >Public Access User --- Not affiliated with TECHbooks -- **************************************************** * I want games that look like Shadow of the Beast * * but play like Leisure Suit Larry. * ****************************************************