Re: A82: Re: a82: writing to the display port!!!
[Prev][Next][Index][Thread]
Re: A82: Re: a82: writing to the display port!!!
>About the display port, does writing %0000000000000000 to the display port
>turn pixels off? If not then how does that routine you gave me do it?
0 = pixel off 1=pixel on
The runtine overwrites the old sprite when ever a new one is written, so
there is no need to clear it first.
>Also I don't understand the column position
>Every time you move right (for example) the binary is moved. i.e.
>%1111111100000000
>right
>%0111111110000000
>but if the cursor is all the way to the right
>%0000000011111111
>then the column is increased by one and the binary reset. Wouldn't the
column
>have to be increased by nine? So it would look like:
> %1111111100000000
>or is that a function of the display port?
The display is 12 columns wide (12*8 pixels) and 40H lines long. Each column
is 8 pixel, so by increasing the column by one the sprite is moved 8 pixels.
For exampel is the sprite looks like this
0000000011111111
and we increase the column and reset the sprite we will get
1111111100000000
So we need to shift the sprite once to make it move one pixel, which gives
us
01111111100000000
If you compare that with the first one you will see that the sprite has been
moved one pixel.
I am not sure if i rembered to shift the sprite after changing the column in
the program i send, if i did not, instead od reseting the sprite, load it
with 01111111100000000.
>Everything else is verry clear.
Great.
Dines