Shop OBEX P1 Docs P2 Docs Learn Events
Video generation sync — Parallax Forums

Video generation sync

rigolorigolo Posts: 2
edited 2007-03-23 02:25 in Propeller 1
Hi all
I need to generate display with· multi cogs.
all cogs generators have the same display sync and·definition , but need to be precisely sync'ed.
Is there a way to start all generators sync'ed and are we sure they keep their sync.
Is there some unexplained register defining video generators, or a main register to enable them all
ex: define all generators and start them all with a single spin instruction ?

Comments

  • Jasper_MJasper_M Posts: 222
    edited 2007-03-21 12:55
    When multiple cogs are involved in video generation, there's always only one cog outputting the video with its video generator. The other cogs render the scanlines, and the video generator cog reads raw data generated by the other cogs from main RAM. I'm not even sure if it would be possible to use multiple video generators to feed the same pins.
  • paulmacpaulmac Posts: 51
    edited 2007-03-21 12:58
    see Good thread index (new and improved) where you will find VGA 1600 x 1200 Tile Driver
    Heaps of other good stuff in the Good thread index (new and improved) too. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I stand on the shoulders of giants
  • rigolorigolo Posts: 2
    edited 2007-03-21 13:21
    My intention was to generate data outs·for each generator on different pins and to get only one sync pair out
    the overall was to have a minimalist use of bitmap ram ex: limited to 160*200 bits for b/w cam data, quite no ram to generate the cursors ( one cog controlling them dynamically) , with other colours,·and the background cog·giving backcolour for the whole display field informations and eight colour terminal display zones. I am not shure with only one display cog to collect and mix all these information fast enough between 2 waitvid.
  • Jasper_MJasper_M Posts: 222
    edited 2007-03-21 15:08
    rigolo said...
    My intention was to generate data outs for each generator on different pins and to get only one sync pair out
    the overall was to have a minimalist use of bitmap ram ex: limited to 160*200 bits for b/w cam data, quite no ram to generate the cursors ( one cog controlling them dynamically) , with other colours, and the background cog giving backcolour for the whole display field informations and eight colour terminal display zones. I am not shure with only one display cog to collect and mix all these information fast enough between 2 waitvid.

    I still don't understand what you're trying to do, but if you really want to synchronize the video generators, I suggest using waitcnt: Before video generation code is launched, write something like cnt+1_000_000 in a memory location known by all video generating cogs. Then, all the cogs use waitcnt before starting the video generator. That ensures that the cogs are starting them at exactly the same time.
  • potatoheadpotatohead Posts: 10,260
    edited 2007-03-21 18:18
    I've been working along this path too.

    On this thread, Chip sent me a good way to sync up the cogs:

    http://forums.parallax.com/forums/default.aspx?f=25&m=177496

    The problem seems to be getting the color bursts synced. I've not had a chance to explore this farther (family issues!). My plan was to modify the TV driver to start in multi-cogs, like this VGA driver does. The cursor overlay in that code, works because there is no color burst for VGA. It also is white, to avoid the addition of colors that happens when multiple generators output on the same pins.

    If they are running together, their colorbursts may or may not be in sync. I managed to achieve this once, where the colors and pixels were fairly well aligned. (not using the technique above) The pixels add together, yielding more colors, but not an overlay like the one you describe.

    One other thought was to disable the output of the main bitmap video generator, when the sprite generator was drawing, and maybe make the overlay graphics in software... timing might be an issue, and the video generator might be an issue in that I don't know that it's pixel level controllable in this fashion.

    However that all goes, you can use the code posted above to get things running in sync and tinker from there. I'm interested to see where you get to, and will post my next efforts as well!

    Edit: One other thing. I had two instances of the tv driver, each reading different bitmaps. (this is somewhat different than what you are trying to get done) When I managed to get them in sync, they stayed that way. This is encouraging for the kinds of display code you are trying to write.
  • potatoheadpotatohead Posts: 10,260
    edited 2007-03-23 02:25
    Just re-read this and saw the seperate pins bit. Are you thinking about combining the signals with a simple circuit? That would explain the only one sync pair bit.
Sign In or Register to comment.