Re: A86: Re: Re: how writing to the lcd works


[Prev][Next][Index][Thread]

Re: A86: Re: Re: how writing to the lcd works




Eugene Dirks wrote:

> ...
> 128 ...a zoom factor of 2?  this is what i am looking
> into doing.
> ...

  For every pixel of the image just put 4 pixels.
  Let's say that the image is on array i (each position
  representing one pixel), and the screen is array s.
  Here's a simple pseudo-code algorithm that puts image
  in i into the top left s:

    for y = 1 to i.sizeY do
       for x = 1 to i.sizeX do
           s[x*2,y*2] = i[x,y]
           s[x*2+1,y*2] = i[x,y]
           s[x*2,y*2+1] = i[x,y]
           s[x*2+1,y*2+1] = i[x,y]

  each pixel goes to 4 pixels:

       *  ->  **
              **

  Example (each pixel shown witha diferent character):

       *#%  ->  **##%%
       @ &      **##%%
       +!?      @@  &&
                @@  &&
                ++!!??
                ++!!??

  Now, of course we can come up with an optimized asm
  version of the zoom routine.

  NSJ aka Viriato


References: