Shop OBEX P1 Docs P2 Docs Learn Events
NTSC Colors. — Parallax Forums

NTSC Colors.

Ym2413aYm2413a Posts: 630
edited 2006-11-27 22:37 in Propeller 1
Hello, Does anyone have any crazy and cool ideas to get more NTSC colors out of the current Propeller Hardware?
Maybe dithering at a highrez or some form of hardware mod would help with this?

I'd be interested in a way to generate more then just one bit for saturation and maybe open up a full pallete of colors to the chip. I know this can be done with a little creativity!
(Hmm)...

Any ideas?

Comments

  • Ym2413aYm2413a Posts: 630
    edited 2006-11-27 07:28
    Okay talking about dither. Here is what I came up with!
    I wouldn't be surprised if someone has tried all this before.

    Take a look at the picture I attached. The top two rows are extra colors which are dithered.
    Row 1 is 1/3rd (color + white) and Row 2 is 1/2 (color + white).

    Row two with 50% dither is much more usable with other color combinations (besides just white)!

    The trick is to set the dot-clock at a rate fast enough to blend the pixels together without being so high that the television confuses the sudden changes as the 3.58Mhz color signal. (Though this has been done in the past to generate extra colors on other chips).

    I'm assuming you could also dither colors that are close together to generate 32 shades instead of just 16.
    Really though I'm interested in overcoming the 1-bit saturation limit by dithering colors with greys.

    Well it's 2:28am and I got to be at work in a few hours. So until next time (ttyl)

    --Andrew Arsenault.
    500 x 548 - 17K
  • BeanBean Posts: 8,129
    edited 2006-11-27 13:51
    Andrew,
    · I have an experiment I want to try sometime.

    · On the SX48 I created a 16 color ACA (any color anywhere) display by breaking each color burst cycle into 4 parts. Each part could be either high or low (1 bit). So if you output the bits 0101 it would be in-phase with the color burst. If you output 1010 it would be 180 out-of-phase with the color burst. 1111 made white, 0000 made black and all other combinations created a unique color.

    · I want to try the same thing on the Propeller, but use all 3 bits of the video generation hardware. I think values from 2 to 7 are valid (values below 2 are sync). So that gives 6^4 = 1296 combinations using 12 bits per pixel.

    · I need to get more familar with the video hardware before I can attempt anything like this. But it's on my "todo" list.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • Ym2413aYm2413a Posts: 630
    edited 2006-11-27 15:10
    Bean (Hitt Consulting) said...
    Andrew,
    I have an experiment I want to try sometime.

    On the SX48 I created a 16 color ACA (any color anywhere) display by breaking each color burst cycle into 4 parts. Each part could be either high or low (1 bit). So if you output the bits 0101 it would be in-phase with the color burst. If you output 1010 it would be 180 out-of-phase with the color burst. 1111 made white, 0000 made black and all other combinations created a unique color.

    I want to try the same thing on the Propeller, but use all 3 bits of the video generation hardware. I think values from 2 to 7 are valid (values below 2 are sync). So that gives 6^4 = 1296 combinations using 12 bits per pixel.

    I need to get more familar with the video hardware before I can attempt anything like this. But it's on my "todo" list.

    Bean.

    That could be done. I've tried generating colors with nothing more then black and white signals on the prop.
    It does work, only problem is 50% of the time I start up the propeller the colors are 180 degrees out of phase. I'm wondering if this has something to do with the video hardware starting on both rasing and falling edges.

    I do like your way of producing colors on the SX though!
    I know they used that method with CGA to produces 16 or more colors.

    en.wikipedia.org/wiki/Image:KQ_CompVsRGB.png
  • potatoheadpotatohead Posts: 10,261
    edited 2006-11-27 16:03
    IMHO, the trouble is the color sync is not keyed to the frame.

    I suspect, starting a color burst at a specific time, leaving it on throughout the frame, then syncing it again during vlbank, would probably solve the 50/50 problem.

    My interest really was obtaining images similar to older home computers and consoles. A secondary element was color.

    On the CoCo3, it had a 640x192 mode that ended up being capable of nearly 256 colors, with artifacting. On a composite connection to TV, it looked really good. The prop should be able to do something like this, with it's 4 color hardware alone --no special hack required. All that is needed is a stable color clock that is the same phase every line.

    I'll have to dig up the CoCo 640 mode. Can't remember if it was 4 bits / pixel or two...
  • Ym2413aYm2413a Posts: 630
    edited 2006-11-27 17:59
    potatohead said...
    IMHO, the trouble is the color sync is not keyed to the frame.

    I suspect, starting a color burst at a specific time, leaving it on throughout the frame, then syncing it again during vlbank, would probably solve the 50/50 problem.

    My interest really was obtaining images similar to older home computers and consoles. A secondary element was color.

    I'll have to dig up the CoCo 640 mode. Can't remember if it was 4 bits / pixel or two...

    Yeah who knows, That might help the 50/50 problem.
    What the CoCo did for extra colors was the same as they did with the CGA.
    Place two colors next to eachother at a frequency that is seen as ntsc "color" information.

    I heard that the CoCo1 would lock on either Clock-Edges and the user had to hold the reset button until the correct colors displayed. The CoCo3 fixed that problem.

    The CoCo had 2bits per pixel. (I looked it up)

    Overall the dithering you two use is a bit different then the dithering I did.
    I did luminance-chrominance dithering, which is anything under 3.58Mhz.
    You both are looking at Hue dithering which is when you alternate black and white pixels at a fast enough rate that the Tv confuses it as Hue information.

    Both work great.
    Really for me the Propeller has a nice number of Hues. 16 shades!
    Maybe with some dithering it could be turned into 32 (by alternating neighboring shades).

    My big thing though is the lack of saturation control. Only 1-bit.
    Either your full color or greyscale.
    The prop doesn't have any muted tones which would make it look much prettier!
    At least that way it could display realistic images.

    Also I'm interested in more then just 6 shades of GreyScale. tongue.gif
  • BeanBean Posts: 8,129
    edited 2006-11-27 18:47
    Ym2413a said...
    Also I'm interested in more then just 6 shades of GreyScale. tongue.gif
    More grayscales could be made by using the video hardware in VGA mode. No colorburst or anything, just sync and grayscale levels. Will probably need an 8-bit parallel DAC but it wouldn't be too hard. I may work on that to "get my feet wet" with the video hardware.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • Ym2413aYm2413a Posts: 630
    edited 2006-11-27 19:10
    Bean (Hitt Consulting) said...
    More grayscales could be made by using the video hardware in VGA mode. No colorburst or anything, just sync and grayscale levels. Will probably need an 8-bit parallel DAC but it wouldn't be too hard. I may work on that to "get my feet wet" with the video hardware.

    Bean.

    True. Though I'm interested in doing everything with the current hardware used with the Hydra and Demoboard.

    I think Phil Pi got more shades of GreyScale by switching to VGA mode after sending the front porch and switching back in time for the back porch of a raster.

    Eitherway, There is a lot more we can do with this hardware besides the simple 80 some color NTSC and 64 color VGA. We just got to be creative.

    I was thinking that dithering two shades of grey at a frequancy high enough to blend together but low enough not to be seen as Hue could work wonders.

    (btw) in the picture I attached last night... If you look at the very bottom left corner you will see a shade of blue, light blue and white.

    The light blue was made by dithering blue and white and is even lighter then the lightest blue the propeller can produce without dithering. Pretty neat stuff ^^

    I think they call that color Baby Blue or something, All I know is that the propeller doesn't have that color in it's palette without dither.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-27 19:44
    Regarding the grayscale: The method I'm currently using is to launch a separate cog that detects the sync levels from TV.spin. It uses its own array of grayscale values (e.g. from a PropCAM) and superimposes these on the video signal MSB using a counter in DUTY mode. (Thanks to Chip for suggesting this!) Because the outputs from various cogs are ORed, this results in a gray level if superimposed over black. (This does require a cap on the output to filter out the DUTY noise.) When superimposed over color, you get a tinted effect, i.e. same hue and saturation, different intensity.

    There's no reason this method can't be applied in the same cog as the other video stuff, since you can specify in detail which pins get connected to the video hardware. While grayscale is being generated by CTRB, you'd just disconnect the MSB from the video. (Come to think of it, this may not be necessary. I've never tried assigning video and counter output to the same pin in the same cog. Who knows? Maybe they simply OR like they would using multiple cogs.)

    -Phil
  • Ym2413aYm2413a Posts: 630
    edited 2006-11-27 22:37
    Hey, thats a really cool idea Phil!
    I'm amazed with all the different ways we've came up with generating more colors and shades!

    It's funny how different people go about doing the same thing in a different manner.
    (in this case generating video signals not supported dirrectly by the hardware).

    I dither Lumi and Sat (low frequencies) to get more tones.
    Bean uses a simple high frequency (b/w) bit pattern to generate HUE signals.
    Potatohead is interested in dithering two or more colors at high frequencies (hue range) to produce new colors!
    And Phil uses a cog's counter as a 1-bit pwm to generate greater intensity resolution.

    This is really interest stuff! lol.gif
    I'm really impressed with everyone's ideas and findings.
Sign In or Register to comment.