Shop OBEX P1 Docs P2 Docs Learn Events
100's colors with interlace blending. — Parallax Forums

100's colors with interlace blending.

tonyp12tonyp12 Posts: 1,951
edited 2010-08-29 15:09 in Propeller 1
Not real interlace, but overlap each frame with a different color.

As you can see in this picture the C64's 16 base colors are
blended together at 25 times a second for a 128 color palate.
ifli.gif

With Props 64 base colors, should it be possible to create 100's unique colors this way?
I'm not sure if the correct number is 64x32 = 2048 colors.

Take VGA grays for example.
Now we have black, dark gray, light gray and white.

If we alternate each frames pixel with
dark gray and light gray
we get a new medium gray color.

So we should possible get black and white
plus 6 shades of gray.
That could make for nice buttons etc.

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-29 12:22
    Ah yes, time-domain dithering.

    I've played with this before - there are three main limitations:

    1) Display buffer memory doubles
    2) Flicker (very noticeable at <30hz ie interlaced 60Hz)
    3) Does not quite double colors (two four-level gray scales only produce 6 distinct gray levels when interlaced)

    So with base 64-color Propeller VGA output, you would get a maximum of 6x6x6 = 108 unique colors, instead of 64 unique colors - an improvement, but at twice the memory requirement.

    Propeller NTSC normally gets you I think 136 unique colors, 16 different "chroma" values at 6 usable brightness levels, so you would get 24 dithered chromas at 9 brightness levels, or 216 colors total. I think Coley or Baggers has done this already.
  • tonyp12tonyp12 Posts: 1,951
    edited 2010-08-29 12:51
    Do you think you could get more colors if it turns out that the resistor based D/A is
    not linear.

    So if we blend black and light gray (more flicker probably)
    you don't get regular dark-grey but a new gray
    that is between the new blended medium-gray
    and regular dark-gray.

    But if we stick with only to blend two adjacent colors,
    maybe we would only need a 1bit delta map
    for the second frame, should save memory.
  • potatoheadpotatohead Posts: 10,261
    edited 2010-08-29 12:58
    The technique you are highlighting works best in PAL. PAL blends the colors across frames, which is part of what makes it work well. On NTSC, there is a lot more flicker.

    On both standards there is flicker for higher contrast transitions.

    NTSC allows for fixed 160 pixel horizontal resolution with a lot of colors through pixel artifacting. An example of that can be seen on the Propeller Wiki, under the heading "How Many Colors Can A Hydra Produce" I've posted up some screen shots of how horizontal color mixing can be done on a Prop for a lot of colors. That screenie shows 400 or so, but double that is possible with very little effort.

    PAL does it across frames. So on frame 0, you do one color and intensity, and on frame 1, ideally you use the same intensity, just changing the hue. A new color will result.

    I don't think anybody has coded a PAL artifacting demo on Prop yet :)

    Re: More colors from non-linear? Yes. The C64 actually had a very good palette for this kind of thing. When they decided the machine was going to be 16 color, considerable thought went into that palette. IMHO, looking back, it's very hard to imagine them making better choices than they did.

    One really great thing about the Prop is you can just make your own video output circuit, or code for the ones we have differently. Eric Ball used VGA mode to bit bang very nice color from the reference TV circuit, using all four resistors.

    Another variation on that would be to simply drive a DAC with more grey levels to get a lot more colors.

    The core problem on a Prop is where to put the display data?

    I like your idea of a delta map. Would be interesting to see where you go with it.

    There are a LOT of color tricks possible for this chip.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-29 14:17
    You could get more VGA colors by adding additional LSB resistors to the RGB DACs. You would not be able to control the new resistors pixel-by-pixel with the VGA driver's WAITVID, since it's already maxed out at eight; but you could easily control them on a line-by-line basis from either the VGA driver, or from a separate cog that simply monitors and synchronizes to the VGA driver's VSYNC and HSYNC outputs. The latter method would be the easiest.

    -Phil
  • ericballericball Posts: 774
    edited 2010-08-29 14:48
    Or move the HSYNC & VSYNC to separate pins, then have 3-3-2 RGB for the video driver. Should be possible to handle without using a separate cog. (WAITVID + MOV OUTA)
  • tonyp12tonyp12 Posts: 1,951
    edited 2010-08-29 15:09
    Still would be cool just to use the standrad vga-pin layout that is on the demo-board.
    So anyone can see it.

    But also a 'official' 3-3-2 driver should be created.
Sign In or Register to comment.