erik@mcrware.UUCP (Erik Johnson) (03/05/91)
Can I access the blitter directly for moving video data quickly? I am currently working on an animation viewer that does its work during the VBI. Right now copying an image to the screen using movem's takes approx 160,000 cycles or 1/50 sec (8Mhz), which is a little to much data to handle in under 1/60 of a second. I would like to make a version of my viewer blitter-ready (make use of it, if it exists). Can I use the blitter directly to move the data in less time? Is it safe to even use the blitter during a vbi? Does the blitter access memory on video or cpu access times (that is, can both the blitter and cpu write to memory at 8 Mhz each (interleaved)? And lastly, how do I detect the presence of the blitter? If you could help me with any/all of my questions, it would be greatly appreciated. Erik R Johnson
darekm@microsoft.UUCP (Darek MIHOCKA) (03/06/91)
In article <5187@mcrware.UUCP> erik@mcrware.UUCP (Erik Johnson) writes: >I am currently working on an animation viewer that does its work during the >VBI. Right now copying an image to the screen using movem's takes >approx 160,000 cycles or 1/50 sec (8Mhz), which is a little to much data to >handle in under 1/60 of a second. I would like to make a version of my >viewer blitter-ready (make use of it, if it exists). > >Can I use the blitter directly to move the data in less time? > >Is it safe to even use the blitter during a vbi? No. Unless you take precautions to make sure that the blitter chip is not currently in use, you could be interrupting some other blitter operation. >Does the blitter access memory on video or cpu access times (that is, can >both the blitter and cpu write to memory at 8 Mhz each (interleaved)? I don't know that. But don't expect a large speed boost. For straight memory moves with no shifting or masking operations, the blitter is almost the same speed as your MOVEM code. I have tried to get it to go into hog mode, but that seems to interfere with interrupts (such as mouse interrupts which you don't want to mask) so I can't say how much faster it is possible to get it to run. Ideally, it takes 128000 clock cycles to blit 32K of screen RAM, which is only about 20% faster than what you're getting now. >And lastly, how do I detect the presence of the blitter? Xbios function 64 with a parameter of -1. Something like... move.w #$ffff,-(sp) move.w #$40,-(sp) trap #14 addq.l #4,sp The return value in D0 tells you. Bits 0 and 1 will tell you whether the blitter is present and if so, whether it is enabled or not. I don't remember offhand which bit is which. It's documented in the COMPUTE and ABACUS books. - Darek -- ---------------------------------------------------------------------------- Darek Mihocka, author of Quick ST 3.0. All views expressed are my own. Branch Always Software, 14150 NE 20th St. Suite 302, Bellevue, WA 98007 ----------------------------------------------------------------------------