View Single Post
Old 18 July 2016, 11:12   #13
zero
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 428
It helps to think about what the CPU has to do in order to set up the blitter. The CPU has to write several words to the blitter's registers. Normally it would fetch the data from RAM into Dx registers and then write it out again, but that could be optimized a bit with speed code (self-modifying code loading immediate values).

The copper is a bit more efficient because it's all basically speed code, and because it uses a reduced address space to write values encoded in the instructions directly to chipset registers.

In other words, the CPU has to do three memory accesses (load immediate instruction, move to absolute address instruction, write to blitter register) and the copper only has to do two (read instruction, write to blitter register).

Of course it's different when you have an 020 or some fast RAM and the CPU can pre-load the values it wants to write to the blitter. Even then the copper is probably faster because the CPU will have to poll the blitter to check when it has finished.

This brings us to the other major advantage of the copper. It can wait for the blitter to finish and there is no interrupt or polling overhead.

So the fastest way to blit is to create a custom copperlist. That can get very tricky if you are trying to use the copper for other stuff like palette changes and sprite hacks. I think this is why you rarely see both in demo effects that make heavy use of the blitter.
zero is offline  
 
Page generated in 0.04586 seconds with 11 queries