Graphics or Display Anomaly
![CannibalRobotics](https://forums.parallax.com/uploads/userpics/935/nDKB1D6DBLH3C.jpg)
Anybody have any idea why I'm getting this rainbow effect when the Color ==1? In the picture it's not that pronounced but it's most agrivating on the display. It does seem to migrate to other displays. I'm driving it with NTSC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
Post Edited (CannibalRobotics) : 10/27/2008 4:05:40 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
Post Edited (CannibalRobotics) : 10/27/2008 4:05:40 PM GMT
Comments
you've probably got code like this in your initial setup
try changing to
that will set all the screen tiles to have the first 4 colours in your palette [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Other ideas?
eg
where x is the x tile you want to change colour of, and y is the y position of the tile you want to change the·palette of.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
I cannot offer a solution, but i like your GUI drawing effort. I assume you're rendering from vector data of the lines and curves on the prop. I was thinking of making a similar graphics accelerator for another MCU to feed vector data from, so i am excited to see your progress.
Cheers
how do I set 'Palette'?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
http://www.rayslogic.com/propeller/Programming/GraphicsDemo.htm
and here:
http://www.rayslogic.com/propeller/Programming/TV_Colors.htm
Interestingly enough, the picture of the little monitor parallax sells running the graphics demo is showing signs of the same problem. Look at the color variations in the '9' from top to bottom.
I read your write ups, quite impressive. But I'm still stuck trying to figure out how to make the forth color row identical from top to bottom.
Help???
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
Just change this to:
·
I'm at home at the moment but the smoke is beginning to clear.
I might get back to the lab later tonight to try this but to help me clarify my understanding of this, the long 2B060C02 is actually the four bytes that make up the four tiles colors.
They are: %2B, %06, %0C and %02 from top to bottom, right?
So if I choose color %01 I would be displaying the color defined by %06?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
If the color for every tile is the same, can one save the 64 longs on both the bitmap and display memories by simply plugging constants into the code where color is used?
That's 128 longs (which at this point seems like a great big chunk of memory).
Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
First Fix:
'init tile screen
repeat dx from 0 to tv_hc - 1
repeat dy from 0 to tv_vc - 1
screen[noparse][[/noparse]dy * tv_hc + dx] := display_base >> 6 + dy + dx * tv_vc
Second Fix:
screen[noparse][[/noparse]y * tv_hc + x]:=(screen[noparse][[/noparse]y * tv_hc + x] & $3ff) + (palette<<10)
Third Fix:
'init colors
repeat i from 0 to 63
colors := $2B060C02
How is the solution implemented? Insert First Fix, Third Fix, and replace screen[noparse]/noparse line in First Fix with Second Fix.
replace code similar to third fix with the third fix
the second fix is if you want to change the colour of a tile at x , y to palette [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
roll is between 0 to 450(or 45 degrees)
rolldir is 1 or 0
[noparse][[/noparse] gr.color(2)
gr.width(0)
gr.arc(60, 30, 50, 50, 0, 409, 11, 3)
gr.arc(60, 30, 45, 45, 204, 409, 10, 3)
gr.color(0)
gr.width(2)
gr.arc(60, 30, 42, 42, 0, 204, 21, 3)
gr.color(1)
gr.width(0)
roll := roll/10
if roll>45
roll := 45
if rolldir==1
gr.arc(60, 30, 40, 40, 4096-(((45+roll)*4096)/90) ,1, 1, 3)
gr.arc(60, 30, 40, 40, 4096-(((roll)*4096)/90) ,1, 1, 3)
gr.arc(60, 30, 40, 40, 4096-(((90+roll)*4096)/90) ,1, 1, 3)
else
gr.arc(60, 30, 40, 40, 4096-(((45-roll)*4096)/90) ,1, 1, 3)
gr.arc(60, 30, 40, 40, 4096-(((360-roll)*4096)/90) ,1, 1, 3)
gr.arc(60, 30, 40, 40, 4096-(((90-roll)*4096)/90) ,1, 1, 3)]
How does the second fix allow to adjust the line color? The Graphics Pallette Demo has 64 different colors.
that will give you more palettes to choose from, when doing fix 2 [noparse]:)[/noparse]
you'll have to do this bit manually, as the gr. routines that actually draw the lines and arcs etc, are in asm.
hope that's clear enough for you?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
[noparse][[/noparse]repeat i from 0 to 63
colors [noparse][[/noparse] i ]:= mycolours [noparse][[/noparse] i ]
mycolours long $07020504
long $07020504
long $07020504
long $07020504
long $07020504
long $02020507
long $03020507
long $04020507
long $05020507
long $06020507
long $07020507
long $07020504
long $07020504
long $07020504
long $07020504
long $07020504
long $0B0A0507
long $1B1A0507
long $2B2A0507
long $3B3A0507
long $4B4A0507
long $5B5A0507
long $6B6A0507
long $7B7A0507
long $8B8A0507
long $9B9A0507
long $ABAA0507
long $BBBA0507
long $CBCA0507
long $DBDA0507
long $EBEA0507
long $FBFA0507
long $0D0C0507
long $1D1C0507
long $2D2C0507
long $3D3C0507
long $4D4C0507
long $5D5C0507
long $6D6C0507
long $7D7C0507
long $8D8C0507
long $9D9C0507
long $ADAC0507
long $BDBC0507
long $CDCC0507
long $DDDC0507
long $EDEC0507
long $FDFC0507
long $080E0507
long $181E0507
long $282E0507
long $383E0507
long $484E0507
long $585E0507
long $686E0507
long $787E0507
long $888E0507
long $989E0507
long $A8AE0507
long $B8BE0507
long $C8CE0507
long $D8DE0507
long $E8EE0507
long $F8FE0507
]
As the boxes were generated I changed the color, 0 to 3. This created a mosaic like effect. I could then alter the color pallet 'regionally' to accommodate a wider selection of color across the screen. Another very enlightening exercise was to adjust the colors on the fly.
I have a test jig that has pots on an 8 chan AD converter. I generated the color pallet by using data from 4 of the channels rotating the bytes into place to create the long. I could turn the knobs and the colors would change.
This really helped me optimize the colors for the display and isolate color combinations that just do not get along very well.
Jim-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
Baggers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·