Re: [cc65] Optimized tgi line functions for horizontal and vertical lines

From: Ullrich von Bassewitz <>
Date: 2011-11-07 15:11:04

On Mon, Nov 07, 2011 at 02:16:59PM +0100, "Andreas Rückert" wrote:
> I did not do some actual benchmarks of the graphic ops, but drawing the
> vertical lines seems to be somewhat slow? Maybe it would help to add
> separate functions for vertical and horizontal lines, since these could
> be tuned quite good on most systems?

I'm currently not at home, so I cannot look at the source. What I can say is
that there is no special code for vertical lines and that it may be that the
line code could be streamlined somewhat, because it hasn't been adjusted after
the changes in the TGI kernel layer.

So yes, lines aren't as fast as they could be. But TGI isn't made for really
fast lines anyway. Especially line clipping adds a noticeable overhead.
> Is there a quicker way to set the background color before drawing?

Setting the background color in high resolution mode means filling the color
ram with the color value. So what actually happens here is that the 6510 does
a 1K memory write. The loop is unrolled but still needs 25 cycles per
iteration, which means 25 * 256 ~= 6.5 ms.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Nov 7 15:11:19 2011

This archive was generated by hypermail 2.1.8 : 2011-11-07 15:11:22 CET