Colors initialisation
Roi
Posts: 7
Hi again
I understand from the Graphics_Palette.spin, that there are 64 possible colors, but·only 4 colors are allowed per square on the 16*12 squares on the screen.
Is it not possible to have, say, just 16 or 8 colors, but all of them accessible on every pixel?
Further, I just can't seem to understand this color & tile initialisation process. (I have many years programming experience, but not this lowlevel)
From Graphics_demo.spin:
Can someone please explain it to me, or point me·to some litterature explaining it, so that I can make my own custom colors?
Thanks
I understand from the Graphics_Palette.spin, that there are 64 possible colors, but·only 4 colors are allowed per square on the 16*12 squares on the screen.
Is it not possible to have, say, just 16 or 8 colors, but all of them accessible on every pixel?
Further, I just can't seem to understand this color & tile initialisation process. (I have many years programming experience, but not this lowlevel)
From Graphics_demo.spin:
'init colors repeat i from 0 to 64 colors[noparse][[/noparse]i] := $00001010 * (i+4) & $F + $2B060C02 '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 + ((dy & $3F) << 10)
Can someone please explain it to me, or point me·to some litterature explaining it, so that I can make my own custom colors?
Thanks
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is one giant teacup ride.
Back in the Old C64 days, they (not me, thats the BFZ) used raster intrupts, and on the intrupt, we overlayed additional bits into the color registers.
I know timing is all in video, but the idea would be to have an exact sync for the color data, and when needed, overlay additional bits from a seperate small table.
Well, what do you think?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
I could have sworn though, in that promo video featuring the "Hydra" in action, by Andre Lamothe, that the colors in the last part of the demo were exceeding 4...
Thanks again Paul
Interesting point about the Hydra, I have a vague recollection of Andre talking about this in the demonstration in Rocklin I saw but I can't remember precisely what he said. He may be using color averaging by varying the colors in a stippled pattern since he uses two cogs to generate alternate raster lines.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is one giant teacup ride.
Post Edited (Paul Baker) : 7/7/2006 7:59:39 PM GMT
meaningless because potentially a tile only has to be one raster row high. Further, if you shift the pixels out very fast,
much faster than you can change them, you can have a lot of tiles horizontally as well, and therefore a lot of colors. The
real limit is how you put that information in only 32K hub memory and how you get it into the WaitVid instruction fast
enough. That is, it's a simple matter of programming.
That said, of course if you use the supplied graphics object with its video pipeline cog, you also get its limitations.
With the Propeller, there's more than one way to skin a cat!
-Phil