I pointed out bugs long ago in GLCD when I was doing Catpad and
uploaded fixes also I have differently organised version too
I don't understand how it reverted back to broken versions
I use
procedure PlotPixel(byte in x, byte in y, bit in onoff) is
var byte data , yy
var byte side = _KS0108_LEFT -- Stores which chip to use on the LCD
if x > 127 then
x = x -128
end if
if x > SCREEN_SUB_X then -- Check for first or second display area
x = x - (SCREEN_SUB_X +1)
side = _KS0108_RIGHT
end if
if y > 191 then
y = y -192
elsif y > 127 then
y = y - 128
elsif y > SCREEN_MAX_Y then
y = y -SCREEN_ROWS
end if
_ks0108_inst() -- Set for instruction
_ks0108_column(side,x) -- Set the horizontal address
_ks0108_page(side,(y / 8)) -- Set the page address
_ks0108_data() -- Set for data
data = _ks0108_read(side) -- Need two reads to get data at new
address
data = _ks0108_read(side) -- DO NOT REMOVE 2nd Read!
-- add XOR code
if onoff == 1 then
-- bit_set(data, y%SCREEN_BLIT_PIXELS) -- Turn the pixel on
yy = y % SCREEN_BLIT_PIXELS
data = data | ( 1 << yy )
else -- or
-- bit_clear(data, y%SCREEN_BLIT_PIXELS) -- turn the pixel off
yy = y % SCREEN_BLIT_PIXELS
data = data & !( 1 << yy )
end if
_ks0108_inst() -- Set for instruction
_ks0108_column(side,x) -- Set the horizontal address
_ks0108_data() -- Set for data
_ks0108_write(side, data) -- Write the pixel data
end procedure
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.