Shop OBEX P1 Docs P2 Docs Learn Events
Color-Code.spin — Parallax Forums

Color-Code.spin

Mark BramwellMark Bramwell Posts: 56
edited 2007-09-18 18:09 in Propeller 1
I have grown tired of trying to figure out the color combinations for a tile.
I have created a program to help me sort it out.

Original Version: Mark Bramwell, Sept 16, 2007
Adapted to PS2 By Jeff Ledger  Sept 16, 2007
Adapted to PropTerminal by Andy Schenk, Sept 18, 2007

Purpose:  

    To view on your TV screen every possible color combination but only 4 at a time with an easy
    to use interface to change the colors and view them instantly with the appropriate HEX color 
    code string.

    Color-Code-IR-RS232.spin uses a IR device on pin1 to decode a Sony TV remote.
    Use the Left/Right arrows to select the box. Use Up/Down to change the color of that box.

    Remote-Tester.spin will allow you to display & pick codes from another remote if you 
    do not have a Sony.




Updated: The attached file now has the PS2 keyboard as well as a RS232 version for Hyperterminal
Updated: The attached file now has a version that uses the PropTerminal software as a keyboard interface

Post Edited (Mark Bramwell) : 9/18/2007 6:08:59 PM GMT

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-09-16 06:37
    Good work, Mark! There had been a request from hippy the other day as to what colors...
    I gave him the list from Andr
    225 x 555 - 19K
  • Mark BramwellMark Bramwell Posts: 56
    edited 2007-09-16 15:19
    What I find interesting is some color combinations cause the screen to tear / lose lock.

    That is why I eventually needed to do something that allows me to sit back and simply cycle quickly by pushing a button.

    I probably should pick up a PS2 connector and solder it onto the board although the IR_Kit sure is a handy object to have (I used an old module from a VCR and soldered it in).
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-16 15:41
    Well, you can have 64 arbitrary colors at the same time with TV even now!
    And avoid the luma values 0,1 and 7
  • potatoheadpotatohead Posts: 10,261
    edited 2007-09-16 15:42
    If you are seeing screen tear, it's highly likely you are using luma values that are outside the range for images.

    On the Propeller, some of the luma values are used for SYNC. There are 8 possible luma values, with 0 and 1 being sync, this leaves 6 intensities for actual display.

    This is done so that the entire video signal is under your control.

    On the wiki page, I've mapped out the standard colors, and their values. It's pretty easy to look at the strip at the bottom of the screen capture, note the hue, then assign intensities 2, 7 from there to get your color. The grid of colors above is done with the artifacting technique and only works on NTSC display systems. It's very RAM hungry, making it near useless for anything but demos on a prop with no external memory attached.

    (was just wanting to explore color possibilities with the Parallax reference video circuit.)

    Some displays will tolerate zones of luma value 1, for really black objects. Most will not.

    Luma 7 should be ok, right?

    Never had a problem with that one on any displays I've used.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-16 16:33
    Alas, it is still alittle bit unclear how the color modulation is implemented. I "infered" from cryptical remarks in Andr
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-09-16 17:35
    Nice Utility! Attached is a copy that has been modified to use the PS2 keyboard (comboKeyboard)

    Thanks for the great tool!

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

    — Calvin, of 'Calvin and Hobbes.
  • potatoheadpotatohead Posts: 10,261
    edited 2007-09-16 19:50
    I'm a bit confused on that matter too. I know somebody who is gonna put that matter to rest soon.

    The information on the wiki is from pure observation. I have a display that will display nearly anything NTSC, and I've another one that's really picky. Went through the Parallax driver, then again with the EASY_NTSC Cardboard created. Color was confusing --in the end, it was just easier to just blast all 256 possible waitvid values to the screen, sort out the good from the bad, and put it all in one display example.

    That's the screenie on the wiki.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-09-16 19:58
    The difficult displays probably have digital filters that play hub with colors slightly out of range. Sony sold a trinitron color tv with individual channel tuning knobs. I found it useful for adjusting the screen to watch pay-per-view back when it was more simply encoded. The sony didn't have a remote, maybe ebay is worth a look.
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-16 20:07
    There can be no "colours out of range"... The hue is coded into a phase shift, controlled by the chroma values 0 to 15. The problem is the voltage swing of the signal that must stay above sync level and not overshot inside the Prop.

    So it should be safe to limit yourself to luma values between 2 and 6.

    Trying all 256 values in the color register is not dangerous but seems not very instructive...
  • potatoheadpotatohead Posts: 10,261
    edited 2007-09-16 20:37
    Say what you want. I now know exactly what a given value will do, when it's an input to a waitvid. Before that exercise, I was in the same boat as a lot of other people, wondering if we had 5 or 6 lumas to work with, wondering about the high-sat colors, how they mix, etc...

    It's not like I didn't think about it. More like wanting to sort out contradictory information. Working through that exercise sorted all of those issues out nicely.

    There isn't an NTSC display around that won't display that color screen in the wiki. Luma 7 is just fine for use, particularly if it's for a monochrome pixel.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Mark BramwellMark Bramwell Posts: 56
    edited 2007-09-16 23:30
    I have updated the ZIP file in the 1st message.

    It now includes Jeff's adapted version for the PS2 keyboard as well as I have modified my version to also support the PC keyboard via Hyperterminal. If you have a stock protoboard/RPMproto with only a RS232 connection, you can now use hyperterminal to control the spin program.

    Updated:  
    
        Now supports hyperterminal for those of you with a stock protoboard with no-IR and no-PS2-keyboard.
        Use 9600, none, 1, no flow control
        Use I, J, K, M to navigate with hyperterminal.
    
    
    Hyperterminal:
    
         *** Propeller Color Code Tester for your TV ***
    
        Use the I,J,K,M keys to navigate on your TV screen
    
             I       I=Increase the current color value
            J K      Change which code we are examining
             M       M=Decrease the current color value
    
    
  • potatoheadpotatohead Posts: 10,261
    edited 2007-09-17 03:26
    This is a nice utility.

    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Mark BramwellMark Bramwell Posts: 56
    edited 2007-09-17 04:14
    There are definitely some good and some bad color combinations!

    I just reset the default colors in the app to: 44 0B 6B 9B

    They are a much nicer starting position, no bleeding or buzzing from the TV. (although the red is more of an orange on my set but RED=aa is too bright for me)
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-17 06:32
    $aa IS ASSUMED to be orange!! I should be grateful if someone would undertake the task to fill in some color names in my table smile.gif
    Thank You
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-09-17 11:58
    deSilva said...
    $aa IS ASSUMED to be orange!! I should be grateful if someone would undertake the task to fill in some color names in my table smile.gif
    Thank You
    deSilva, I'll do that for you (using netscape's color names) if you rearrange your color example table so it is not so discordant*. (The upper left corner panel seems misplaced)
    Among the various prototypes of palette displays in Wiki's list (http://en.wikipedia.org/wiki/List_of_palettes), I like TED best for our purposes. That's a very nice and useful palette. Atari 2600 is also nice, but it lacks any reference values.


    *attached a non-discordant palette
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-17 18:08
    This Wiki page looks like a major task of someone...
    I think the ATARI NTSC palette comes quite close.. I added it to my above posting, and also removed a disconcordancy smile.gif
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-09-17 19:36
    I like it. Still need names?
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-17 20:00
    Yes, but they should be "validated" ... I do not trust my assignment smile.gif
  • AribaAriba Posts: 2,687
    edited 2007-09-18 07:00
    Here is a version for PropTerminal. It works like the PS2 version but has additional functions:
    - with RETURN you write the actual colorcodes to the Terminal
    - then you can write a comment to this value.
    - repeat this if you want more then one color set
    when all colors are on the Terminal screen:
    - Save it to the clipboard with 'Copy Text' in the File-Menu (of PropTerminal)
    - Insert it in the IDE with Paste or Control-v.

    Andy
  • Mark BramwellMark Bramwell Posts: 56
    edited 2007-09-18 18:09
    PropTerminal looks interesting. I had no used it before.

    I have refreshed the zip and re-uploaded it in the 1st message of this thread.

    You can now use: IR (TV remote), Hyperterminal, PS2 keyboard and PropTerminal to control this program

    The only thing left is telepathy and I am still working on that spin object!
Sign In or Register to comment.