Shop OBEX P1 Docs P2 Docs Learn Events
TV Color Setting — Parallax Forums

TV Color Setting

sonex293sonex293 Posts: 9
edited 2006-11-29 07:50 in Propeller 1
I'm trying to set the four colors for every tile to Black (02), Green (18), Yellow (AE), and Red (58).

I'm using the following code statement

'init colors
  repeat i from 0 to 63
    colors[i] := $00001010 * (i+4) & $F + $58AE1802[/i]



All colors seem ok except for Color(1) (i.e. green). The following code examples generate a psychedelic color. The top of the text starts out blue and ends up green. The arc starts out blue, goes through ping and ends up red. If I set the colors to Red or Yellow it is fine. Any ideas? confused.gif

gr.textmode(3,3,6,5)
    gr.colorwidth(1,4)
    gr.text(-60,-50,@numchr)
    
    'Arc
    gr.colorwidth(1,2) 
    gr.arc (0,0,90,90,$0100,$100,5,2)



Just got my shipping notice on my Hydra book. Looking forward to getting it!

--
Michael

Comments

  • AndreLAndreL Posts: 1,004
    edited 2006-11-21 02:35
    Best thing to do is first draw a palette of all the colors, then set your tint how you like it. Then use this as a baseline to select and map colors to numbers.

    andre'
  • potatoheadpotatohead Posts: 10,254
    edited 2006-11-21 04:55
    Seems to me, you've forgotten your word index for the colors array!

    colors := $00001010 * (i+4) & $F + $58AE1802

    Try this:

    colors := $00001010 * (i+4) & $F + $58AE1802

    That will put the value calculated into each element of the colors[noparse]/noparse array.
  • sonex293sonex293 Posts: 9
    edited 2006-11-21 12:34
    ph,

    I guess I'm a little dense this morning....need more coffee, but I don't see a difference in my code and what you typed.

    --
    Michael
  • ciw1973ciw1973 Posts: 64
    edited 2006-11-21 13:31
    It's all in the italics you know.
  • potatoheadpotatohead Posts: 10,254
    edited 2006-11-21 14:26
    Seems the forum changes some text! Tried a coupla times to get the code fragment to post properly and it just wouldn't.

    I can't get the right code to post!

    Right after colors, put first '[noparse][[/noparse]', then your index 'i', then ']', followed by a space, then the remainder of the code shown.

    Bizzare.

    Perhaps your posting has the same problem?

    Post Edited (potatohead) : 11/21/2006 2:32:30 PM GMT
  • sonex293sonex293 Posts: 9
    edited 2006-11-21 15:19
    Nope I'm missing that. It wasn't in the graphics.spin example. You mean like this?

    
    colors[noparse][[/noparse] i ] := $00001010 * (i+4) & $F + $58AE1802
    
    
    



    when placing code into the forums try using the code markers (i.e. "[noparse][[/noparse]"code"]" before and "[noparse][[/noparse]"/code"]" after....minus the quotes)

    I'll give that a try this evening.

    --
    Michael

    edit:

    Looks like I had to put spaces between the bracket and the i, otherwise it would get striped. You would hope the forum code would allow what ever was between the start code and end code markers. Oh well.

    Post Edited (sonex293) : 11/21/2006 3:24:19 PM GMT
  • Tom WalkerTom Walker Posts: 509
    edited 2006-11-21 18:54
    sonex293,
    My guess is that the BBS is interpreting the bracket i bracket as the HTML for italics on. I would think that using the code block markers should take care of this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • potatoheadpotatohead Posts: 10,254
    edited 2006-11-22 06:41
    Tried the code tags. They stripped it anyway [noparse]:([/noparse]
  • sonex293sonex293 Posts: 9
    edited 2006-11-23 01:51
    Well I found the fix for my color issues...

    'init colors
      repeat i from 0 to 63
        colors[noparse][[/noparse] i ] := $58AE1802
    
    



    Sometimes the simplest is the best way to accomplish something.

    --
    Michael
  • sonex293sonex293 Posts: 9
    edited 2006-11-29 03:02
    Now that I've got the color's figured out I've been working on getting the screen setup for my Color Engine Monitor. Here's a short video of what I've got so far. I'm awaiting the hardware to start working on the actual data collection, but the graphics are starting to come together!

    www.youtube.com/watch?v=ryAa6y5hCog

    --
    Michael
  • potatoheadpotatohead Posts: 10,254
    edited 2006-11-29 07:50
    Looks pretty cool!
Sign In or Register to comment.