Two COGS one scanline apart?
cbmeeks
Posts: 634
in Propeller 1
Maybe this is ambitious, but is it possible (without too much pain) to start two COGS where one COG is literally ONE scanline ahead of the second?
So the "rendering" COG would just draw the pixels but another COG would be a scanline ahead so that it can manipulate data, etc.
I know this is done for tiles/sprites, etc. But is the timing usually that precise when it's done that way?
Thanks for any tips.
So the "rendering" COG would just draw the pixels but another COG would be a scanline ahead so that it can manipulate data, etc.
I know this is done for tiles/sprites, etc. But is the timing usually that precise when it's done that way?
Thanks for any tips.
Comments
One really easy device for doing this is to have the signal cog always set a value in the hub when it it is at the begin of a scanline.
The render cog writes a different value, then watches for the change.
Start your cogs up, and the first thing the render cog does is make the first scanline, then it waits for the signal cog to change the done value.
When it sees the write from the signal or display cog, it makes another scanline ahead of the display cog.
Using 100MHz that means you can sample every clock (ie 10us).
Setup is similar to Mike Green's post.
So, yes, you can control all cogs precisely with respect to one another.
Thanks!!
Thanks!