Playing with the video parameters for the propeller TV object
Branmuffin Industries
Posts: 35
I am using the graphics.spin object and the tv.spin objects to draw some graphics on a small TFT.
Trouble is, the video parameters (x position, y position, x scale, y scale, are not optimized for the screen, and there is a border of unused pixels that I cannot draw to. essentially, I need to adjust the scaling to "zoom in" further on the image.
I have tried messing with these parameters in the DAT section:
tvparams long 0 'status
long 1 'enable
tvparams_pins long %001_0101 'pins
long %0000 'mode
long 0 'screen
long 0 'colors
long x_tiles 'hc
long y_tiles 'vc
long 10 'hx
long 1 'vx
long 0 'ho
long 0 'vo
long 0 'broadcast
long 0 'auralcog
I also tried adding tiles but that screws up my image.
Has anyone had any success with modifying these parameters? should i just buy a hydra and use the hydra code in my propeller application?
-Ryan
Trouble is, the video parameters (x position, y position, x scale, y scale, are not optimized for the screen, and there is a border of unused pixels that I cannot draw to. essentially, I need to adjust the scaling to "zoom in" further on the image.
I have tried messing with these parameters in the DAT section:
tvparams long 0 'status
long 1 'enable
tvparams_pins long %001_0101 'pins
long %0000 'mode
long 0 'screen
long 0 'colors
long x_tiles 'hc
long y_tiles 'vc
long 10 'hx
long 1 'vx
long 0 'ho
long 0 'vo
long 0 'broadcast
long 0 'auralcog
I also tried adding tiles but that screws up my image.
Has anyone had any success with modifying these parameters? should i just buy a hydra and use the hydra code in my propeller application?
-Ryan
Comments
Unfortunately, you're partly facing the limitations of the TV signal format. You could try changing the horizontal expansion (hx) factor slightly and the horizontal and vertical offset values (ho and vo which can be negative). Make sure to read the comments at the end of TV.spin which discuss these
various parameters and their interrelations.
0: black
1: rainbow
2: white
3: blue
4: black
5: rainbow
etc.
however, I see a palate of 64 colors being created in the variable array long colors[noparse][[/noparse]64].
can I access those colors individually and draw lines and boxes with more color choices?
-ryan
GRAPHICS usesd two bits per pixel, so you can select one of four (logical) colours per grafic element drawn. How this colour looks like depends on the palette associated with the corresponding tile
Does it allow dynamic variability in the definition of colors?
Have a look at various threads in the Hydra forum, particularly this one:
http://forums.parallax.com/showthread.php?p=654928.
http://www.rayslogic.com/propeller/Programming/TV_Colors.htm
and here:
http://www.rayslogic.com/propeller/Programming/Colors.htm
·