Shop OBEX P1 Docs P2 Docs Learn Events
How to move the NTSC output on GRAPHICS_DEMO? — Parallax Forums

How to move the NTSC output on GRAPHICS_DEMO?

CannibalRoboticsCannibalRobotics Posts: 535
edited 2008-10-10 23:46 in Propeller 1
I'm tring to use the Graphics_Demo program as a basis for setting up my graphics display. In my implementation of the·Prop the base pin for the video is pin 4. TV_Text works fine.
On the Graphics_Demo program·the call to start the video driver is:
tv.start(@tv_status)

I have tried just hard coding it to '4' but nothing happens on the screen.
I cannot find how or where the value/location·of·[url=mailto:'@tv_status']'@tv_status'[/url] is set.

Jim-
·

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2008-10-10 14:28
    @tv_status isn't the right place to look.

    Look at the first DAT block at the bottom of the Graphics_Demo. The address of those parameters gets passed to the TV driver. Make your changes there.

    If you look in the TV driver, also at the bottom, you will find details on what each of them does.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-10 19:01
    I've looked at that closely and the only thing I can find to set as far as a variable is:

    pins0 long %11110000_01110000_00001111_00000111
    pins1 long %11111111_11110111_01111111_01110111

    But there is no apparent corelation between what I see there and what is described in Tv_Pins.

    '' tv_pins
    ''
    '' bits 6..4 select pin group:
    These seem to come in sets of 8 not 4. 7-0,12-8, etc. The only thing that looks like a 12 in 6..4 is the second byte of the first long. I messed with these but got no satisfaction. Any other hints?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A wise man told me; "All electronics are made to work by magic smoke.

    Don't ever let it out as it's·very difficult·to get it back in."
  • RaymanRayman Posts: 14,364
    edited 2008-10-10 20:34
    I think there are set limits to what pins you can use... As you found, you have to select a group of 8 pins. And, what pins actually generate VGA or TV are fixed within that group of 8. I think you have to read the datasheet to see how that is defined....
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-10 20:48
    Well... I know about those limits but they run in groups of 4. I've been using the TV_Text code for development and I've got the video for that coming out of ports 4,5 & 6 and it's been working fine. Weird.
    j-

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A wise man told me; "All electronics are made to work by magic smoke.

    Don't ever let it out as it's·very difficult·to get it back in."
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-10 23:46
    ''  long  tv_pins       '%pppmmmm = pin group, pin group mode       write-only
    ''  long  tv_mode       '%tccip = tile,chroma(2bits),interlace,ntsc/pal    write-only
    '' ****************************************************************
    '' * OTHER COMMENTS REMOVED HERE FOR EASIER VIEWING **************
    '' ****************************************************************
    ''  _______
    ''  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             │                                                                            
    ''                                                              │
    ''       ││││   ││││ └┴┴┴─────▶ Lower 4 pins in pin group selected for DAC  │
    ''       ││││   └┴┴┴──────────▶ Upper 4 pins in pin group selected for DAC  │
    ''       ││││                                                  ┌┬┬──────────┘
    ''       ││││                                                            
    ''       └┴┴┴──────────────┬──▶ Lower nibble for long tv_pins %xxx_xxxx     
    ''                         │                                            
    ''                         └───────────────────────────────────────┴┴┴┘     
    ''
    ''       the baseband signal nibble is arranged as:                                            
    ''         bit 3: chroma signal for s-video (attach via 560-ohm resistor)                      
    ''         bits 2..0: baseband video (sum 270/560/1100-ohm resistors to form 75-ohm 1V signal) 
    ''                                                                                             
    ''      the broadcast signal nibble is arranged as:
    ''        bit 3: aural subcarrier (sum 560-ohm resistor into network below)
    ''        bits 2..0: visual carrier (sum 270/560/1100-ohm resistors to form 75-ohm 1V signal)
    ''  _______
    ''  tv_mode
    ''
    ''    bit 4 selects between 16x16 and 16x32 pixel tiles:───────────────────┐
    ''      0: 16x16 pixel tiles (tileheight = 16)                             │
    ''      1: 16x32 pixel tiles (tileheight = 32)                             │
    ''                                                                         │
    ''    bit 3 controls chroma mixing into broadcast: ─────────────────────────┐
    ''      0: mix chroma into broadcast (color)                               ││
    ''      1: strip chroma from broadcast (black/white)                       ││
    ''                                                                         ││
    ''    bit 2 controls chroma mixing into baseband: ───────────────────────────┐
    ''      0: mix chroma into baseband (composite color)                      │││
    ''      1: strip chroma from baseband (black/white or s-video)             │││
    ''                                                                         │││
    ''    bit 1 controls interlace:        ───────────────────────────────────────┐
    ''      0: progressive scan (243 display lines for NTSC, 286 for PAL)      ││││
    ''           less flicker, good for motion                                 ││││
    ''      1: interlaced scan (486 display lines for NTSC, 572 for PAL)       ││││
    ''           doubles the vertical display lines, good for text             ││││
    ''                                                                         ││││
    ''    bit 0 selects NTSC or PAL format ────────────────────────────────────────┐
    ''      0: NTSC                                                            │││││
    ''           3016 horizontal display ticks                                 │││││
    ''           243 or 486 (interlaced) vertical display lines                │││││
    ''           CLKFREQ must be at least 14_318_180 (4 * 3_579_545 Hz)*       │││││
    ''      1: PAL                                                             │││││
    ''           3692 horizontal display ticks                                 │││││
    ''           286 or 572 (interlaced) vertical display lines                │││││
    ''           CLKFREQ must be at least 17_734_472 (4 * 4_433_618 Hz)*       │││││
    ''                                                                         │││││
    ''      * driver will disable itself while CLKFREQ is below requirement    │││││
    ''                                                                         │││││
    ''                                                                         
    ''                                                          long tv_mode  %xxxxx
    
    



    If you want your DAC on pin group "0" (pins 7..0); long tv_pins %000xxxx and set the lower nibble with the corresponding pin group mode bits. Do not forget to set tv_mode correctly. S-Video is trivial, the aural resistor on the DAC is connected to Chroma on S-video, and the other three are for Luma value. The only limit to the tv driver is that you can only use up to 8 pins of any pin group. Look at the last entry for pin group mode %1111, (tv_pins %xxx_1111), the upper 4 pins of the group "x" are outputting baseband & chroma (S-Video), and the lower 4 pins in the same group "x" are outputting broadcast & aural (Channel 2 or 3 with audio)!

    Hope this helps de-mistify the TV driver for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.

    Post Edited (RinksCustoms) : 10/10/2008 11:57:27 PM GMT
Sign In or Register to comment.