Simon Owen schrieb:
Thomas Harte wrote:
surely it'd be easiest just to write a routine that shoots out new palette values as quickly as possible

It depends how controlled the changes need to be...

An unrolled block of OUTI instructions can make 13 changes across a main
screen scanline (including both borders).  Though that only permits
updating of sequential CLUT positions.  There is 8T of additional
padding needed to keep each scanline aligned, which could allow B to be
set to a specific starting offset to update - perhaps even to zero,
keeping the final 3 entries constant.

For more control, a repeated block of  LD B,n ; OUTI  would allow
updates to any 9 CLUT entries per scanline.  It gives 4 changes during
the right+left border area, then changes after every 6 columns on the
main screen.

The last method would probably be easier to create suitable screens for,
but if the first one is an option it would give more colours to use.
Perhaps LCD could advise on that!

Si


I have not tested which will create better results, but I suppose, this will depend on the kind of screen. If SAM would have a CLUT Pointer, it would be much faster to point a different memory area than fetching the data. But just a idea: Using Stack Pointer (PUSH) to write in CLUT memory area would be faster than LD Command, right? This could allow to change even more colours by scanline. Have not tested this yet.

LCD

Reply via email to