Forum Update - Announcement about May 10th, 2018 update and your password.

Graphics_Demo basepin selection

In TV_Text_Demo it is relatively easy to see that the output pin group is selected by passing the value 12 to TV_Text at start up. I've made use of that code for many years to drive composite monitors of various sorts. Now I need composite video graphics.

In the Graphics_Demo -> Graphics -> TV combo, the specification of the output pin group seems to be somewhat obfuscated, especially for a Demo program. Is there something obvious I'm overlooking?

Comments

  • 5 Comments sorted by Date Added Votes
  • K2 wrote: »
    In TV_Text_Demo it is relatively easy to see that the output pin group is selected by passing the value 12 to TV_Text at start up. I've made use of that code for many years to drive composite monitors of various sorts. Now I need composite video graphics.

    In the Graphics_Demo -> Graphics -> TV combo, the specification of the output pin group seems to be somewhat obfuscated, especially for a Demo program. Is there something obvious I'm overlooking?

    Sorry, why wouldn't you just post the code in question or link directly to it?
    I'm sure if I try and guess I might get it right but I couldn't be bothered.
    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET
    TAQOZ documentation
    Brisbane, Australia
  • You find the description of the pin settings in the TV.spin object:
    ''  tv_pins
    ''
    ''    bits 6..4 select pin group:
    ''      %000: pins 7..0
    ''      %001: pins 15..8
    ''      %010: pins 23..16
    ''      %011: pins 31..24
    ''      %100: pins 39..32
    ''      %101: pins 47..40
    ''      %110: pins 55..48
    ''      %111: pins 63..56
    ''
    ''    bits 3..0 select pin group mode:
    ''      %0000: %0000_0111    -                    baseband
    ''      %0001: %0000_0111    -                    broadcast
    ''      %0010: %0000_1111    -                    baseband + chroma
    ''      %0011: %0000_1111    -                    broadcast + aural
    ''      %0100: %0111_0000    broadcast            -
    ''      %0101: %0111_0000    baseband             -
    ''      %0110: %1111_0000    broadcast + aural    -
    ''      %0111: %1111_0000    baseband + chroma    -
    ''      %1000: %0111_0111    broadcast            baseband
    ''      %1001: %0111_0111    baseband             broadcast
    ''      %1010: %0111_1111    broadcast            baseband + chroma
    ''      %1011: %0111_1111    baseband             broadcast + aural
    ''      %1100: %1111_0111    broadcast + aural    baseband
    ''      %1101: %1111_0111    baseband + chroma    broadcast
    ''      %1110: %1111_1111    broadcast + aural    baseband + chroma
    ''      %1111: %1111_1111    baseband + chroma    broadcast + aural
    ''      -----------------------------------------------------------
    ''            active pins    top nibble           bottom nibble
    
    and yes, it's a bit complicated.
    Simplified:
    Set the pin group in the upper nibble and the lower nibble to %0000 if you use the lower 4 pins of the pingroup, or %0101 if you use the upper 4 pins of the group.

    A possible calculation from the pin number (untested):
      tvparams[2] := pin>>3 << 4 | (pin>>2 & 1) * %0101
    

    Andy

  • K2K2 Posts: 575
    edited March 17 Vote Up0Vote Down
    Thanks Andy! In searching for something familiar I glazed right over that. Repeatedly. :\
  • In more than 10 years of using the Propeller, I've assiduously avoided graphics (and robots, ugh!). Well, a need for graphics on a little automotive display finally materialized. It was just a matter of time, I suppose.

    Anyway, I'm stunned and amazed at what Chip created in Graphics.spin. Today's amazement centers on his creation of a vector font based on simple drawing primitives and a specifiable pixel.

    This worries me. What if robots are actually clever, useful, or fun?!

  • Yes, that TV driver and graphics library can do a whole lot more than it appears at first glance.

    :D
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: http://forums.parallax.com/showthread.php?123709-Commented-Graphics_Demo.spin<br>
Sign In or Register to comment.