Shop OBEX P1 Docs P2 Docs Learn Events
Wading into video — Parallax Forums

Wading into video

jhhjhh Posts: 28
edited 2011-04-26 18:27 in Propeller 1
I've been playing around on the C3 but not yet touched much about video. (I'm pretty new to all this). There's such a large array of solutions out there, that I wanted to ask a few things.

- most of the "text" drivers share a similar interface to the programmer, regardless of TV, VGA, modes, and so on?

- most TV drivers run in one cog?

- most (but not all) VGA drivers consume more than one cog, with resolution being the primary reason for more cogs?

- are there drivers that attempt to present a least common denominator between TV and VGA at the same time? for text? for graphics? (with the realization that results in modes not optimal to either medium necessarily.) Do any of these allow simultaneous output? (IE: 2 or more cogs, one common display area in HUB ram?)

Any confirming or expanding on these questions will be helpful for this video newb. :)

Comments

  • KyeKye Posts: 2,200
    edited 2011-04-25 21:28
    You'll have to code something like above. It's not common to need to have a VGA and NTSC interface working at the same time on the same board to output video. So... no drivers have been written to make that happen. As for running two of them in the same cog... if only the chip was that fast... but it is not.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-04-25 21:47
    The parallax drivers TV.spin and VGA.spin can share a common interface, namely graphics.spin.

    From there, they vary depending on a lot of things. Some drivers have TV_Text.spin compatable SPIN methods, others don't.

    There are lots of specialized drivers for games, graphics, etc... they come with the methods they come with, many written just for the task at hand, or with a few basic methods.

    The color data between TV and VGA is different. It is totally possible to share the HUB RAM between displays. It is best to share the same kind of display though, because of the color values.

    I would explore the Parallax drivers first. I've got a commented graphics_demo.spin in my signature that can get you up to speed on how to set colors, tiles, and such. A lot can be done with these drivers. Kye has some great VGA drivers too. Recommended. Bill has put out some high character density single cog text drivers. Also recommended.

    From there, it's play-land! Lots of different code that can do lots of different things. Have fun!

    A single cog can do something basic like a tile or character (text) driver, and or a bitmap. Single COGs are generally limited in their capability to make effective use of color, with various trade-offs either done by tile, or character cell, or by line, as there isn't time to do color palettes and or indirection mid-display.

    Multi-cog drivers generally use a single cog to draw the display, fetching data from a HUB scan-line buffer, where the remaining COGS render graphics, sprites, multi-color cell text, and other things to the primary COG. I often refer to that COG as "the signal cog", with the other COGS being "render" or "graphics" COGS.

    Propellers are software driven video, with a little hardware assist in the waitvid instruction. This means a lot of variety is possible, both in resolution, overall color, sprites, etc... Using the basic capability, which I would characterize as ~320x200 pixel text/graphics/sprites, can generally be done with the Parallax drivers, and a few others mentioned here.

    Going beyond that is often possible, often practical, but it does require picking up some code and building a driver that makes the trade-offs you desire in your target display.
  • jhhjhh Posts: 28
    edited 2011-04-26 18:27
    Thanks for the tips, it'll really help me navigate the options.
Sign In or Register to comment.